Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/mozilla-sunbird/0.7: 000_add-missing-LDFLAGS.patch 002_firefox-libdeps.patch 032_firefox-2.0_ppc64-1.patch 033_firefox-2.0_ppc_powerpc.patch 050_respect-host-variable.patch 055_firefox-2.0_gfbsd-pthreads.patch
Date: Sat, 03 Nov 2007 18:10:29
Message-Id: E1IoNRV-0000AZ-4o@stork.gentoo.org
1 armin76 07/11/03 18:09:57
2
3 Added: 000_add-missing-LDFLAGS.patch
4 002_firefox-libdeps.patch
5 032_firefox-2.0_ppc64-1.patch
6 033_firefox-2.0_ppc_powerpc.patch
7 050_respect-host-variable.patch
8 055_firefox-2.0_gfbsd-pthreads.patch
9 Log:
10 Add patchset for 0.7
11
12 Revision Changes Path
13 1.1 src/patchsets/mozilla-sunbird/0.7/000_add-missing-LDFLAGS.patch
14
15 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/000_add-missing-LDFLAGS.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/000_add-missing-LDFLAGS.patch?rev=1.1&content-type=text/plain
17
18 Index: 000_add-missing-LDFLAGS.patch
19 ===================================================================
20 --- layout/build/Makefile.in.orig 2007-02-12 20:42:13.000000000 +0100
21 +++ layout/build/Makefile.in 2007-02-12 20:49:48.000000000 +0100
22 @@ -291,6 +291,7 @@
23 endif
24 endif
25
26 +LDFLAGS += -lX11 -lXrender
27
28 export:: $(BUILD_DATE)
29
30
31
32
33 1.1 src/patchsets/mozilla-sunbird/0.7/002_firefox-libdeps.patch
34
35 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/002_firefox-libdeps.patch?rev=1.1&view=markup
36 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/002_firefox-libdeps.patch?rev=1.1&content-type=text/plain
37
38 Index: 002_firefox-libdeps.patch
39 ===================================================================
40 # Linking issue with pango
41 #
42 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
43
44 --- mozilla/layout/build/Makefile.in.orig 2006-07-16 00:24:51.000000000 +1000
45 +++ mozilla/layout/build/Makefile.in 2006-07-16 00:35:51.000000000 +1000
46 @@ -213,6 +213,12 @@
47 $(NULL)
48 endif
49
50 +ifdef MOZ_ENABLE_CANVAS
51 +ifdef MOZ_ENABLE_XFT
52 +EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS)
53 +endif
54 +endif
55 +
56 ifdef NS_TRACE_MALLOC
57 EXTRA_DSO_LIBS += tracemalloc
58 endif
59
60
61
62 1.1 src/patchsets/mozilla-sunbird/0.7/032_firefox-2.0_ppc64-1.patch
63
64 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/032_firefox-2.0_ppc64-1.patch?rev=1.1&view=markup
65 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/032_firefox-2.0_ppc64-1.patch?rev=1.1&content-type=text/plain
66
67 Index: 032_firefox-2.0_ppc64-1.patch
68 ===================================================================
69 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=361415
70
71 unchanged:
72 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-21 17:09:28.000000000 +0000
73 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-20 10:13:38.000000000 +0000
74 @@ -267,6 +267,11 @@
75 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
76 AS := $(CC) -c -x assembler-with-cpp
77 endif
78 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
79 +CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
80 +ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
81 +AS := $(CC) -c -x assembler-with-cpp
82 +endif
83
84 #
85 # NetBSD/PPC
86 diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
87 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
88 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-22 10:43:26.000000000 +0000
89 @@ -0,0 +1,154 @@
90 +// -*- Mode: Asm -*-
91 +//
92 +// The contents of this file are subject to the Netscape Public
93 +// License Version 1.1 (the "License"); you may not use this file
94 +// except in compliance with the License. You may obtain a copy of
95 +// the License at http://www.mozilla.org/NPL/
96 +//
97 +// Software distributed under the License is distributed on an "AS
98 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
99 +// implied. See the License for the specific language governing
100 +// rights and limitations under the License.
101 +//
102 +// The Original Code is mozilla.org code.
103 +//
104 +// The Initial Developer of the Original Code is Netscape
105 +// Communications Corporation. Portions created by Netscape are
106 +// Copyright (C) 1999 Netscape Communications Corporation. All
107 +// Rights Reserved.
108 +//
109 +// Contributor(s):
110 +// dwmw2@×××××××××.org (David Woodhouse)
111 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
112 +// beard@××××××××.com (Patrick Beard)
113 +// waterson@××××××××.com (Chris Waterson)
114 +//
115 +
116 +.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
117 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
118 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
119 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
120 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
121 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
122 +.set r30,30; .set r31,31
123 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
124 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
125 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
126 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
127 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
128 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
129 +.set f30,30; .set f31,31
130 +
131 +
132 +//
133 +// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
134 +// PRUint32 paramCount, nsXPTCVariant* params)
135 +//
136 +
137 + .section ".toc","aw"
138 + .section ".text"
139 + .align 2
140 + .globl XPTC_InvokeByIndex
141 + .section ".opd","aw"
142 + .align 3
143 +XPTC_InvokeByIndex:
144 + .quad .XPTC_InvokeByIndex,.TOC.@tocbase
145 + .previous
146 + .type XPTC_InvokeByIndex,@function
147 +.XPTC_InvokeByIndex:
148 + mflr 0
149 + std 0,16(r1)
150 +
151 + std r29,-24(r1)
152 + std r30,-16(r1)
153 + std r31,-8(r1)
154 +
155 + mr r29,r3 // Save 'that' in r29
156 + mr r30,r4 // Save 'methodIndex' in r30
157 + mr r31,r1 // Save old frame
158 +
159 + // Allocate stack frame with space for params. Since at least the
160 + // first 7 parameters (not including 'that') will be in registers,
161 + // we don't actually need stack space for those. We must ensure
162 + // that the stack remains 16-byte aligned.
163 + //
164 + // | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
165 + // | |(params)........| regs | regs | regs |
166 + // (r1)...........(+112)....(+128)
167 + // (-23*8).(-16*8).(-3*8)..(r31)
168 +
169 + // +stack frame, -unused stack params, +regs storage, +1 for alignment
170 + addi r7,r5,((112/8)-7+7+13+3+1)
171 + rldicr r7,r7,3,59 // multiply by 8 and mask with ~15
172 + neg r7,r7
173 + stdux r1,r1,r7
174 +
175 +
176 + // Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
177 + // PRUint32 paramCount, nsXPTCVariant* s,
178 + // PRUint64* d))
179 +
180 + // r5, r6 are passed through intact (paramCount, params)
181 + // r7 (d) has to be r1+112 -- where parameters are passed on the stack.
182 + // r3, r4 are above that, easier to address from r31 than from r1
183 +
184 + subi r3,r31,(23*8) // r3 --> GPRS
185 + subi r4,r31,(16*8) // r4 --> FPRS
186 + addi r7,r1,112 // r7 --> params
187 + bl invoke_copy_to_stack
188 + nop
189 +
190 + // Set up to invoke function
191 +
192 + ld r9,0(r29) // vtable (r29 is 'that')
193 + mr r3,r29 // self is first arg, obviously
194 +
195 + sldi r30,r30,3 // Find function descriptor
196 + add r9,r9,r30
197 + ld r9,0(r9)
198 +
199 + ld r0,0(r9) // Actual address from fd.
200 + std r2,40(r1) // Save r2 (TOC pointer)
201 +
202 + mtctr 0
203 + ld r11,16(r9) // Environment pointer from fd.
204 + ld r2,8(r9) // TOC pointer from fd.
205 +
206 + // Load FP and GP registers as required
207 + ld r4, -(23*8)(r31)
208 + ld r5, -(22*8)(r31)
209 + ld r6, -(21*8)(r31)
210 + ld r7, -(20*8)(r31)
211 + ld r8, -(19*8)(r31)
212 + ld r9, -(18*8)(r31)
213 + ld r10, -(17*8)(r31)
214 +
215 + lfd f1, -(16*8)(r31)
216 + lfd f2, -(15*8)(r31)
217 + lfd f3, -(14*8)(r31)
218 + lfd f4, -(13*8)(r31)
219 + lfd f5, -(12*8)(r31)
220 + lfd f6, -(11*8)(r31)
221 + lfd f7, -(10*8)(r31)
222 + lfd f8, -(9*8)(r31)
223 + lfd f9, -(8*8)(r31)
224 + lfd f10, -(7*8)(r31)
225 + lfd f11, -(6*8)(r31)
226 + lfd f12, -(5*8)(r31)
227 + lfd f13, -(4*8)(r31)
228 +
229 + bctrl // Do it
230 +
231 + ld r2,40(r1) // Load our own TOC pointer
232 + ld r1,0(r1) // Revert stack frame
233 + ld 0,16(r1) // Reload lr
234 + ld 29,-24(r1) // Restore NVGPRS
235 + ld 30,-16(r1)
236 + ld 31,-8(r1)
237 + mtlr 0
238 + blr
239 +
240 + .size XPTC_InvokeByIndex,.-.XPTC_InvokeByIndex
241 +
242 + /* Magic indicating no need for an executable stack */
243 + .section .note.GNU-stack, "", @progbits ; .previous
244 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
245 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2006-11-21 17:00:06.000000000 +0000
246 @@ -0,0 +1,127 @@
247 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
248 +/* ***** BEGIN LICENSE BLOCK *****
249 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
250 + *
251 + * The contents of this file are subject to the Mozilla Public License Version
252 + * 1.1 (the "License"); you may not use this file except in compliance with
253 + * the License. You may obtain a copy of the License at
254 + * http://www.mozilla.org/MPL/
255 + *
256 + * Software distributed under the License is distributed on an "AS IS" basis,
257 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
258 + * for the specific language governing rights and limitations under the
259 + * License.
260 + *
261 + * The Original Code is mozilla.org code.
262 + *
263 + * The Initial Developer of the Original Code is
264 + * Netscape Communications Corporation.
265 + * Portions created by the Initial Developer are Copyright (C) 1998
266 + * the Initial Developer. All Rights Reserved.
267 + *
268 + * Contributor(s):
269 + * dwmw2@×××××××××.org (David Woodhouse)
270 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
271 + * beard@××××××××.com (Patrick Beard)
272 + * waterson@××××××××.com (Chris Waterson)
273 + *
274 + * Alternatively, the contents of this file may be used under the terms of
275 + * either of the GNU General Public License Version 2 or later (the "GPL"),
276 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
277 + * in which case the provisions of the GPL or the LGPL are applicable instead
278 + * of those above. If you wish to allow use of your version of this file only
279 + * under the terms of either the GPL or the LGPL, and not to allow others to
280 + * use your version of this file under the terms of the MPL, indicate your
281 + * decision by deleting the provisions above and replace them with the notice
282 + * and other provisions required by the GPL or the LGPL. If you do not delete
283 + * the provisions above, a recipient may use your version of this file under
284 + * the terms of any one of the MPL, the GPL or the LGPL.
285 + *
286 + * ***** END LICENSE BLOCK ***** */
287 +
288 +// Platform specific code to invoke XPCOM methods on native objects
289 +
290 +// The purpose of XPTC_InvokeByIndex() is to map a platform
291 +// independent call to the platform ABI. To do that,
292 +// XPTC_InvokeByIndex() has to determine the method to call via vtable
293 +// access. The parameters for the method are read from the
294 +// nsXPTCVariant* and prepared for the native ABI.
295 +
296 +#include <stdio.h>
297 +#include "xptcprivate.h"
298 +
299 +// 8 integral parameters are passed in registers, not including 'that'
300 +#define GPR_COUNT 7
301 +
302 +// 8 floating point parameters are passed in registers, floats are
303 +// promoted to doubles when passed in registers
304 +#define FPR_COUNT 13
305 +
306 +extern "C" PRUint32
307 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
308 +{
309 + return PRUint32(((paramCount * 2) + 3) & ~3);
310 +}
311 +
312 +extern "C" void
313 +invoke_copy_to_stack(PRUint64* gpregs,
314 + double* fpregs,
315 + PRUint32 paramCount,
316 + nsXPTCVariant* s,
317 + PRUint64* d)
318 +{
319 + PRUint64 tempu64;
320 +
321 + for(uint32 i = 0; i < paramCount; i++, s++) {
322 + if(s->IsPtrData())
323 + tempu64 = (PRUint64) s->ptr;
324 + else {
325 + switch(s->type) {
326 + case nsXPTType::T_FLOAT: break;
327 + case nsXPTType::T_DOUBLE: break;
328 + case nsXPTType::T_I8: tempu64 = s->val.i8; break;
329 + case nsXPTType::T_I16: tempu64 = s->val.i16; break;
330 + case nsXPTType::T_I32: tempu64 = s->val.i32; break;
331 + case nsXPTType::T_I64: tempu64 = s->val.i64; break;
332 + case nsXPTType::T_U8: tempu64 = s->val.u8; break;
333 + case nsXPTType::T_U16: tempu64 = s->val.u16; break;
334 + case nsXPTType::T_U32: tempu64 = s->val.u32; break;
335 + case nsXPTType::T_U64: tempu64 = s->val.u64; break;
336 + case nsXPTType::T_BOOL: tempu64 = s->val.b; break;
337 + case nsXPTType::T_CHAR: tempu64 = s->val.c; break;
338 + case nsXPTType::T_WCHAR: tempu64 = s->val.wc; break;
339 + default: tempu64 = (PRUint64) s->val.p; break;
340 + }
341 + }
342 +
343 + if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
344 + if (i < FPR_COUNT)
345 + fpregs[i] = s->val.d;
346 + else
347 + *(double *)d = s->val.d;
348 + }
349 + else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
350 + if (i < FPR_COUNT) {
351 + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
352 + } else {
353 + float *p = (float *)d;
354 + p++;
355 + *p = s->val.f;
356 + }
357 + }
358 + else {
359 + if (i < GPR_COUNT)
360 + gpregs[i] = tempu64;
361 + else
362 + *d = tempu64;
363 + }
364 + if (i >= 7)
365 + d++;
366 + }
367 +}
368 +
369 +extern "C"
370 +XPTC_PUBLIC_API(nsresult)
371 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
372 + PRUint32 paramCount, nsXPTCVariant* params);
373 +
374 diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
375 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
376 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-22 10:51:14.000000000 +0000
377 @@ -0,0 +1,102 @@
378 +// -*- Mode: Asm -*-
379 +//
380 +// The contents of this file are subject to the Netscape Public
381 +// License Version 1.1 (the "License"); you may not use this file
382 +// except in compliance with the License. You may obtain a copy of
383 +// the License at http://www.mozilla.org/NPL/
384 +//
385 +// Software distributed under the License is distributed on an "AS
386 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
387 +// implied. See the License for the specific language governing
388 +// rights and limitations under the License.
389 +//
390 +// The Original Code is mozilla.org code.
391 +//
392 +// The Initial Developer of the Original Code is Netscape
393 +// Communications Corporation. Portions created by Netscape are
394 +// Copyright (C) 1999 Netscape Communications Corporation. All
395 +// Rights Reserved.
396 +//
397 +// Contributor(s):
398 +// dwmw2@×××××××××.org (David Woodhouse)
399 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
400 +// beard@××××××××.com (Patrick Beard)
401 +// waterson@××××××××.com (Chris Waterson)
402 +//
403 +
404 +.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
405 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
406 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
407 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
408 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
409 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
410 +.set r30,30; .set r31,31
411 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
412 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
413 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
414 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
415 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
416 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
417 +.set f30,30; .set f31,31
418 +
419 + .section ".text"
420 + .align 2
421 + .globl SharedStub
422 + .section ".opd","aw"
423 + .align 3
424 +
425 +SharedStub:
426 + .quad .SharedStub,.TOC.@tocbase
427 + .previous
428 + .type SharedStub,@function
429 +
430 +.SharedStub:
431 + mflr r0
432 +
433 + std r4, -56(r1) // Save all GPRS
434 + std r5, -48(r1)
435 + std r6, -40(r1)
436 + std r7, -32(r1)
437 + std r8, -24(r1)
438 + std r9, -16(r1)
439 + std r10, -8(r1)
440 +
441 + stfd f13, -64(r1) // ... and FPRS
442 + stfd f12, -72(r1)
443 + stfd f11, -80(r1)
444 + stfd f10, -88(r1)
445 + stfd f9, -96(r1)
446 + stfd f8, -104(r1)
447 + stfd f7, -112(r1)
448 + stfd f6, -120(r1)
449 + stfd f5, -128(r1)
450 + stfd f4, -136(r1)
451 + stfd f3, -144(r1)
452 + stfd f2, -152(r1)
453 + stfd f1, -160(r1)
454 +
455 + subi r6,r1,56 // r6 --> gprData
456 + subi r7,r1,160 // r7 --> fprData
457 + addi r5,r1,112 // r5 --> extra stack args
458 +
459 + std r0, 16(r1)
460 +
461 + stdu r1,-288(r1)
462 + // r3 has the 'self' pointer already
463 +
464 + mr r4,r11 // r4 is methodIndex selector, passed
465 + // via r11 in the nsXPTCStubBase::StubXX() call
466 +
467 + bl PrepareAndDispatch
468 + nop
469 +
470 + ld 1,0(r1) // restore stack
471 + ld r0,16(r1) // restore LR
472 + mtlr r0
473 + blr
474 +
475 + .size SharedStub,.-.SharedStub
476 +
477 +
478 +/* Magic indicating no need for an executable stack */
479 +.section .note.GNU-stack, "", @progbits ; .previous
480 unchanged:
481 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
482 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2006-11-21 16:59:46.000000000 +0000
483 @@ -0,0 +1,247 @@
484 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
485 +/* ***** BEGIN LICENSE BLOCK *****
486 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
487 + *
488 + * The contents of this file are subject to the Mozilla Public License Version
489 + * 1.1 (the "License"); you may not use this file except in compliance with
490 + * the License. You may obtain a copy of the License at
491 + * http://www.mozilla.org/MPL/
492 + *
493 + * Software distributed under the License is distributed on an "AS IS" basis,
494 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
495 + * for the specific language governing rights and limitations under the
496 + * License.
497 + *
498 + * The Original Code is mozilla.org code.
499 + *
500 + * The Initial Developer of the Original Code is
501 + * Netscape Communications Corporation.
502 + * Portions created by the Initial Developer are Copyright (C) 1999
503 + * the Initial Developer. All Rights Reserved.
504 + *
505 + * Contributor(s):
506 + * dwmw2@×××××××××.org (David Woodhouse)
507 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
508 + * beard@××××××××.com (Patrick Beard)
509 + * waterson@××××××××.com (Chris Waterson)
510 + *
511 + * Alternatively, the contents of this file may be used under the terms of
512 + * either of the GNU General Public License Version 2 or later (the "GPL"),
513 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
514 + * in which case the provisions of the GPL or the LGPL are applicable instead
515 + * of those above. If you wish to allow use of your version of this file only
516 + * under the terms of either the GPL or the LGPL, and not to allow others to
517 + * use your version of this file under the terms of the MPL, indicate your
518 + * decision by deleting the provisions above and replace them with the notice
519 + * and other provisions required by the GPL or the LGPL. If you do not delete
520 + * the provisions above, a recipient may use your version of this file under
521 + * the terms of any one of the MPL, the GPL or the LGPL.
522 + *
523 + * ***** END LICENSE BLOCK ***** */
524 +
525 +// Implement shared vtbl methods.
526 +
527 +#include "xptcprivate.h"
528 +
529 +// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
530 +// parameters and the first 13 floating point parameters in registers
531 +// (r3-r10 and f1-f13), no stack space is allocated for these by the
532 +// caller. The rest of the parameters are passed in the callers stack
533 +// area. The stack pointer has to retain 16-byte alignment, longlongs
534 +// and doubles are aligned on 8-byte boundaries.
535 +
536 +#define PARAM_BUFFER_COUNT 16
537 +#define GPR_COUNT 7
538 +#define FPR_COUNT 13
539 +
540 +// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
541 +//
542 +// - 'args[]' contains the arguments passed on stack
543 +// - 'gprData[]' contains the arguments passed in integer registers
544 +// - 'fprData[]' contains the arguments passed in floating point registers
545 +//
546 +// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
547 +// and then the method gets called.
548 +#include <stdio.h>
549 +extern "C" nsresult
550 +PrepareAndDispatch(nsXPTCStubBase* self,
551 + PRUint64 methodIndex,
552 + PRUint64* args,
553 + PRUint64 *gprData,
554 + double *fprData)
555 +{
556 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
557 + nsXPTCMiniVariant* dispatchParams = NULL;
558 + nsIInterfaceInfo* iface_info = NULL;
559 + const nsXPTMethodInfo* info;
560 + PRUint32 paramCount;
561 + PRUint32 i;
562 + nsresult result = NS_ERROR_FAILURE;
563 +
564 + NS_ASSERTION(self,"no self");
565 +
566 + self->GetInterfaceInfo(&iface_info);
567 + NS_ASSERTION(iface_info,"no interface info");
568 + if (! iface_info)
569 + return NS_ERROR_UNEXPECTED;
570 +
571 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
572 + NS_ASSERTION(info,"no method info");
573 + if (! info)
574 + return NS_ERROR_UNEXPECTED;
575 +
576 + paramCount = info->GetParamCount();
577 +
578 + // setup variant array pointer
579 + if(paramCount > PARAM_BUFFER_COUNT)
580 + dispatchParams = new nsXPTCMiniVariant[paramCount];
581 + else
582 + dispatchParams = paramBuffer;
583 +
584 + NS_ASSERTION(dispatchParams,"no place for params");
585 + if (! dispatchParams)
586 + return NS_ERROR_OUT_OF_MEMORY;
587 +
588 + PRUint64* ap = args;
589 + PRUint64 tempu64;
590 +
591 + for(i = 0; i < paramCount; i++) {
592 + const nsXPTParamInfo& param = info->GetParam(i);
593 + const nsXPTType& type = param.GetType();
594 + nsXPTCMiniVariant* dp = &dispatchParams[i];
595 +
596 + if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
597 + if (i < FPR_COUNT)
598 + dp->val.d = fprData[i];
599 + else
600 + dp->val.d = *(double*) ap;
601 + } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
602 + if (i < FPR_COUNT)
603 + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
604 + else {
605 + float *p = (float *)ap;
606 + p++;
607 + dp->val.f = *p;
608 + }
609 + } else { /* integer type or pointer */
610 + if (i < GPR_COUNT)
611 + tempu64 = gprData[i];
612 + else
613 + tempu64 = *ap;
614 +
615 + if (param.IsOut() || !type.IsArithmetic())
616 + dp->val.p = (void*) tempu64;
617 + else if (type ==nsXPTType::T_I8)
618 + dp->val.i8 = (PRInt8) tempu64;
619 + else if (type ==nsXPTType::T_I16)
620 + dp->val.i16 = (PRInt16) tempu64;
621 + else if (type ==nsXPTType::T_I32)
622 + dp->val.i32 = (PRInt32) tempu64;
623 + else if (type ==nsXPTType::T_I64)
624 + dp->val.i64 = (PRInt64) tempu64;
625 + else if (type ==nsXPTType::T_U8)
626 + dp->val.u8 = (PRUint8) tempu64;
627 + else if (type ==nsXPTType::T_U16)
628 + dp->val.u16 = (PRUint16) tempu64;
629 + else if (type ==nsXPTType::T_U32)
630 + dp->val.u32 = (PRUint32) tempu64;
631 + else if (type ==nsXPTType::T_U64)
632 + dp->val.u64 = (PRUint64) tempu64;
633 + else if (type ==nsXPTType::T_BOOL)
634 + dp->val.b = (PRBool) tempu64;
635 + else if (type ==nsXPTType::T_CHAR)
636 + dp->val.c = (char) tempu64;
637 + else if (type ==nsXPTType::T_WCHAR)
638 + dp->val.wc = (wchar_t) tempu64;
639 + else
640 + NS_ASSERTION(0, "bad type");
641 + }
642 +
643 + if (i >= 7)
644 + ap++;
645 + }
646 +
647 + result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
648 +
649 + NS_RELEASE(iface_info);
650 +
651 + if (dispatchParams != paramBuffer)
652 + delete [] dispatchParams;
653 +
654 + return result;
655 +}
656 +
657 +// Load r11 with the constant 'n' and branch to SharedStub().
658 +//
659 +// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
660 +// however, it's quick, dirty, and'll break when the ABI changes on
661 +// us, which is what we want ;-).
662 +
663 +#if __GXX_ABI_VERSION < 100
664 +#error Prehistoric GCC not supported here
665 +#else
666 +// gcc-3 version
667 +//
668 +// As G++3 ABI contains the length of the functionname in the mangled
669 +// name, it is difficult to get a generic assembler mechanism like
670 +// in the G++ 2.95 case.
671 +// Create names would be like:
672 +// _ZN14nsXPTCStubBase5Stub1Ev
673 +// _ZN14nsXPTCStubBase6Stub12Ev
674 +// _ZN14nsXPTCStubBase7Stub123Ev
675 +// _ZN14nsXPTCStubBase8Stub1234Ev
676 +// etc.
677 +// Use assembler directives to get the names right...
678 +
679 +# define STUB_ENTRY(n) \
680 +__asm__ ( \
681 + ".section \".toc\",\"aw\" \n\t" \
682 + ".section \".text\" \n\t" \
683 + ".align 2 \n\t" \
684 + ".if "#n" < 10 \n\t" \
685 + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
686 + ".section \".opd\",\"aw\" \n\t" \
687 + ".align 3 \n\t" \
688 +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
689 + ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC.@tocbase \n\t" \
690 + ".previous \n\t" \
691 + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
692 +"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
693 + \
694 + ".elseif "#n" < 100 \n\t" \
695 + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
696 + ".section \".opd\",\"aw\" \n\t" \
697 + ".align 3 \n\t" \
698 +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
699 + ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC.@tocbase \n\t" \
700 + ".previous \n\t" \
701 + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
702 +"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
703 + \
704 + ".elseif "#n" < 1000 \n\t" \
705 + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
706 + ".section \".opd\",\"aw\" \n\t" \
707 + ".align 3 \n\t" \
708 +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
709 + ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC.@tocbase \n\t" \
710 + ".previous \n\t" \
711 + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
712 +"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
713 + \
714 + ".else \n\t" \
715 + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
716 + ".endif \n\t" \
717 + \
718 + "li 11,"#n" \n\t" \
719 + "b SharedStub \n" \
720 +);
721 +#endif
722 +
723 +#define SENTINEL_ENTRY(n) \
724 +nsresult nsXPTCStubBase::Sentinel##n() \
725 +{ \
726 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
727 + return NS_ERROR_NOT_IMPLEMENTED; \
728 +}
729 +
730 +#include "xptcstubsdef.inc"
731
732
733
734 1.1 src/patchsets/mozilla-sunbird/0.7/033_firefox-2.0_ppc_powerpc.patch
735
736 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&view=markup
737 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&content-type=text/plain
738
739 Index: 033_firefox-2.0_ppc_powerpc.patch
740 ===================================================================
741 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2007-03-05 13:46:38.000000000 +0100
742 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-03-05 13:47:30.000000000 +0100
743 @@ -288,12 +288,12 @@
744 #
745 # Linux/PPC
746 #
747 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
748 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
749 CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
750 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
751 AS := $(CC) -c -x assembler-with-cpp
752 endif
753 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
754 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
755 CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
756 ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
757 AS := $(CC) -c -x assembler-with-cpp
758
759
760
761 1.1 src/patchsets/mozilla-sunbird/0.7/050_respect-host-variable.patch
762
763 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/050_respect-host-variable.patch?rev=1.1&view=markup
764 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/050_respect-host-variable.patch?rev=1.1&content-type=text/plain
765
766 Index: 050_respect-host-variable.patch
767 ===================================================================
768 # https://bugs.gentoo.org/show_bug.cgi?id=168893
769
770 --- mozilla/configure.in.old 2007-03-02 23:28:27.000000000 +0200
771 +++ mozilla/configure.in 2007-03-02 23:29:23.000000000 +0200
772 @@ -825,7 +825,6 @@
773 OS_TARGET="${target_os}"
774 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
775 OS_RELEASE=
776 - OS_TEST="${target_cpu}"
777 case "${target_os}" in
778 linux*) OS_ARCH=Linux ;;
779 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
780 @@ -837,8 +836,10 @@
781 OS_TARGET=`uname -s`
782 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
783 OS_RELEASE=`uname -r`
784 - OS_TEST=`uname -m`
785 fi
786 +
787 +OS_TEST="${target_cpu}"
788 +
789 _COMPILER_PREFIX=
790
791 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
792
793
794
795 1.1 src/patchsets/mozilla-sunbird/0.7/055_firefox-2.0_gfbsd-pthreads.patch
796
797 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
798 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-sunbird/0.7/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain
799
800 Index: 055_firefox-2.0_gfbsd-pthreads.patch
801 ===================================================================
802 # https://bugs.gentoo.org/show_bug.cgi?id=169825
803
804 --- mozilla/config/rules.mk.orig Thu Sep 14 14:07:03 2006
805 +++ mozilla/config/rules.mk Wed Oct 18 11:00:09 2006
806 @@ -442,9 +442,7 @@
807 endif
808
809 ifeq ($(OS_ARCH),FreeBSD)
810 -ifdef IS_COMPONENT
811 -EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
812 -endif
813 +EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
814 endif
815
816 ifeq ($(OS_ARCH),NetBSD)
817 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
818 +++ mozilla/configure.in 2007-03-07 15:35:41 -0300
819 @@ -2667,7 +2667,7 @@
820 *-hpux11.*)
821 ;;
822 *)
823 - AC_CHECK_LIB(c_r, gethostbyname_r)
824 + AC_SEARCH_LIBS([gethostbyname_r], [c_r])
825 ;;
826 esac
827 AC_CHECK_LIB(m, atan)
828 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
829 +++ mozilla/configure.in 2007-03-07 13:59:53 -0300
830 @@ -2839,11 +2839,12 @@
831 *-*-freebsd*)
832 AC_DEFINE(_REENTRANT)
833 AC_DEFINE(_THREAD_SAFE)
834 - dnl -pthread links in -lc_r, so don't specify it explicitly.
835 - if test "$ac_cv_have_dash_pthread" = "yes"; then
836 - _PTHREAD_LDFLAGS="-pthread"
837 + dnl use the environment PTHREAD_LIBS
838 + if test -n "$PTHREAD_LIBS"; then
839 + _PTHREAD_LDFLAGS="$PTHREAD_LIBS"
840 else
841 - _PTHREAD_LDFLAGS="-lc_r"
842 + _PTHREAD_LDFLAGS="-lpthread"
843 fi
844 + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
845 ;;
846
847
848
849 --
850 gentoo-commits@g.o mailing list