summaryrefslogtreecommitdiff
path: root/moz
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-02-12 10:13:17 +0000
committerCaolán McNamara <cmc@openoffice.org>2010-02-12 10:13:17 +0000
commit24de033cfe6755538e6104db27f08b055783fa84 (patch)
treea8b17289f5e9d061a27808c0335353ccc3894a64 /moz
parent270a926584edf395c0839eb68e2722e9e52d48c9 (diff)
cmcfixes72: #i109192# allow moz to build under arm
Diffstat (limited to 'moz')
-rw-r--r--moz/makefile.mk1
-rw-r--r--moz/patches/arm_build_fix.patch189
2 files changed, 190 insertions, 0 deletions
diff --git a/moz/makefile.mk b/moz/makefile.mk
index 0aabda002e2e..e8f70b4fea02 100644
--- a/moz/makefile.mk
+++ b/moz/makefile.mk
@@ -88,6 +88,7 @@ PATCH_FILES = \
seamonkey-source-$(MOZILLA_VERSION).patch \
patches/dtoa.patch \
patches/respect_disable_pango.patch \
+ patches/arm_build_fix.patch
# This file is needed for the W32 build when BUILD_MOZAB is set
# (currently only vc8/vs2005 is supported when BUILD_MOZAB is set)
diff --git a/moz/patches/arm_build_fix.patch b/moz/patches/arm_build_fix.patch
new file mode 100644
index 000000000000..79368e5fe6db
--- /dev/null
+++ b/moz/patches/arm_build_fix.patch
@@ -0,0 +1,189 @@
+--- misc/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2010-01-29 08:39:01.000000000 +0000
++++ misc/build/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2010-01-29 08:41:01.000000000 +0000
+@@ -44,8 +44,21 @@
+ #error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
+ #endif
+
++#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
++/* This tells gcc3.4+ not to optimize away symbols.
++ * * @see http://gcc.gnu.org/gcc-3.4/changes.html
++ * */
++#define DONT_DROP_OR_WARN __attribute__((used))
++#else
++/* This tells older gccs not to warn about unused vairables.
++ * * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
++ * */
++#define DONT_DROP_OR_WARN __attribute__((unused))
++#endif
++
+ /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
+-static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
++static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
++DONT_DROP_OR_WARN;
+
+ static nsresult
+ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
+--- misc/mozilla/security/nss/cmd/shlibsign/Makefile 2010-02-05 13:13:56.000000000 +0000
++++ misc/build/mozilla/security/nss/cmd/shlibsign/Makefile 2010-02-05 13:14:16.000000000 +0000
+@@ -124,5 +124,5 @@
+ endif
+ endif
+
+-libs install :: $(CHECKLOC)
++libs install ::
+
+--- misc/mozilla/security/manager/Makefile.in 2010-02-05 13:27:25.000000000 +0000
++++ misc/build/mozilla/security/manager/Makefile.in 2010-02-05 13:28:00.000000000 +0000
+@@ -53,7 +53,6 @@
+ SMIME3_LIB \
+ SSL3_LIB \
+ SOFTOKEN3_LIB \
+- SOFTOKEN3_CHK \
+ LOADABLE_ROOT_MODULE \
+ HAVE_FREEBL_LIBS \
+ HAVE_FREEBL_LIBS_32 \
+@@ -68,7 +67,6 @@
+ SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX)
+ SSL3_LIB = $(DLL_PREFIX)ssl3$(DLL_SUFFIX)
+ SOFTOKEN3_LIB = $(DLL_PREFIX)softokn3$(DLL_SUFFIX)
+-SOFTOKEN3_CHK = $(DLL_PREFIX)softokn3.chk
+
+ # Default
+ HAVE_FREEBL_LIBS = 1
+@@ -99,23 +97,17 @@
+
+ ifdef HAVE_FREEBL_LIBS
+ FREEBL_LIB = $(DLL_PREFIX)freebl3$(DLL_SUFFIX)
+-FREEBL_CHK = $(DLL_PREFIX)freebl3.chk
+ endif
+ ifdef HAVE_FREEBL_LIBS_32
+ FREEBL_32INT_LIB = libfreebl_32int_3$(DLL_SUFFIX)
+-FREEBL_32INT_CHK = libfreebl_32int_3.chk
+ FREEBL_32FPU_LIB = libfreebl_32fpu_3$(DLL_SUFFIX)
+-FREEBL_32FPU_CHK = libfreebl_32fpu_3.chk
+ endif
+ ifdef HAVE_FREEBL_LIBS_32INT64
+ FREEBL_32INT64_LIB = libfreebl_32int64_3$(DLL_SUFFIX)
+-FREEBL_32INT64_CHK = libfreebl_32int64_3.chk
+ endif
+ ifdef HAVE_FREEBL_LIBS_64
+ FREEBL_64INT_LIB = libfreebl_64int_3$(DLL_SUFFIX)
+-FREEBL_64INT_CHK = libfreebl_64int_3.chk
+ FREEBL_64FPU_LIB = libfreebl_64fpu_3$(DLL_SUFFIX)
+-FREEBL_64FPU_CHK = libfreebl_64fpu_3.chk
+ endif
+
+ ABS_DIST := $(shell cd $(DIST) && pwd)
+@@ -210,7 +202,6 @@
+ OS_ARCH="$(OS_ARCH)" \
+ CPU_ARCH="$(TARGET_CPU)" \
+ $(NULL)
+-SKIP_CHK=1
+ endif
+ SUBMAKEFILES = boot/Makefile ssl/Makefile pki/Makefile locales/Makefile
+
+@@ -223,10 +214,6 @@
+ ifndef MOZ_NATIVE_NSS
+ $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
+ $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
+-ifndef SKIP_CHK
+- $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean
+- $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean
+-endif
+ touch $@
+ endif
+
+@@ -262,43 +249,22 @@
+ # In NSS 3.11.8-3.11.9, lib/ssl/derive.c includes cmd/lib/secutil.h.
+ $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) export
+ $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) DIRS="util base dev pki pki1 certdb certhigh pk11wrap cryptohi nss ssl pkcs12 pkcs7 smime crmf jar ckfw ckfw/builtins"
+-ifndef SKIP_CHK
+- $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS)
+- $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS)
+-endif
+ $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin
+-ifndef SKIP_CHK
+- $(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DIST)/bin
+-endif
+ $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin
+ $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin
+ $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin
+ $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin
+ ifdef HAVE_FREEBL_LIBS
+-ifndef SKIP_CHK
+- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DIST)/bin
+-endif
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin
+ endif
+ ifdef HAVE_FREEBL_LIBS_32
+-ifndef SKIP_CHK
+- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DIST)/bin
+- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DIST)/bin
+-endif
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DIST)/bin
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DIST)/bin
+ endif
+ ifdef HAVE_FREEBL_LIBS_32INT64
+-ifndef SKIP_CHK
+- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(DIST)/bin
+-endif
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(DIST)/bin
+ endif
+ ifdef HAVE_FREEBL_LIBS_64
+-ifndef SKIP_CHK
+- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(DIST)/bin
+- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(DIST)/bin
+-endif
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(DIST)/bin
+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(DIST)/bin
+ endif
+@@ -313,38 +279,21 @@
+ install::
+ ifndef MOZ_NATIVE_NSS
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DESTDIR)$(mozappdir)
+-ifndef SKIP_CHK
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DESTDIR)$(mozappdir)
+-endif
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DESTDIR)$(mozappdir)
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DESTDIR)$(mozappdir)
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DESTDIR)$(mozappdir)
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DESTDIR)$(mozappdir)
+ ifdef HAVE_FREEBL_LIBS
+-ifndef SKIP_CHK
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DESTDIR)$(mozappdir)
+-endif
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DESTDIR)$(mozappdir)
+ endif
+ ifdef HAVE_FREEBL_LIBS_32
+-ifndef SKIP_CHK
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DESTDIR)$(mozappdir)
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DESTDIR)$(mozappdir)
+-endif
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DESTDIR)$(mozappdir)
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DESTDIR)$(mozappdir)
+ endif
+ ifdef HAVE_FREEBL_LIBS_32INT64
+-ifndef SKIP_CHK
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(DESTDIR)$(mozappdir)
+-endif
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(DESTDIR)$(mozappdir)
+ endif
+ ifdef HAVE_FREEBL_LIBS_64
+-ifndef SKIP_CHK
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(DESTDIR)$(mozappdir)
+- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(DESTDIR)$(mozappdir)
+-endif
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(DESTDIR)$(mozappdir)
+ $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(DESTDIR)$(mozappdir)
+ endif
+@@ -366,10 +315,6 @@
+ ifndef MOZ_NATIVE_NSS
+ $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
+ $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
+-ifndef SKIP_CHK
+- $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean
+- $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean
+-endif
+ endif
+
+ echo-requires-recursive::