diff options
author | peter <peter@FreeBSD.org> | 2003-12-14 05:35:43 +0800 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-12-14 05:35:43 +0800 |
commit | be02488d8a7b21883a26467eb22b3456a55c8bef (patch) | |
tree | 1a03d735358e121ab3d2151a8894ded70f6d156b /www/firefox | |
parent | 351a2e902c45c4c07de9f3b6f93ba6b17ec762c0 (diff) | |
download | freebsd-ports-gnome-be02488d8a7b21883a26467eb22b3456a55c8bef.tar.gz freebsd-ports-gnome-be02488d8a7b21883a26467eb22b3456a55c8bef.tar.zst freebsd-ports-gnome-be02488d8a7b21883a26467eb22b3456a55c8bef.zip |
Port to amd64 (note: needs ld-elf.so.1 bugfix to actually work)
I've taken a chance and split the sparc64 and alpha mega-diffs up because
sparc64 patched the result of alpha's patches, and amd64 needed to do the
same again - but it was sorted lexically before alpha/sparc64. I've
grouped the xptcall patches together since they are standalone and split
up and merged the other infrastructure jumbo-patches.
I also attempted to sync up the nspr vs firebird diffs for sparc64 and
alpha because they disagreed. HOWEVER... While this port 'depends'
on the nspr port, it doesn't actually *use* it. It should probably
be removed from the LIB_DEPENDS list.
Note that the amd64 xptcall code came from SuSE via the mozilla bugzilla
database.
Diffstat (limited to 'www/firefox')
-rw-r--r-- | www/firefox/Makefile | 2 | ||||
-rw-r--r-- | www/firefox/files/patch-config-mkdepend-imakemdep.h | 10 | ||||
-rw-r--r-- | www/firefox/files/patch-config-rules.mk | 14 | ||||
-rw-r--r-- | www/firefox/files/patch-directory-c-sdk-ldap-libraries-liblber-lber-int.h | 30 | ||||
-rw-r--r-- | www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.cfg | 158 | ||||
-rw-r--r-- | www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.h | 13 | ||||
-rw-r--r-- | www/firefox/files/patch-nsprpub-pr-src-io-prprf.c | 12 | ||||
-rw-r--r-- | www/firefox/files/patch-security-coreconf-FreeBSD.mk | 12 | ||||
-rw-r--r-- | www/firefox/files/patch-sparc64 | 69 | ||||
-rw-r--r-- | www/firefox/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in | 45 | ||||
-rw-r--r-- | www/firefox/files/patch-xptcall-alpha (renamed from www/firefox/files/patch-alpha) | 33 | ||||
-rw-r--r-- | www/firefox/files/patch-xptcall-amd64 | 386 | ||||
-rw-r--r-- | www/firefox/files/patch-xptcall-sparc64 | 18 |
13 files changed, 680 insertions, 122 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 9b017fcc997e..e165160248dc 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -43,8 +43,6 @@ LOCAL_PREFIX= ${PREFIX}/${LOCAL_SUBDIR} JREDIR= ${LOCALBASE}/jdk1.3.1/jre PLUGINSDIR= ${PREFIX}/lib/browser_plugins -NOT_FOR_ARCHS= amd64 - .include <bsd.port.pre.mk> #.if ${PERL_LEVEL} < 500601 diff --git a/www/firefox/files/patch-config-mkdepend-imakemdep.h b/www/firefox/files/patch-config-mkdepend-imakemdep.h new file mode 100644 index 000000000000..b688e664475d --- /dev/null +++ b/www/firefox/files/patch-config-mkdepend-imakemdep.h @@ -0,0 +1,10 @@ +--- config/mkdepend/imakemdep.h Fri Sep 4 21:22:25 1998 ++++ config/mkdepend/imakemdep.h Thu Oct 16 22:43:25 2003 +@@ -278,4 +278,7 @@ + "-D__i386__", + # endif ++# if defined(__amd64__) || defined(__x86_64__) ++ "-D__amd64__ -D__x86_64__", ++# endif + # ifdef __GNUC__ + "-traditional", diff --git a/www/firefox/files/patch-config-rules.mk b/www/firefox/files/patch-config-rules.mk new file mode 100644 index 000000000000..aa586a3bca82 --- /dev/null +++ b/www/firefox/files/patch-config-rules.mk @@ -0,0 +1,14 @@ +--- config/rules.mk.orig Mon May 5 21:04:55 2003 ++++ config/rules.mk Tue May 27 01:33:11 2003 +@@ -444,7 +444,11 @@ + + ifeq ($(OS_ARCH),FreeBSD) + ifdef IS_COMPONENT ++ifneq (,$(filter alpha,$(OS_TEST))) ++EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc ++else + EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic ++endif + endif + endif + diff --git a/www/firefox/files/patch-directory-c-sdk-ldap-libraries-liblber-lber-int.h b/www/firefox/files/patch-directory-c-sdk-ldap-libraries-liblber-lber-int.h new file mode 100644 index 000000000000..edc10f32f824 --- /dev/null +++ b/www/firefox/files/patch-directory-c-sdk-ldap-libraries-liblber-lber-int.h @@ -0,0 +1,30 @@ +--- directory/c-sdk/ldap/libraries/liblber/lber-int.h Tue Mar 26 13:53:23 2002 ++++ directory/c-sdk/ldap/libraries/liblber/lber-int.h Sat Dec 13 13:02:49 2003 +@@ -236,15 +236,15 @@ + (((_l)&0xff0000)>>8) + (((_l)&0xff000000)>>24)) + #define LBER_NTOHL(_l) LBER_HTONL(_l) + +-#elif !defined(__alpha) || defined(VMS) ++#elif !defined(__amd64__) && (!defined(__alpha) || defined(VMS)) + + #define LBER_HTONL( l ) htonl( l ) + #define LBER_NTOHL( l ) ntohl( l ) + + #else /* __alpha */ + /* +- * htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the +- * lower-order 32-bits of a (64-bit) long, so we define correct versions ++ * htonl and ntohl on the 64 bit UNIX platforms only swap the lower-order ++ * 32-bits of a (64-bit) long, so we define correct versions + * here. + */ + #define LBER_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \ +@@ -252,7 +252,7 @@ + + #define LBER_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \ + | ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 )) +-#endif /* __alpha */ ++#endif /* __alpha || __amd64__ */ + + + /* function prototypes */ diff --git a/www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.cfg b/www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.cfg new file mode 100644 index 000000000000..a2aa9f4b4432 --- /dev/null +++ b/www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.cfg @@ -0,0 +1,158 @@ +--- nsprpub/pr/include/md/_freebsd.cfg Wed Jan 2 18:38:25 2002 ++++ nsprpub/pr/include/md/_freebsd.cfg Sat Dec 13 13:02:49 2003 +@@ -91,7 +91,7 @@ + #define PR_ALIGN_OF_DOUBLE 4 + #define PR_ALIGN_OF_POINTER 4 + +-#elif defined(__alpha) ++#elif defined(__alpha__) + + #define IS_LITTLE_ENDIAN 1 + #undef IS_BIG_ENDIAN +@@ -138,6 +138,146 @@ + #define PR_ALIGN_OF_DOUBLE 8 + #define PR_ALIGN_OF_POINTER 8 + ++#elif defined(__sparc64__) ++#undef IS_LITTLE_ENDIAN ++#define IS_BIG_ENDIAN 1 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_POINTER 8 ++ ++#define HAVE_LONG_LONG ++#define HAVE_ALIGNED_DOUBLES ++#define HAVE_ALIGNED_LONGLONGS ++ ++#elif defined(__ia64__) ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#elif defined(__amd64__) ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#define HAVE_LONG_LONG ++#define HAVE_ALIGNED_DOUBLES ++#define HAVE_ALIGNED_LONGLONGS + #else + + #error "Unknown CPU architecture" diff --git a/www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.h b/www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.h new file mode 100644 index 000000000000..7d4af1cea2b7 --- /dev/null +++ b/www/firefox/files/patch-nsprpub-pr-include-md-_freebsd.h @@ -0,0 +1,13 @@ +--- nsprpub/pr/include/md/_freebsd.h Thu Jan 16 15:09:12 2003 ++++ nsprpub/pr/include/md/_freebsd.h Sat Dec 13 13:02:49 2003 +@@ -48,6 +48,10 @@ + #define _PR_SI_ARCHITECTURE "x86" + #elif defined(__alpha) + #define _PR_SI_ARCHITECTURE "alpha" ++#elif defined(__sparc__) ++#define _PR_SI_ARCHITECTURE "sparc" ++#elif defined(__amd64__) ++#define _PR_SI_ARCHITECTURE "amd64" + #else + #error "Unknown CPU architecture" + #endif diff --git a/www/firefox/files/patch-nsprpub-pr-src-io-prprf.c b/www/firefox/files/patch-nsprpub-pr-src-io-prprf.c new file mode 100644 index 000000000000..8c48ad1e08fb --- /dev/null +++ b/www/firefox/files/patch-nsprpub-pr-src-io-prprf.c @@ -0,0 +1,12 @@ +--- nsprpub/pr/src/io/prprf.c Wed Feb 26 15:53:42 2003 ++++ nsprpub/pr/src/io/prprf.c Thu Oct 16 22:50:40 2003 +@@ -52,5 +52,8 @@ + ** and requires array notation. + */ +-#if (defined(LINUX) && defined(__powerpc__)) || \ ++#if defined(__amd64__) ++#include <stdarg.h> ++#define VARARGS_ASSIGN(foo, bar) va_copy((foo), (bar)) ++#elif (defined(LINUX) && defined(__powerpc__)) || \ + (defined(LINUX) && defined(__s390__)) || \ + (defined(LINUX) && defined(__s390x__)) || \ diff --git a/www/firefox/files/patch-security-coreconf-FreeBSD.mk b/www/firefox/files/patch-security-coreconf-FreeBSD.mk new file mode 100644 index 000000000000..4f6bccff7cec --- /dev/null +++ b/www/firefox/files/patch-security-coreconf-FreeBSD.mk @@ -0,0 +1,12 @@ +--- security/coreconf/FreeBSD.mk Thu Oct 16 23:03:47 2003 ++++ security/coreconf/FreeBSD.mk Thu Oct 16 22:53:11 2003 +@@ -44,5 +44,9 @@ + CPU_ARCH = alpha + else ++ifeq ($(OS_TEST),amd64) ++CPU_ARCH = amd64 ++else + CPU_ARCH = x86 ++endif + endif + diff --git a/www/firefox/files/patch-sparc64 b/www/firefox/files/patch-sparc64 deleted file mode 100644 index b9cb83058235..000000000000 --- a/www/firefox/files/patch-sparc64 +++ /dev/null @@ -1,69 +0,0 @@ -diff -ru ./nsprpub/pr/include/md/_freebsd.cfg ../../work~/mozilla/nsprpub/pr/include/md/_freebsd.cfg ---- ./nsprpub/pr/include/md/_freebsd.cfg Wed Jan 2 18:38:25 2002 -+++ ../../work~/mozilla/nsprpub/pr/include/md/_freebsd.cfg Tue May 20 21:27:31 2003 -@@ -138,6 +138,53 @@ - #define PR_ALIGN_OF_DOUBLE 8 - #define PR_ALIGN_OF_POINTER 8 - -+#elif defined(__sparc__) -+ -+#undef IS_LITTLE_ENDIAN -+#define IS_BIG_ENDIAN 1 -+#define HAVE_LONG_LONG -+#define HAVE_ALIGNED_DOUBLES -+#define HAVE_ALIGNED_LONGLONGS -+#define IS_64 -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 8 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 8 -+#define PR_BYTES_PER_DWORD 8 -+#define PR_BYTES_PER_WORD_LOG2 3 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 64 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 64 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 6 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 6 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 8 -+#define PR_ALIGN_OF_INT64 8 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 8 -+#define PR_ALIGN_OF_POINTER 8 -+ - #else - - #error "Unknown CPU architecture" -diff -ru ./nsprpub/pr/include/md/_freebsd.h ../../work~/mozilla/nsprpub/pr/include/md/_freebsd.h ---- ./nsprpub/pr/include/md/_freebsd.h Thu Jan 16 15:09:12 2003 -+++ ../../work~/mozilla/nsprpub/pr/include/md/_freebsd.h Tue May 20 21:27:13 2003 -@@ -48,6 +48,8 @@ - #define _PR_SI_ARCHITECTURE "x86" - #elif defined(__alpha) - #define _PR_SI_ARCHITECTURE "alpha" -+#elif defined(__sparc__) -+#define _PR_SI_ARCHITECTURE "sparc" - #else - #error "Unknown CPU architecture" - #endif diff --git a/www/firefox/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/www/firefox/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in new file mode 100644 index 000000000000..a609c0d5d5e0 --- /dev/null +++ b/www/firefox/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in @@ -0,0 +1,45 @@ +--- xpcom/reflect/xptcall/src/md/unix/Makefile.in Thu Aug 14 21:00:23 2003 ++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in Sat Dec 13 13:02:49 2003 +@@ -49,6 +49,9 @@ + ifeq (86,$(findstring 86,$(OS_TEST))) + CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp + endif ++ifeq (amd64,$(OS_TEST)) ++CPPSRCS := xptcinvoke_amd64_freebsd.cpp xptcstubs_amd64_freebsd.cpp ++endif + endif + # + # New code for Linux, et. al., with gcc +@@ -106,9 +109,15 @@ + ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s + endif + # ++# FreeBSD/Alpha ++# ++ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha) ++CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp ++endif ++# + # Linux/Alpha + # +-ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) ++ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) + CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp + endif + # +@@ -294,6 +303,15 @@ + ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc) + CPPSRCS := xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp + ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s ++endif ++# ++# FreeBSD/SPARC64 ++# ++ifeq ($(OS_ARCH),FreeBSD) ++ifneq (,$(findstring sparc,$(OS_TEST))) ++CPPSRCS := xptcinvoke_sparc64_freebsd.cpp xptcstubs_sparc64_freebsd.cpp ++ASFILES := xptcinvoke_asm_sparc64_freebsd.s xptcstubs_asm_sparcv9_solaris.s ++endif + endif + # + # Solaris/SPARC diff --git a/www/firefox/files/patch-alpha b/www/firefox/files/patch-xptcall-alpha index f8c1b081c9fa..29631a98e61e 100644 --- a/www/firefox/files/patch-alpha +++ b/www/firefox/files/patch-xptcall-alpha @@ -1,36 +1,3 @@ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig Mon Jan 27 22:52:51 2003 -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in Tue May 27 01:41:12 2003 -@@ -100,9 +100,15 @@ - ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s - endif - # -+# FreeBSD/Alpha -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha) -+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp -+endif -+# - # Linux/Alpha - # --ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) -+ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp - endif - # ---- config/rules.mk.orig Mon May 5 21:04:55 2003 -+++ config/rules.mk Tue May 27 01:33:11 2003 -@@ -444,7 +444,11 @@ - - ifeq ($(OS_ARCH),FreeBSD) - ifdef IS_COMPONENT -+ifneq (,$(filter alpha,$(OS_TEST))) -+EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc -+else - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -+endif - endif - endif - --- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp.orig Tue May 27 01:37:25 2003 +++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp Tue May 27 01:37:00 2003 @@ -0,0 +1,184 @@ diff --git a/www/firefox/files/patch-xptcall-amd64 b/www/firefox/files/patch-xptcall-amd64 new file mode 100644 index 000000000000..3227cad02182 --- /dev/null +++ b/www/firefox/files/patch-xptcall-amd64 @@ -0,0 +1,386 @@ +--- /dev/null Wed Dec 31 16:00:00 1969 ++++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_amd64_freebsd.cpp Thu Oct 16 22:59:43 2003 +@@ -0,0 +1,174 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++// Platform specific code to invoke XPCOM methods on native objects ++ ++#include "xptcprivate.h" ++ ++// 6 integral parameters are passed in registers ++const PRUint32 GPR_COUNT = 6; ++ ++// 8 floating point parameters are passed in SSE registers ++const PRUint32 FPR_COUNT = 8; ++ ++// Remember that these 'words' are 64-bit long ++static inline void ++invoke_count_words(PRUint32 paramCount, nsXPTCVariant * s, ++ PRUint32 & nr_gpr, PRUint32 & nr_fpr, PRUint32 & nr_stack) ++{ ++ nr_gpr = 1; // skip one GP register for 'that' ++ nr_fpr = 0; ++ nr_stack = 0; ++ ++ /* Compute number of eightbytes of class MEMORY. */ ++ for (uint32 i = 0; i < paramCount; i++, s++) { ++ if (!s->IsPtrData() ++ && (s->type == nsXPTType::T_FLOAT || s->type == nsXPTType::T_DOUBLE)) { ++ if (nr_fpr < FPR_COUNT) ++ nr_fpr++; ++ else ++ nr_stack++; ++ } ++ else { ++ if (nr_gpr < GPR_COUNT) ++ nr_gpr++; ++ else ++ nr_stack++; ++ } ++ } ++} ++ ++static void ++invoke_copy_to_stack(PRUint64 * d, PRUint32 paramCount, nsXPTCVariant * s, ++ PRUint64 * gpregs, double * fpregs) ++{ ++ PRUint32 nr_gpr = 1; // skip one GP register for 'that' ++ PRUint32 nr_fpr = 0; ++ PRUint64 value; ++ ++ for (uint32 i = 0; i < paramCount; i++, s++) { ++ if (s->IsPtrData()) ++ value = (PRUint64) s->ptr; ++ else { ++ switch (s->type) { ++ case nsXPTType::T_FLOAT: break; ++ case nsXPTType::T_DOUBLE: break; ++ case nsXPTType::T_I8: value = s->val.i8; break; ++ case nsXPTType::T_I16: value = s->val.i16; break; ++ case nsXPTType::T_I32: value = s->val.i32; break; ++ case nsXPTType::T_I64: value = s->val.i64; break; ++ case nsXPTType::T_U8: value = s->val.u8; break; ++ case nsXPTType::T_U16: value = s->val.u16; break; ++ case nsXPTType::T_U32: value = s->val.u32; break; ++ case nsXPTType::T_U64: value = s->val.u64; break; ++ case nsXPTType::T_BOOL: value = s->val.b; break; ++ case nsXPTType::T_CHAR: value = s->val.c; break; ++ case nsXPTType::T_WCHAR: value = s->val.wc; break; ++ default: value = (PRUint64) s->val.p; break; ++ } ++ } ++ ++ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) { ++ if (nr_fpr < FPR_COUNT) ++ fpregs[nr_fpr++] = s->val.d; ++ else { ++ *((double *)d) = s->val.d; ++ d++; ++ } ++ } ++ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) { ++ if (nr_fpr < FPR_COUNT) ++ // The value in %xmm register is already prepared to ++ // be retrieved as a float. Therefore, we pass the ++ // value verbatim, as a double without conversion. ++ fpregs[nr_fpr++] = s->val.d; ++ else { ++ *((float *)d) = s->val.f; ++ d++; ++ } ++ } ++ else { ++ if (nr_gpr < GPR_COUNT) ++ gpregs[nr_gpr++] = value; ++ else ++ *d++ = value; ++ } ++ } ++} ++ ++extern "C" ++XPTC_PUBLIC_API(nsresult) ++XPTC_InvokeByIndex(nsISupports * that, PRUint32 methodIndex, ++ PRUint32 paramCount, nsXPTCVariant * params) ++{ ++ PRUint32 nr_gpr, nr_fpr, nr_stack; ++ invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack); ++ ++ // Stack, if used, must be 16-bytes aligned ++ if (nr_stack) ++ nr_stack = (nr_stack + 1) & ~1; ++ ++ // Load parameters to stack, if necessary ++ PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8); ++ PRUint64 gpregs[GPR_COUNT]; ++ double fpregs[FPR_COUNT]; ++ invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs); ++ ++ // Load FPR registers from fpregs[] ++ register double d0 asm("xmm0"); ++ register double d1 asm("xmm1"); ++ register double d2 asm("xmm2"); ++ register double d3 asm("xmm3"); ++ register double d4 asm("xmm4"); ++ register double d5 asm("xmm5"); ++ register double d6 asm("xmm6"); ++ register double d7 asm("xmm7"); ++ ++ switch (nr_fpr) { ++#define ARG_FPR(N) \ ++ case N+1: d##N = fpregs[N]; ++ ARG_FPR(7); ++ ARG_FPR(6); ++ ARG_FPR(5); ++ ARG_FPR(4); ++ ARG_FPR(3); ++ ARG_FPR(2); ++ ARG_FPR(1); ++ ARG_FPR(0); ++ case 0:; ++#undef ARG_FPR ++ } ++ ++ // Load GPR registers from gpregs[] ++ register PRUint64 a0 asm("rdi"); ++ register PRUint64 a1 asm("rsi"); ++ register PRUint64 a2 asm("rdx"); ++ register PRUint64 a3 asm("rcx"); ++ register PRUint64 a4 asm("r8"); ++ register PRUint64 a5 asm("r9"); ++ ++ switch (nr_gpr) { ++#define ARG_GPR(N) \ ++ case N+1: a##N = gpregs[N]; ++ ARG_GPR(5); ++ ARG_GPR(4); ++ ARG_GPR(3); ++ ARG_GPR(2); ++ ARG_GPR(1); ++ case 1: a0 = (PRUint64) that; ++ case 0:; ++#undef ARG_GPR ++ } ++ ++ // Ensure that assignments to SSE registers won't be optimized away ++ asm("" :: ++ "x" (d0), "x" (d1), "x" (d2), "x" (d3), ++ "x" (d4), "x" (d5), "x" (d6), "x" (d7)); ++ ++ // Get pointer to method ++ PRUint64 methodAddress = *((PRUint64 *)that); ++ methodAddress += 8 * methodIndex; ++ methodAddress = *((PRUint64 *)methodAddress); ++ ++ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64); ++ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5); ++ return result; ++} +--- /dev/null Wed Dec 31 16:00:00 1969 ++++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_freebsd.cpp Thu Oct 16 23:01:08 2003 +@@ -0,0 +1,206 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++ ++// Implement shared vtbl methods. ++ ++#include "xptcprivate.h" ++ ++// The Linux/x86-64 ABI passes the first 6 integral parameters and the ++// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx, ++// r8, r9 and xmm0-xmm7), no stack space is allocated for these by the ++// caller. The rest of the parameters are passed in the callers stack ++// area. ++ ++const PRUint32 PARAM_BUFFER_COUNT = 16; ++const PRUint32 GPR_COUNT = 6; ++const PRUint32 FPR_COUNT = 8; ++ ++// PrepareAndDispatch() is called by SharedStub() and calls the actual method. ++// ++// - 'args[]' contains the arguments passed on stack ++// - 'gpregs[]' contains the arguments passed in integer registers ++// - 'fpregs[]' contains the arguments passed in floating point registers ++// ++// The parameters are mapped into an array of type 'nsXPTCMiniVariant' ++// and then the method gets called. ++ ++extern "C" nsresult ++PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex, ++ PRUint64 * args, PRUint64 * gpregs, double *fpregs) ++{ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ nsIInterfaceInfo* iface_info = NULL; ++ const nsXPTMethodInfo* info; ++ PRUint32 paramCount; ++ PRUint32 i; ++ nsresult result = NS_ERROR_FAILURE; ++ ++ NS_ASSERTION(self,"no self"); ++ ++ self->GetInterfaceInfo(&iface_info); ++ NS_ASSERTION(iface_info,"no interface info"); ++ if (! iface_info) ++ return NS_ERROR_UNEXPECTED; ++ ++ iface_info->GetMethodInfo(PRUint16(methodIndex), &info); ++ NS_ASSERTION(info,"no method info"); ++ if (! info) ++ return NS_ERROR_UNEXPECTED; ++ ++ 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"); ++ if (! dispatchParams) ++ return NS_ERROR_OUT_OF_MEMORY; ++ ++ PRUint64* ap = args; ++ PRUint32 nr_gpr = 1; // skip one GPR register for 'that' ++ PRUint32 nr_fpr = 0; ++ PRUint64 value; ++ ++ 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 == nsXPTType::T_DOUBLE) { ++ if (nr_fpr < FPR_COUNT) ++ dp->val.d = fpregs[nr_fpr++]; ++ else ++ dp->val.d = *(double*) ap++; ++ continue; ++ } ++ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) { ++ if (nr_fpr < FPR_COUNT) ++ // The value in %xmm register is already prepared to ++ // be retrieved as a float. Therefore, we pass the ++ // value verbatim, as a double without conversion. ++ dp->val.d = *(double*) ap++; ++ else ++ dp->val.f = *(float*) ap++; ++ continue; ++ } ++ else { ++ if (nr_gpr < GPR_COUNT) ++ value = gpregs[nr_gpr++]; ++ else ++ value = *ap++; ++ } ++ ++ if (param.IsOut() || !type.IsArithmetic()) { ++ dp->val.p = (void*) value; ++ continue; ++ } ++ ++ switch (type) { ++ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) value; break; ++ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) value; break; ++ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) value; break; ++ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) value; break; ++ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) value; break; ++ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) value; break; ++ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) value; break; ++ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) value; break; ++ case nsXPTType::T_BOOL: dp->val.b = (PRBool) value; break; ++ case nsXPTType::T_CHAR: dp->val.c = (char) value; break; ++ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break; ++ ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams); ++ ++ NS_RELEASE(iface_info); ++ ++ if (dispatchParams != paramBuffer) ++ delete [] dispatchParams; ++ ++ return result; ++} ++ ++#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ ++// Linux/x86-64 uses gcc >= 3.1 ++#define STUB_ENTRY(n) \ ++asm(".section \".text\"\n\t" \ ++ ".align 2\n\t" \ ++ ".if " #n " < 10\n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n" \ ++ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \ ++ ".elseif " #n " < 100\n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n" \ ++ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \ ++ ".elseif " #n " < 1000\n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n" \ ++ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \ ++ ".else\n\t" \ ++ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \ ++ ".endif\n\t" \ ++ "movl $" #n ", %eax\n\t" \ ++ "jmp SharedStub\n\t" \ ++ ".if " #n " < 10\n\t" \ ++ ".size _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \ ++ ".elseif " #n " < 100\n\t" \ ++ ".size _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \ ++ ".else\n\t" \ ++ ".size _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \ ++ ".endif"); ++ ++// static nsresult SharedStub(PRUint32 methodIndex) ++asm(".section \".text\"\n\t" ++ ".align 2\n\t" ++ ".type SharedStub,@function\n\t" ++ "SharedStub:\n\t" ++ // make room for gpregs (48), fpregs (64) ++ "pushq %rbp\n\t" ++ "movq %rsp,%rbp\n\t" ++ "subq $112,%rsp\n\t" ++ // save GP registers ++ "movq %rdi,-112(%rbp)\n\t" ++ "movq %rsi,-104(%rbp)\n\t" ++ "movq %rdx, -96(%rbp)\n\t" ++ "movq %rcx, -88(%rbp)\n\t" ++ "movq %r8 , -80(%rbp)\n\t" ++ "movq %r9 , -72(%rbp)\n\t" ++ "leaq -112(%rbp),%rcx\n\t" ++ // save FP registers ++ "movsd %xmm0,-64(%rbp)\n\t" ++ "movsd %xmm1,-56(%rbp)\n\t" ++ "movsd %xmm2,-48(%rbp)\n\t" ++ "movsd %xmm3,-40(%rbp)\n\t" ++ "movsd %xmm4,-32(%rbp)\n\t" ++ "movsd %xmm5,-24(%rbp)\n\t" ++ "movsd %xmm6,-16(%rbp)\n\t" ++ "movsd %xmm7, -8(%rbp)\n\t" ++ "leaq -64(%rbp),%r8\n\t" ++ // rdi has the 'self' pointer already ++ "movl %eax,%esi\n\t" ++ "leaq 16(%rbp),%rdx\n\t" ++ "call PrepareAndDispatch\n\t" ++ "leave\n\t" ++ "ret\n\t" ++ ".size SharedStub,.-SharedStub"); ++ ++#define SENTINEL_ENTRY(n) \ ++nsresult nsXPTCStubBase::Sentinel##n() \ ++{ \ ++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ ++ return NS_ERROR_NOT_IMPLEMENTED; \ ++} ++ ++#include "xptcstubsdef.inc" ++ ++#else ++#error "can't find a compiler to use" ++#endif /* __GNUC__ */ diff --git a/www/firefox/files/patch-xptcall-sparc64 b/www/firefox/files/patch-xptcall-sparc64 index ea2773ced7d9..9599a8a71336 100644 --- a/www/firefox/files/patch-xptcall-sparc64 +++ b/www/firefox/files/patch-xptcall-sparc64 @@ -1,21 +1,3 @@ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig Mon May 26 13:26:01 2003 -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in Mon May 26 13:30:04 2003 -@@ -287,6 +287,15 @@ - ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s - endif - # -+# FreeBSD/SPARC64 -+# -+ifeq ($(OS_ARCH),FreeBSD) -+ifneq (,$(findstring sparc,$(OS_TEST))) -+CPPSRCS := xptcinvoke_sparc64_freebsd.cpp xptcstubs_sparc64_freebsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_freebsd.s xptcstubs_asm_sparcv9_solaris.s -+endif -+endif -+# - # Solaris/SPARC - # - ifeq ($(OS_ARCH),SunOS) --- /dev/null Mon May 26 13:22:00 2003 +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp Mon May 26 04:12:55 2003 @@ -0,0 +1,123 @@ |