diff options
author | 2010-03-08 01:06:22 +0800 | |
---|---|---|
committer | 2010-03-08 01:06:22 +0800 | |
commit | aa809c8b56936cb33a061607772db90544915ba8 (patch) | |
tree | de1ae348e34b423d641e1f73a131984b2626c5e8 /net-libs | |
parent | added mips PIE fix for binutils (diff) | |
download | loongson-aa809c8b56936cb33a061607772db90544915ba8.tar.gz loongson-aa809c8b56936cb33a061607772db90544915ba8.tar.bz2 loongson-aa809c8b56936cb33a061607772db90544915ba8.zip |
added xulrunner-1.9.3_alpha2-r1.ebuild
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/xulrunner/Manifest | 6 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-bus-error.patch | 24 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-n32.patch | 762 | ||||
-rw-r--r-- | net-libs/xulrunner/files/xulrunner-chromium-mips.patch | 205 | ||||
-rw-r--r-- | net-libs/xulrunner/xulrunner-1.9.3_alpha2-r1.ebuild | 214 |
5 files changed, 1211 insertions, 0 deletions
diff --git a/net-libs/xulrunner/Manifest b/net-libs/xulrunner/Manifest index addc708..caa327c 100644 --- a/net-libs/xulrunner/Manifest +++ b/net-libs/xulrunner/Manifest @@ -6,6 +6,9 @@ AUX README 145 RMD160 e6b6991f1dc429a081f6f16a0a7a24909c2ee576 SHA1 10e9be7039df AUX xulrunner-1.9.0.5-gcc4.4.patch 1893 RMD160 8510bc33a55a1d3580439ed510e4705c3e217e57 SHA1 fcc5577e290e20bfa6bfa052a343dc5fad774250 SHA256 c21cc87796f0f1c3ec0f82e2e907b5a12c800a77d3a909f0d293879df1a23f05 AUX xulrunner-1.9.2_beta4-mips-bus-error.patch 957 RMD160 fab47698b8e22205d5b43ee3a5268b5776b32663 SHA1 d4bc49bc1d4871ec2001e72825cdf1e0035fd2fa SHA256 609c10f9f35fe039a472e802af8628c89c796f8d257687f05f43fde846d1a109 AUX xulrunner-1.9.2_beta4-mips-n32.patch 24738 RMD160 63995685e4343420469fbb056e051afd28cc56db SHA1 e6435e8e9b15db8103b6d6d0c9213ce36ec88f94 SHA256 24ac461bffbd7c2978a2cd30dc4cbed95370a77a2db054ade2794e902620d3de +AUX xulrunner-1.9.3_alpha2-mips-bus-error.patch 957 RMD160 fab47698b8e22205d5b43ee3a5268b5776b32663 SHA1 d4bc49bc1d4871ec2001e72825cdf1e0035fd2fa SHA256 609c10f9f35fe039a472e802af8628c89c796f8d257687f05f43fde846d1a109 +AUX xulrunner-1.9.3_alpha2-mips-n32.patch 24738 RMD160 63995685e4343420469fbb056e051afd28cc56db SHA1 e6435e8e9b15db8103b6d6d0c9213ce36ec88f94 SHA256 24ac461bffbd7c2978a2cd30dc4cbed95370a77a2db054ade2794e902620d3de +AUX xulrunner-chromium-mips.patch 7752 RMD160 7fd4aab6cd2a4c0d22613812909ed45fd23f5f47 SHA1 f4c0352a809433cfff366833156c7de420f2b46c SHA256 08f5935cc72cc05f4dc9e8500a7f351e0161b5398630a00f44d9a17cd8268d15 AUX xulrunner-default-prefs.js 677 RMD160 73ec130da332c1d6517a6f838d5fab0cc134289a SHA1 b9efc3ef5e95ad3081f6b68d771e32e848b4b9ac SHA256 53493080276f221f1619153c114caf268206a6fa107972b33a4eb7f1c1cf6fe8 AUX xulrunner-mips-bus-error.patch 1412 RMD160 2194194a38a1631450d199784b80c7f6d344ba16 SHA1 c6e3348db92811224529e119ff483d5d7883c850 SHA256 50afd8bf604c22a4a4f9862618a788b1288e834572955d42a4142a0f578263b5 AUX xulrunner-mips-n32.patch 24732 RMD160 d5020c88801e6647131c6c2d780a90ccc0717c7a SHA1 37be69001a75f62d51e84b8b22f1946c27e8baa1 SHA256 5cce08d42a0cf629717b34ec0310b86080640ff6fe5bc14988d1b046562e7254 @@ -16,16 +19,19 @@ DIST firefox-3.5.3.source.tar.bz2 46766383 RMD160 c2487c90b4a9490840817c7b00dccc DIST firefox-3.5.4.source.tar.bz2 46905557 RMD160 e89ff54fef6d036538c9779176f5086a8eaa721e SHA1 ce250208371326d03e72a02d223bc136cd376e5d SHA256 b2b0a231aae105090948521a469c5019eb886f0562fa3315a49cebaf74f61be4 DIST firefox-3.5.5.source.tar.bz2 46907137 RMD160 3c2eb5542e2d34773dc52b07b46dcfcd656e5f0d SHA1 a2146fb6dc8e879a78fa13849f187c14d41442ca SHA256 2abe7b5561267c230df27951d1d8c6c5853d06ca2426997fdf0a63c5db689feb DIST firefox-3.6b4.source.tar.bz2 48323922 RMD160 b6f74b639bfcb3d34a9f8e8c4cb58bb58e511f6f SHA1 de3b649b54fb9b40b58c2f1b432c0beea39ad732 SHA256 b4d371cc4abf3df36c8cb9738b35ad8d3c4ff57d31c00085a29141fff4c407d7 +DIST firefox-3.7a2.source.tar.bz2 49245016 RMD160 238e02a26b90caea10544b430e44da72db59df2c SHA1 c767ea2fa7d0802f138c9cc4c010bf46e5d9afd8 SHA256 6e54c58315910a87f5af15f7c7f7a621f6fdd60f349b7c4a5fa90be82cc30ed9 DIST xulrunner-1.9.0.10-patches-0.1.tar.bz2 7077 RMD160 73612f1b619fef5d02e8c8f8318afe192e435e42 SHA1 8a48e53951216c330d4908def93a5c0201f5a890 SHA256 bc0c0d26258bc17ffa5cd513089fe94395ff8f6c17023cd363fac30cdd675410 DIST xulrunner-1.9.0.10.tar.bz2 34167778 RMD160 96ca5c569bbee78924c6e9cb5fea660870a8c096 SHA1 926d9042557e2d767db91b1d183327713fb090d3 SHA256 fe4091f4de50278567b4e26effea66a998dd41f455077e1e37cff8b3417a8f34 DIST xulrunner-1.9.1.2-patches-0.3.tar.bz2 8839 RMD160 aa1902800aedf3323e1836bb9befea41b2b0d90c SHA1 fc1689350cb3955ef6fceb942627003663464c64 SHA256 9c6bf20c29b0cddd06ba87943962a3870ea5a1beccf0d914bbd671404ea4105a DIST xulrunner-1.9.1.4-patches-0.1.tar.bz2 8839 RMD160 5bb74a2ba19da3286b8945c01d1c6bbc648bf86a SHA1 a112fa5064362d63946b79168d6fbc1e71936ab8 SHA256 4dc2dde0ed6c1c91ecf38fea48af591ce0c177221751d0cb3a095aa061c12dfe DIST xulrunner-1.9.2-patches-0.1.tar.bz2 4605 RMD160 40ec8e43a4023ca13dde67393dca2985e7ada872 SHA1 4afea0024b4dcf674ec2d01ad16996b381d6f24e SHA256 ab2f52153af474c99bd22177653acec6b110b8790fcb7d597b7c95f678076bf5 +DIST xulrunner-1.9.3-patches-0.1.tar.bz2 4761 RMD160 d13fa5e53235fbe4eba50f210107b352530d95ab SHA1 78904c4543eb27717131d159e8ef02762e94c6f7 SHA256 fab399d174e6959afb998446e152f1da41575058afb40e9c442cfa804de326fc EBUILD xulrunner-1.9.0.10.ebuild 4924 RMD160 812e4fb1216d76dd84c1041365001bb9291cb448 SHA1 1843a099e8dbf0475cc37ebd41c6e477165579db SHA256 d0fc674b97a2cf9d2a499ec5d7b915c570ca4e88873882c7cc4157500415d59e EBUILD xulrunner-1.9.1.2-r2.ebuild 7474 RMD160 49e855b27a2e5fe5ff2d458c07565ba03938701f SHA1 047201b9b5666bb38be828e329e3625f4200fcec SHA256 5c6e3add56100feefb7495a04a20d92bd00dce4ba362608c3bb58a19b6515b8f EBUILD xulrunner-1.9.1.3.ebuild 7514 RMD160 05c795e9800535bd9fd7e3a436a16eb9816b5a54 SHA1 c79f481e071a7ca599408b9bfc4f57c74bfcccb4 SHA256 beab3db2ce9df9868a6a03ba63c3674aee341cdb5a5722c039ed27ea5307181c EBUILD xulrunner-1.9.1.4.ebuild 8202 RMD160 a45f6115650dbe331d1bcedf1c6aba668ef96707 SHA1 feaa2f533cf918aa4c0847444dc79f5b9ac8051e SHA256 0e85bd01ce7952150d3a2babd4dd9762da32430648c1ad24f8679d6fed0d1f73 EBUILD xulrunner-1.9.1.5.ebuild 8205 RMD160 e0cd323c04ced1b806cf7ab62c85a0f6dda24238 SHA1 5b75566966631290c52d2803ed9d93235d6a8ecc SHA256 57cf9614740fd43cf795e96f30dd641660bd28eaa39801d56a5c08467437dcf0 EBUILD xulrunner-1.9.2_beta4.ebuild 7060 RMD160 76144fabc75e5a47038a63ad32cd948ad60343e1 SHA1 d71091c7f7a9abf2ad7eb97b7ca610be12b973ba SHA256 b5f20e35d07d09a0cf7f6d5b334271a325e405ef6761b0a98a24d059d070b994 +EBUILD xulrunner-1.9.3_alpha2-r1.ebuild 6611 RMD160 31468b97917a976c3d4b7bbcfdb866fd3109ed86 SHA1 598c6d6d8db0a37876f1e8c223e5c78b0c47b937 SHA256 3e2d7ae77fe3f305ddde3787488f1ad751ab22315df24cde830ab414e4a5c9d7 MISC ChangeLog 20231 RMD160 53d013acdc632eee5a57c68cc91590a9d97d322b SHA1 50a8a72f61cdf952923a6c40d3ddbdafa10682fc SHA256 4dc8981ad9cda5b06ff6f5e7b826a01d32082c6a306879ee1e3923a8aa93a449 MISC metadata.xml 263 RMD160 9ed9d79d17d0a991e88c31ae6342996519ffef5b SHA1 0de183203298ce0f1c2ecc3fc8149842c4a0ec60 SHA256 64bfc93c4ab02ef2fe9b61b8157eb722d6cca5d552eecc18eaaf8e95980d2550 diff --git a/net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-bus-error.patch b/net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-bus-error.patch new file mode 100644 index 0000000..2bf51d7 --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-bus-error.patch @@ -0,0 +1,24 @@ +--- ./xpcom/glue/nsTArray.h.orig 2009-04-26 01:21:58.000000000 +0800 ++++ ./xpcom/glue/nsTArray.h 2009-04-26 01:21:33.000000000 +0800 +@@ -168,6 +168,7 @@ + + // The array's elements (prefixed with a Header). This pointer is never + // null. If the array is empty, then this will point to sEmptyHdr. ++ void *padding; + Header *mHdr; + }; + +diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp +index 6d452d0..3ce4193 100644 +--- a/layout/svg/base/src/nsSVGGlyphFrame.cpp ++++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp +@@ -169,8 +169,8 @@ private: + PRBool SetupForDirectTextRun(gfxContext *aContext, float aScale); + void SetupFor(gfxContext *aContext, float aScale); + +- nsSVGGlyphFrame *mSource; + nsAutoTArray<CharacterPosition,80> mPositions; ++ nsSVGGlyphFrame *mSource; + gfxMatrix mInitialMatrix; + // Textrun advance width from start to mCurrentChar, in appunits + gfxFloat mCurrentAdvance; diff --git a/net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-n32.patch b/net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-n32.patch new file mode 100644 index 0000000..c1a415d --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-1.9.3_alpha2-mips-n32.patch @@ -0,0 +1,762 @@ +From 1aa3577cf7e79b574bd2cff058ea00221194869b Mon Sep 17 00:00:00 2001 +From: Zhang Le <r0bertz@gentoo.org> +Date: Thu, 12 Mar 2009 02:24:34 +0800 +Subject: [PATCH 2/2] xulrunner mips n32 ABI patch + +Signed-off-by: Zhang Le <r0bertz@gentoo.org> +--- + xpcom/reflect/xptcall/src/md/unix/Makefile.in | 5 + + .../xptcall/src/md/unix/xptcinvoke_asm_mips64.s | 159 ++++++++++++++ + .../xptcall/src/md/unix/xptcinvoke_mips64.cpp | 173 ++++++++++++++++ + .../xptcall/src/md/unix/xptcstubs_asm_mips64.s | 149 +++++++++++++ + .../xptcall/src/md/unix/xptcstubs_mips64.cpp | 218 ++++++++++++++++++++ + 5 files changed, 704 insertions(+), 0 deletions(-) + create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips64.s + create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips64.cpp + create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips64.s + create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp + +diff --git a/xpcom/reflect/xptcall/src/md/unix/Makefile.in b/xpcom/reflect/xptcall/src/md/unix/Makefile.in +index 524174e..63586cf 100644 +--- a/xpcom/reflect/xptcall/src/md/unix/Makefile.in ++++ b/xpcom/reflect/xptcall/src/md/unix/Makefile.in +@@ -274,8 +274,13 @@ endif + + ifeq ($(OS_ARCH),Linux) + ifneq (,$(findstring mips, $(OS_TEST))) ++ifneq (,$(findstring mips64, $(OS_TEST))) ++CPPSRCS := xptcinvoke_mips64.cpp xptcstubs_mips64.cpp ++ASFILES := xptcinvoke_asm_mips64.s xptcstubs_asm_mips64.s ++else + CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp + ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s ++endif + ASFLAGS += -I$(DIST)/include -x assembler-with-cpp + endif + endif +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips64.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips64.s +new file mode 100644 +index 0000000..f146ad8 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips64.s +@@ -0,0 +1,159 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ZHANG Le <r0bertz@gentoo.org> ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either of the GNU General Public License Version 2 or later (the "GPL"), ++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#include <sys/regdef.h> ++#include <sys/asm.h> ++ ++.text ++.globl invoke_count_words ++.globl invoke_copy_to_stack ++ ++LOCALSZ=7 # a0, a1, a2, a3, s0, ra, gp ++FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK ++ ++RAOFF=FRAMESZ-(1*SZREG) ++A0OFF=FRAMESZ-(2*SZREG) ++A1OFF=FRAMESZ-(3*SZREG) ++A2OFF=FRAMESZ-(4*SZREG) ++A3OFF=FRAMESZ-(5*SZREG) ++S0OFF=FRAMESZ-(6*SZREG) ++GPOFF=FRAMESZ-(7*SZREG) ++ ++# ++# _NS_InvokeByIndex_P(that, methodIndex, paramCount, params) ++# a0 a1 a2 a3 ++ ++NESTED(_NS_InvokeByIndex_P, FRAMESZ, ra) ++ PTR_SUBU sp, FRAMESZ ++ SETUP_GP64(GPOFF, _NS_InvokeByIndex_P) ++ ++ REG_S ra, RAOFF(sp) ++ REG_S a0, A0OFF(sp) ++ REG_S a1, A1OFF(sp) ++ REG_S a2, A2OFF(sp) ++ REG_S a3, A3OFF(sp) ++ REG_S s0, S0OFF(sp) ++ ++ # invoke_count_words(paramCount, params) ++ move a0, a2 ++ move a1, a3 ++ jal invoke_count_words ++ ++ # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, ++ # nsXPTCVariant* s, PRUint32 *reg) ++ ++ REG_L a1, A2OFF(sp) # a1 - paramCount ++ REG_L a2, A3OFF(sp) # a2 - params ++ ++ # save sp before we copy the params to the stack ++ move t0, sp ++ ++ # assume full size of 16 bytes per param to be safe ++ sll v0, 4 # 16 bytes * num params ++ subu sp, sp, v0 # make room ++ move a0, sp # a0 - param stack address ++ ++ # create temporary stack space to write int and fp regs ++ subu sp, 64 # 64 = 8 regs of 8 bytes ++ move a3, sp ++ ++ # save the old sp and save the arg stack ++ subu sp, sp, 16 ++ REG_S t0, 0(sp) ++ REG_S a0, 8(sp) ++ ++ # copy the param into the stack areas ++ jal invoke_copy_to_stack ++ ++ REG_L t3, 8(sp) # get previous a0 ++ REG_L sp, 0(sp) # get orig sp back ++ ++ REG_L a0, A0OFF(sp) # a0 - that ++ REG_L a1, A1OFF(sp) # a1 - methodIndex ++ ++ # t1 = methodIndex * pow(2, PTRLOG) ++ # (use shift instead of mult) ++ sll t1, a1, PTRLOG ++ ++ # calculate the function we need to jump to, ++ # which must then be saved in t9 ++ lw t9, 0(a0) ++ addu t9, t9, t1 ++#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ ++ lw t9, (t9) ++#else /* not G++ V3 ABI */ ++ lw t9, 2*PTRSIZE(t9) ++#endif /* G++ V3 ABI */ ++ ++ # get register save area from invoke_copy_to_stack ++ subu t1, t3, 64 ++ ++ # a1..a7 and f13..f19 should now be set to what ++ # invoke_copy_to_stack told us. skip a0 and f12 ++ # because that's the "this" pointer ++ ++ REG_L a1, 0(t1) ++ REG_L a2, 8(t1) ++ REG_L a3, 16(t1) ++ REG_L a4, 24(t1) ++ REG_L a5, 32(t1) ++ REG_L a6, 40(t1) ++ REG_L a7, 48(t1) ++ ++ l.d $f13, 0(t1) ++ l.d $f14, 8(t1) ++ l.d $f15, 16(t1) ++ l.d $f16, 24(t1) ++ l.d $f17, 32(t1) ++ l.d $f18, 40(t1) ++ l.d $f19, 48(t1) ++ ++ # save away our stack pointer and create ++ # the stack pointer for the function ++ move s0, sp ++ move sp, t3 ++ ++ jalr t9 ++ ++ move sp, s0 ++ ++ RESTORE_GP64 ++ REG_L ra, RAOFF(sp) ++ REG_L s0, S0OFF(sp) ++ PTR_ADDU sp, FRAMESZ ++ j ra ++.end _NS_InvokeByIndex_P +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips64.cpp +new file mode 100644 +index 0000000..d1d1a7d +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips64.cpp +@@ -0,0 +1,173 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ZHANG Le <r0bertz@gentoo.org> ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either of the GNU General Public License Version 2 or later (the "GPL"), ++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++/* Platform specific code to invoke XPCOM methods on native objects */ ++ ++#include "xptcprivate.h" ++ ++#if (_MIPS_SIM != _ABIN32) ++#error "This code is for MIPS N32 only" ++#endif ++ ++extern "C" uint32 ++invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s) ++{ ++ return paramCount; ++} ++ ++extern "C" void ++invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, ++ nsXPTCVariant* s, PRUint64 *regs) ++{ ++#define N_ARG_REGS 7 /* 8 regs minus 1 for "this" ptr */ ++ ++ for (PRUint32 i = 0; i < paramCount; i++, s++) ++ { ++ if (s->IsPtrData()) { ++ if (i < N_ARG_REGS) ++ regs[i] = (PRUint64)s->ptr; ++ else ++ *d++ = (PRUint64)s->ptr; ++ continue; ++ } ++ switch (s->type) { ++ // ++ // signed types first ++ // ++ case nsXPTType::T_I8: ++ if (i < N_ARG_REGS) ++ ((PRInt64*)regs)[i] = s->val.i8; ++ else ++ *d++ = s->val.i8; ++ break; ++ case nsXPTType::T_I16: ++ if (i < N_ARG_REGS) ++ ((PRInt64*)regs)[i] = s->val.i16; ++ else ++ *d++ = s->val.i16; ++ break; ++ case nsXPTType::T_I32: ++ if (i < N_ARG_REGS) ++ ((PRInt64*)regs)[i] = s->val.i32; ++ else ++ *d++ = s->val.i32; ++ break; ++ case nsXPTType::T_I64: ++ if (i < N_ARG_REGS) ++ ((PRInt64*)regs)[i] = s->val.i64; ++ else ++ *d++ = s->val.i64; ++ break; ++ // ++ // unsigned types next ++ // ++ case nsXPTType::T_U8: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.u8; ++ else ++ *d++ = s->val.u8; ++ break; ++ case nsXPTType::T_U16: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.u16; ++ else ++ *d++ = s->val.u16; ++ break; ++ case nsXPTType::T_U32: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.u32; ++ else ++ *d++ = s->val.u32; ++ break; ++ case nsXPTType::T_U64: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.u64; ++ else ++ *d++ = s->val.u64; ++ break; ++ case nsXPTType::T_FLOAT: ++ if (i < N_ARG_REGS) ++ *(float*)®s[i] = s->val.f; ++ else ++ *(float*)d++ = s->val.f; ++ break; ++ case nsXPTType::T_DOUBLE: ++ if (i < N_ARG_REGS) ++ *(double*)®s[i] = s->val.d; ++ else ++ *(double*)d++ = s->val.d; ++ break; ++ case nsXPTType::T_BOOL: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.b; ++ else ++ *d++ = s->val.b; ++ break; ++ case nsXPTType::T_CHAR: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.c; ++ else ++ *d++ = s->val.c; ++ break; ++ case nsXPTType::T_WCHAR: ++ if (i < N_ARG_REGS) ++ regs[i] = s->val.wc; ++ else ++ *d++ = s->val.wc; ++ break; ++ default: ++ // all the others are plain pointer types ++ if (i < N_ARG_REGS) ++ regs[i] = (PRUint64)s->val.p; ++ else ++ *d++ = (PRUint64)s->val.p; ++ break; ++ } ++ } ++} ++ ++extern "C" nsresult _NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, ++ PRUint32 paramCount, ++ nsXPTCVariant* params); ++ ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, ++ PRUint32 paramCount, nsXPTCVariant* params) ++{ ++ return _NS_InvokeByIndex_P(that, methodIndex, paramCount, params); ++} +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips64.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips64.s +new file mode 100644 +index 0000000..dfee24b +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips64.s +@@ -0,0 +1,149 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ZHANG Le <r0bertz@gentoo.org> ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either of the GNU General Public License Version 2 or later (the "GPL"), ++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++#include <sys/regdef.h> ++#include <sys/asm.h> ++ ++LOCALSZ=16 ++FRAMESZ=(((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK ++ ++A1OFF=FRAMESZ-(9*SZREG) ++A2OFF=FRAMESZ-(8*SZREG) ++A3OFF=FRAMESZ-(7*SZREG) ++A4OFF=FRAMESZ-(6*SZREG) ++A5OFF=FRAMESZ-(5*SZREG) ++A6OFF=FRAMESZ-(4*SZREG) ++A7OFF=FRAMESZ-(3*SZREG) ++GPOFF=FRAMESZ-(2*SZREG) ++RAOFF=FRAMESZ-(1*SZREG) ++ ++F13OFF=FRAMESZ-(16*SZREG) ++F14OFF=FRAMESZ-(15*SZREG) ++F15OFF=FRAMESZ-(14*SZREG) ++F16OFF=FRAMESZ-(13*SZREG) ++F17OFF=FRAMESZ-(12*SZREG) ++F18OFF=FRAMESZ-(11*SZREG) ++F19OFF=FRAMESZ-(10*SZREG) ++ ++#define SENTINEL_ENTRY(n) /* defined in cpp file, not here */ ++ ++#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ ++#define STUB_ENTRY(x) \ ++ .if x < 10; \ ++ MAKE_STUB(x, _ZN14nsXPTCStubBase5Stub ##x ##Ev); \ ++ .elseif x < 100; \ ++ MAKE_STUB(x, _ZN14nsXPTCStubBase6Stub ##x ##Ev); \ ++ .elseif x < 1000; \ ++ MAKE_STUB(x, _ZN14nsXPTCStubBase7Stub ##x ##Ev); \ ++ .else; \ ++ .err; \ ++ .endif ++#else /* not G++ V3 ABI */ ++#define STUB_ENTRY(x) \ ++ MAKE_STUB(x, Stub ##x ##__14nsXPTCStubBase) ++#endif /* G++ V3 ABI */ ++ ++#define MAKE_STUB(x, name) \ ++ .globl name; \ ++ .type name,@function; \ ++ .aent name,0; \ ++name:; \ ++ PTR_SUBU sp,FRAMESZ; \ ++ SETUP_GP64(GPOFF, name); \ ++ li t0,x; \ ++ b sharedstub; \ ++ ++# ++# open a dummy frame for the function entries ++# ++ .text ++ .align 2 ++ .type dummy,@function ++ .ent dummy, 0 ++dummy: ++ .frame sp, FRAMESZ, ra ++ .mask 0x90000FF0, RAOFF-FRAMESZ ++ .fmask 0x000FF000, F19OFF-FRAMESZ ++ ++#include "xptcstubsdef.inc" ++ ++sharedstub: ++ ++ REG_S a1, A1OFF(sp) ++ REG_S a2, A2OFF(sp) ++ REG_S a3, A3OFF(sp) ++ REG_S a4, A4OFF(sp) ++ REG_S a5, A5OFF(sp) ++ REG_S a6, A6OFF(sp) ++ REG_S a7, A7OFF(sp) ++ REG_S ra, RAOFF(sp) ++ ++ s.d $f13, F13OFF(sp) ++ s.d $f14, F14OFF(sp) ++ s.d $f15, F15OFF(sp) ++ s.d $f16, F16OFF(sp) ++ s.d $f17, F17OFF(sp) ++ s.d $f18, F18OFF(sp) ++ s.d $f19, F19OFF(sp) ++ ++ # t0 is methodIndex ++ move a1, t0 ++ ++ # a2 is stack address where extra function params ++ # are stored that do not fit in registers ++ move a2, sp ++ addi a2, FRAMESZ ++ ++ # a3 is stack address of a1..a7 ++ move a3, sp ++ addi a3, A1OFF ++ ++ # a4 is stack address of f13..f19 ++ move a4, sp ++ addi a4, F13OFF ++ ++ # PrepareAndDispatch(that, methodIndex, args, gprArgs, fpArgs) ++ # a0 a1 a2 a3 a4 ++ # ++ jal PrepareAndDispatch ++ ++ REG_L ra, RAOFF(sp) ++ RESTORE_GP64 ++ ++ PTR_ADDU sp, FRAMESZ ++ j ra ++ END(dummy) +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp +new file mode 100644 +index 0000000..c404065 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp +@@ -0,0 +1,218 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1999 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ZHANG Le <r0bertz@gentoo.org> ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either of the GNU General Public License Version 2 or later (the "GPL"), ++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "xptcprivate.h" ++#include "xptiprivate.h" ++ ++#if (_MIPS_SIM != _ABIN32) ++#error "This code is for MIPS N32 only" ++#endif ++ ++/* ++ * This is for MIPS N32 ABI ++ * ++ * When we're called, the "gp" registers are stored in gprData and ++ * the "fp" registers are stored in fprData. There are 8 regs ++ * available which coorespond to the first 7 parameters of the ++ * function and the "this" pointer. If there are additional parms, ++ * they are stored on the stack at address "args". ++ * ++ */ ++extern "C" nsresult ++PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint64* args, ++ PRUint64 *gprData, double *fprData) ++{ ++#define PARAM_BUFFER_COUNT 16 ++#define PARAM_GPR_COUNT 7 ++#define PARAM_FPR_COUNT 7 ++ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ const nsXPTMethodInfo* info; ++ PRUint8 paramCount; ++ PRUint8 i; ++ nsresult result = NS_ERROR_FAILURE; ++ ++ NS_ASSERTION(self,"no self"); ++ ++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); ++ NS_ASSERTION(info,"no method info"); ++ ++ paramCount = info->GetParamCount(); ++ ++ // setup variant array pointer ++ if(paramCount > PARAM_BUFFER_COUNT) ++ dispatchParams = new nsXPTCMiniVariant[paramCount]; ++ else ++ dispatchParams = paramBuffer; ++ NS_ASSERTION(dispatchParams,"no place for params"); ++ ++ PRUint64* ap = args; ++ PRUint32 iCount = 0; ++ for(i = 0; i < paramCount; i++) ++ { ++ const nsXPTParamInfo& param = info->GetParam(i); ++ const nsXPTType& type = param.GetType(); ++ nsXPTCMiniVariant* dp = &dispatchParams[i]; ++ ++ if(param.IsOut() || !type.IsArithmetic()) ++ { ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.p = (void*)gprData[iCount++]; ++ else ++ dp->val.p = (void*)*ap++; ++ continue; ++ } ++ // else ++ switch(type) ++ { ++ case nsXPTType::T_I8: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.i8 = (PRInt8)gprData[iCount++]; ++ else ++ dp->val.i8 = (PRInt8)*ap++; ++ break; ++ ++ case nsXPTType::T_I16: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.i16 = (PRInt16)gprData[iCount++]; ++ else ++ dp->val.i16 = (PRInt16)*ap++; ++ break; ++ ++ case nsXPTType::T_I32: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.i32 = (PRInt32)gprData[iCount++]; ++ else ++ dp->val.i32 = (PRInt32)*ap++; ++ break; ++ ++ case nsXPTType::T_I64: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.i64 = (PRInt64)gprData[iCount++]; ++ else ++ dp->val.i64 = (PRInt64)*ap++; ++ break; ++ ++ case nsXPTType::T_U8: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.u8 = (PRUint8)gprData[iCount++]; ++ else ++ dp->val.u8 = (PRUint8)*ap++; ++ break; ++ ++ case nsXPTType::T_U16: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.u16 = (PRUint16)gprData[iCount++]; ++ else ++ dp->val.u16 = (PRUint16)*ap++; ++ break; ++ ++ case nsXPTType::T_U32: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.u32 = (PRUint32)gprData[iCount++]; ++ else ++ dp->val.u32 = (PRUint32)*ap++; ++ break; ++ ++ case nsXPTType::T_U64: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.u64 = (PRUint64)gprData[iCount++]; ++ else ++ dp->val.u64 = (PRUint64)*ap++; ++ break; ++ ++ case nsXPTType::T_FLOAT: ++ if (iCount < PARAM_FPR_COUNT) ++ dp->val.f = (double)fprData[iCount++]; ++ else ++ dp->val.f = *((double*)ap++); ++ break; ++ ++ case nsXPTType::T_DOUBLE: ++ if (iCount < PARAM_FPR_COUNT) ++ dp->val.d = (double)fprData[iCount++]; ++ else ++ dp->val.d = *((double*)ap++); ++ break; ++ ++ case nsXPTType::T_BOOL: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.b = (PRBool)gprData[iCount++]; ++ else ++ dp->val.b = (PRBool)*ap++; ++ break; ++ ++ case nsXPTType::T_CHAR: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.c = (char)gprData[iCount++]; ++ else ++ dp->val.c = (char)*ap++; ++ break; ++ ++ case nsXPTType::T_WCHAR: ++ if (iCount < PARAM_GPR_COUNT) ++ dp->val.wc = (wchar_t)gprData[iCount++]; ++ else ++ dp->val.wc = (wchar_t)*ap++; ++ break; ++ ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams); ++ ++ if(dispatchParams != paramBuffer) ++ delete [] dispatchParams; ++ ++ return result; ++} ++ ++#define STUB_ENTRY(n) /* defined in the assembly file */ ++ ++#define SENTINEL_ENTRY(n) \ ++nsresult nsXPTCStubBase::Sentinel##n() \ ++{ \ ++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ ++ return NS_ERROR_NOT_IMPLEMENTED; \ ++} ++ ++#include "xptcstubsdef.inc" +-- +1.6.2 + diff --git a/net-libs/xulrunner/files/xulrunner-chromium-mips.patch b/net-libs/xulrunner/files/xulrunner-chromium-mips.patch new file mode 100644 index 0000000..b6153eb --- /dev/null +++ b/net-libs/xulrunner/files/xulrunner-chromium-mips.patch @@ -0,0 +1,205 @@ +diff --git a/ipc/chromium/src/base/atomicops.h b/ipc/chromium/src/base/atomicops.h +index 87df918..363bf63 100644 +--- a/ipc/chromium/src/base/atomicops.h ++++ b/ipc/chromium/src/base/atomicops.h +@@ -132,6 +132,8 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); + #include "base/atomicops_internals_x86_gcc.h" + #elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY) + #include "base/atomicops_internals_arm_gcc.h" ++#elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY) ++#include "base/atomicops_internals_mips_gcc.h" + #else + #error "Atomic operations are not supported on your platform" + #endif +diff --git a/ipc/chromium/src/base/atomicops_internals_mips_gcc.h b/ipc/chromium/src/base/atomicops_internals_mips_gcc.h +new file mode 100644 +index 0000000..d1b87ee +--- /dev/null ++++ b/ipc/chromium/src/base/atomicops_internals_mips_gcc.h +@@ -0,0 +1,160 @@ ++// Copyright (c) 2010 Zhang, Le <r0bertz@gentoo.org> ++// Use of this source code is governed by GPLv2. ++ ++// This file is an internal atomic implementation, use base/atomicops.h instead. ++ ++#ifndef BASE_ATOMICOPS_INTERNALS_MIPS_GCC_H_ ++#define BASE_ATOMICOPS_INTERNALS_MIPS_GCC_H_ ++ ++#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory") ++ ++namespace base { ++namespace subtle { ++ ++// 32-bit low-level operations on any platform. ++ ++inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, ++ Atomic32 old_value, ++ Atomic32 new_value) { ++ Atomic32 prev; ++ __asm__ __volatile__( ++ " .set push \n" ++ " .set noat \n" ++ " .set mips3 \n" ++ "1: ll %0, %2 \n" ++ " bne %0, %z3, 2f \n" ++ " .set mips0 \n" ++ " move $1, %z4 \n" ++ " .set mips3 \n" ++ " sc $1, %1 \n" ++ " beqz $1, 3f \n" ++ "2: \n" ++ " .subsection 2 \n" ++ "3: b 1b \n" ++ " .previous \n" ++ " .set pop \n" ++ : "=&r" (prev), "=R" (*ptr) ++ : "R" (*ptr), "Jr" (old_value), "Jr" (new_value) ++ : "memory"); ++ return prev; ++} ++ ++inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, ++ Atomic32 new_value) { ++ unsigned int ret_value; ++ unsigned long dummy; ++ ++ __asm__ __volatile__(" .set mips3 \n" ++ "1: ll %0, %3 # xchg_u32 \n" ++ " .set mips0 \n" ++ " move %2, %z4 \n" ++ " .set mips3 \n" ++ " sc %2, %1 \n" ++ " beqz %2, 2f \n" ++ " .subsection 2 \n" ++ "2: b 1b \n" ++ " .previous \n" ++ " .set mips0 \n" ++ : "=&r" (ret_value), "=m" (*ptr), "=&r" (dummy) ++ : "R" (*ptr), "Jr" (new_value) ++ : "memory"); ++ ++ return ret_value; // Now it's the previous value. ++} ++ ++inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, ++ Atomic32 increment) { ++ Atomic32 temp, result; ++ __asm__ __volatile__( ++ " .set mips3 \n" ++ "1: ll %1, %2 # atomic_add_return \n" ++ " addu %0, %1, %3 \n" ++ " sc %0, %2 \n" ++ " beqz %0, 2f \n" ++ " addu %0, %1, %3 \n" ++ " .subsection 2 \n" ++ "2: b 1b \n" ++ " .previous \n" ++ " .set mips0 \n" ++ : "=&r" (result), "=&r" (temp), "=m" (*ptr) ++ : "Ir" (increment), "m" (*ptr) ++ : "memory"); ++ return result; ++} ++ ++inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, ++ Atomic32 increment) { ++ Atomic32 temp, result; ++ __asm__ __volatile__( ++ " .set mips3 \n" ++ "1: ll %1, %2 # atomic_add_return \n" ++ " addu %0, %1, %3 \n" ++ " sc %0, %2 \n" ++ " beqz %0, 2f \n" ++ " addu %0, %1, %3 \n" ++ " .subsection 2 \n" ++ "2: b 1b \n" ++ " .previous \n" ++ " .set mips0 \n" ++ : "=&r" (result), "=&r" (temp), "=m" (*ptr) ++ : "Ir" (increment), "m" (*ptr) ++ : "memory"); ++ __asm__ __volatile__("sync" : : : "memory"); ++ return result; ++} ++ ++inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, ++ Atomic32 old_value, ++ Atomic32 new_value) { ++ Atomic32 x = NoBarrier_CompareAndSwap(ptr, old_value, new_value); ++ __asm__ __volatile__("sync" : : : "memory"); ++ return x; ++} ++ ++inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, ++ Atomic32 old_value, ++ Atomic32 new_value) { ++ return NoBarrier_CompareAndSwap(ptr, old_value, new_value); ++} ++ ++inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { ++ *ptr = value; ++} ++ ++inline void MemoryBarrier() { ++ __asm__ __volatile__("sync" : : : "memory"); ++} ++ ++inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) { ++ *ptr = value; ++ __asm__ __volatile__("sync" : : : "memory"); ++} ++ ++inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) { ++ ATOMICOPS_COMPILER_BARRIER(); ++ *ptr = value; // An x86 store acts as a release barrier. ++ // See comments in Atomic64 version of Release_Store(), below. ++} ++ ++inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { ++ return *ptr; ++} ++ ++inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) { ++ Atomic32 value = *ptr; // An x86 load acts as a acquire barrier. ++ // See comments in Atomic64 version of Release_Store(), below. ++ ATOMICOPS_COMPILER_BARRIER(); ++ return value; ++} ++ ++inline Atomic32 Release_Load(volatile const Atomic32* ptr) { ++ MemoryBarrier(); ++ return *ptr; ++} ++ ++} // namespace base::subtle ++} // namespace base ++ ++#undef ATOMICOPS_COMPILER_BARRIER ++ ++#endif // BASE_ATOMICOPS_INTERNALS_MIPS_GCC_H_ +diff --git a/ipc/chromium/src/base/debug_util_posix.cc b/ipc/chromium/src/base/debug_util_posix.cc +index f7c58b4..50fb41d 100644 +--- a/ipc/chromium/src/base/debug_util_posix.cc ++++ b/ipc/chromium/src/base/debug_util_posix.cc +@@ -108,7 +108,7 @@ bool DebugUtil::BeingDebugged() { + + // static + void DebugUtil::BreakDebugger() { +-#if !defined(ARCH_CPU_ARM_FAMILY) ++#if !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) + asm ("int3"); + #endif + } +diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h +index 36f83e7..128bbc7 100644 +--- a/ipc/chromium/src/build/build_config.h ++++ b/ipc/chromium/src/build/build_config.h +@@ -57,6 +57,8 @@ + #define ARCH_CPU_ARMEL 1 + #define ARCH_CPU_32_BITS 1 + #define WCHAR_T_IS_UNSIGNED 1 ++#elif defined(__MIPSEL__) ++#define ARCH_CPU_MIPS_FAMILY 1 + #else + #error Please add support for your architecture in build/build_config.h + #endif diff --git a/net-libs/xulrunner/xulrunner-1.9.3_alpha2-r1.ebuild b/net-libs/xulrunner/xulrunner-1.9.3_alpha2-r1.ebuild new file mode 100644 index 0000000..37976af --- /dev/null +++ b/net-libs/xulrunner/xulrunner-1.9.3_alpha2-r1.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/xulrunner/xulrunner-1.9.2.ebuild,v 1.2 2010/01/22 13:43:38 anarchy Exp $ + +EAPI="2" +WANT_AUTOCONF="2.1" + +inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib java-pkg-opt-2 autotools + +MY_PV="${PV/_alpha/a}" +MY_PV="${MY_PV/1.9.3/3.7}" +MAJ_PV="1.9.3" # from mozilla-* branch name +PATCH="${PN}-1.9.3-patches-0.1" + +DESCRIPTION="Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications" +HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner" +SRC_URI="http://dev.gentoo.org/~anarchy/dist/firefox-${MY_PV}.source.tar.bz2 + http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +SLOT="1.9" +LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" +IUSE="+alsa debug libnotify system-sqlite wifi" + +RDEPEND="java? ( >=virtual/jre-1.4 ) + >=dev-lang/python-2.3[threads] + >=sys-devel/binutils-2.16.1 + >=dev-libs/nss-3.12.6_beta + >=dev-libs/nspr-4.8 + system-sqlite? ( >=dev-db/sqlite-3.6.20-r1[fts3,secure-delete] ) + alsa? ( media-libs/alsa-lib ) + >=app-text/hunspell-1.2 + >=media-libs/lcms-1.17 + >=x11-libs/cairo-1.8.8[X] + x11-libs/pango[X] + x11-libs/libXt + wifi? ( net-wireless/wireless-tools ) + libnotify? ( >=x11-libs/libnotify-0.4 )" + +DEPEND="java? ( >=virtual/jdk-1.4 ) + ${RDEPEND} + dev-util/pkgconfig" + +S="${WORKDIR}/mozilla-${MAJ_PV}" + +pkg_setup() { + # Ensure we always build with C locale. + export LANG="C" + export LC_ALL="C" + export LC_MESSAGES="C" + export LC_CTYPE="C" + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + # Apply our patches + EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + epatch "${WORKDIR}" + + # Same as in config/autoconf.mk.in + MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}" + SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk" + + if use mips; then + epatch "${FILESDIR}"/${P}-mips-n32.patch + epatch "${FILESDIR}"/${P}-mips-bus-error.patch + epatch "${FILESDIR}"/${PN}-chromium-mips.patch + fi + # Gentoo install dirs + sed -i -e "s:@PV@:${MAJ_PV}:" "${S}"/config/autoconf.mk.in \ + || die "${MAJ_PV} sed failed!" + + # Enable gnomebreakpad + if use debug ; then + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ + "${S}"/build/unix/run-mozilla.sh || die "sed failed!" + fi + + eautoreconf + + cd js/src + eautoreconf +} + +src_configure() { + #################################### + # + # mozconfig, CFLAGS and CXXFLAGS setup + # + #################################### + + mozconfig_init + mozconfig_config + + MEXTENSIONS="default" + + MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}" + + # It doesn't compile on alpha without this LDFLAGS + use alpha && append-ldflags "-Wl,--no-relax" + + mozconfig_annotate '' --with-default-mozilla-five-home="${MOZLIBDIR}" + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" + mozconfig_annotate '' --enable-application=xulrunner + mozconfig_annotate '' --disable-mailnews + mozconfig_annotate 'broken' --disable-crashreporter + mozconfig_annotate '' --enable-image-encoder=all + mozconfig_annotate '' --enable-canvas + mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2 + # Bug 60668: Galeon doesn't build without oji enabled, so enable it + # regardless of java setting. + mozconfig_annotate '' --enable-oji --enable-mathml + mozconfig_annotate 'places' --enable-storage --enable-places + mozconfig_annotate '' --enable-safe-browsing + + # Build mozdevelop permately + mozconfig_annotate '' --enable-jsd --enable-xpctools + + # System-wide install specs + mozconfig_annotate '' --disable-installer + mozconfig_annotate '' --disable-updater + mozconfig_annotate '' --disable-strip + mozconfig_annotate '' --disable-install-strip + + # Use system libraries + mozconfig_annotate '' --enable-system-cairo + mozconfig_annotate '' --enable-system-hunspell + mozconfig_annotate '' --with-system-nspr + mozconfig_annotate '' --with-system-nss + mozconfig_annotate '' --enable-system-lcms + mozconfig_annotate '' --with-system-bz2 + + mozconfig_use_enable libnotify + mozconfig_use_enable java javaxpcom + mozconfig_use_enable wifi necko-wifi + mozconfig_use_enable alsa ogg + mozconfig_use_enable alsa wave + mozconfig_use_enable system-sqlite + + # Debug + if use debug ; then + mozconfig_annotate 'debug' --disable-optimize + mozconfig_annotate 'debug' --enable-debug=-ggdb + mozconfig_annotate 'debug' --enable-debug-modules=all + mozconfig_annotate 'debug' --enable-debugger-info-modules + fi + + # Finalize and report settings + mozconfig_final + + if [[ $(gcc-major-version) -lt 4 ]]; then + append-flags -fno-stack-protector + fi + + #################################### + # + # Configure and build + # + #################################### + + # Disable no-print-directory + MAKEOPTS=${MAKEOPTS/--no-print-directory/} + + # Ensure that are plugins dir is enabled as default + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" + + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + rm "${D}"/usr/bin/xulrunner + + MOZLIBDIR="/usr/$(get_libdir)/${PN}-${MAJ_PV}" + SDKDIR="/usr/$(get_libdir)/${PN}-devel-${MAJ_PV}/sdk" + + dodir /usr/bin + dosym "${MOZLIBDIR}/xulrunner" "/usr/bin/xulrunner-${MAJ_PV}" || die + + # env.d file for ld search path + dodir /etc/env.d + echo "LDPATH=${MOZLIBDIR}" > "${D}"/etc/env.d/08xulrunner || die "env.d failed" + + # Add our defaults to xulrunner and out of firefox + cp "${FILESDIR}"/xulrunner-default-prefs.js \ + "${D}/${MOZLIBDIR}/defaults/pref/all-gentoo.js" || \ + die "failed to cp xulrunner-default-prefs.js" + + if use java ; then + java-pkg_regjar "${D}/${MOZLIBDIR}/javaxpcom.jar" + java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaGlue.jar" + java-pkg_regjar "${D}/${SDKDIR}/lib/MozillaInterfaces.jar" + fi +} + +pkg_postinst() { + ewarn "If firefox fails to start with \"failed to load xpcom\", run revdep-rebuild" + ewarn "If that does not fix the problem, rebuild dev-libs/nss" + ewarn "Try dev-util/lafilefixer if you get build failures related to .la files" + + einfo + einfo "All prefs can be overridden by the user. The preferences are to make" + einfo "use of xulrunner out of the box on an average system without the user" + einfo "having to go through and enable the basics." + + einfo + ewarn "Any package that requires xulrunner:1.9 slot could and most likely will" + ewarn "have issues. These issues should be reported to maintainer, and mozilla herd" + ewarn "should be cc'd on the bug report. Thank you anarchy@gentoo.org ." +} |