[SVN-Commit] r498 - in branches/experimental/www/libxul: . files

svn-freebsd-gecko at chruetertee.ch svn-freebsd-gecko at chruetertee.ch
Sun Feb 27 11:59:12 UTC 2011


Author: andreast
Date: Sun Feb 27 11:59:04 2011
New Revision: 498

Log:
Add support for powerpc64.
Note, the prerequisite is binutils-2.17.50.

Added:
   branches/experimental/www/libxul/files/patch-js-ctypes-libffi-configure
   branches/experimental/www/libxul/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c   (contents, props changed)
Modified:
   branches/experimental/www/libxul/Makefile
   branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in

Modified: branches/experimental/www/libxul/Makefile
==============================================================================
--- branches/experimental/www/libxul/Makefile	Sun Feb 27 09:06:20 2011	(r497)
+++ branches/experimental/www/libxul/Makefile	Sun Feb 27 11:59:04 2011	(r498)
@@ -60,6 +60,11 @@
 EXTRA_PATCHES=	${FILESDIR}/libsydney_oss
 .endif
 
+.if ${ARCH} == powerpc64
+CONFIGURE_ENV+= UNAME_m="powerpc64"
+CFLAGS+= -mminimal-toc
+.endif
+
 .if defined(WITHOUT_DBUS)
 MOZ_OPTIONS+=	--disable-dbus --disable-libnotify
 .else

Added: branches/experimental/www/libxul/files/patch-js-ctypes-libffi-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/libxul/files/patch-js-ctypes-libffi-configure	Sun Feb 27 11:59:04 2011	(r498)
@@ -0,0 +1,12 @@
+--- js/ctypes/libffi/configure.orig	2010-07-22 23:54:58.000000000 +0200
++++ js/ctypes/libffi/configure	2010-08-05 07:34:44.000000000 +0200
+@@ -21033,6 +21033,9 @@
+   powerpc-*-aix* | rs6000-*-aix*)
+ 	TARGET=POWERPC_AIX; TARGETDIR=powerpc
+ 	;;
++  powerpc64-*-freebsd*)
++	TARGET=POWERPC; TARGETDIR=powerpc
++	;;
+   powerpc-*-freebsd*)
+ 	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
+ 	;;

Added: branches/experimental/www/libxul/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/libxul/files/patch-security_nss_lib_freebl_mpi_mpcpucache.c	Sun Feb 27 11:59:04 2011	(r498)
@@ -0,0 +1,44 @@
+--- security/nss/lib/freebl/mpi/mpcpucache.c.orig	2011-02-26 18:44:42.000000000 +0100
++++ security/nss/lib/freebl/mpi/mpcpucache.c	2011-02-26 18:46:41.000000000 +0100
+@@ -733,6 +733,33 @@
+ #endif
+ 
+ #if defined(__ppc64__) 
++#if defined(__FreeBSD__)
++#include <sys/stddef.h>
++#include <sys/sysctl.h>
++
++#include <machine/cpu.h>
++#include <machine/md_var.h>
++
++unsigned long
++s_mpi_getProcessorLineSize()
++{
++       static int cacheline_size = 0;
++       static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE };
++       int clen;
++
++       if (cacheline_size > 0)
++               return cacheline_size;
++  
++       clen = sizeof(cacheline_size);
++       if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]),
++           &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size)
++               return 128; /* guess */
++
++       return cacheline_size;
++}
++#else /* __FreeBSD__ */
++
++
+ /*
+  *  Sigh, The PPC has some really nice features to help us determine cache
+  *  size, since it had lots of direct control functions to do so. The POWER
+@@ -786,6 +813,7 @@
+     return 0;
+ }
+ 
++#endif /* __FreeBSD__ */
+ #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1
+ #endif
+ 

Modified: branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in
==============================================================================
--- branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in	Sun Feb 27 09:06:20 2011	(r497)
+++ branches/experimental/www/libxul/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in	Sun Feb 27 11:59:04 2011	(r498)
@@ -1,5 +1,5 @@
---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2009-09-16 04:41:25.000000000 +0200
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	2009-10-03 21:30:21.000000000 +0200
+--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2010-04-02 16:03:13.000000000 +0000
++++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	2010-06-06 19:19:44.000000000 +0000
 @@ -73,6 +73,9 @@
  DEFINES		+= -DKEEP_STACK_16_BYTE_ALIGNED
  CPPSRCS		:= xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
@@ -56,6 +56,19 @@
  CPPSRCS		:= xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
  ASFILES		:= xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
  AS		:= $(CC) -c -x assembler-with-cpp
+@@ -331,9 +340,9 @@
+ #
+ # Linux/PPC64
+ #
+-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
+-CPPSRCS                := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
+-ASFILES                := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
++ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
++CPPSRCS        := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
++ASFILES        := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
+ AS             := $(CC) -c -x assembler-with-cpp
+ endif
+ 
 @@ -400,6 +409,15 @@
  ASFILES		:= xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
  endif


More information about the freebsd-gecko mailing list