summaryrefslogtreecommitdiff
path: root/moz
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-09-28 13:53:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-09-28 13:54:24 +0200
commita1a059467b92496c99600f0fd9a91d035066c063 (patch)
tree34ace0c9555d3f7357248661f40e388412649955 /moz
parente34c87ce752e26426e76602dbeaded704b3587a2 (diff)
Fix building moz on Mac OS X.
* On Mac, nss-config must not emit -rpath-link switch. * --with-system-nss/-nspr horribly broke in combination with the routine use of MOZ_ARCH and resulting MOZ_CROSS_COMPILE for Mac, and the latter appears to be unnecessary for a normal build, anyway, so is now conditional CREATE_UNIVERSAL_MAC_MOZ_ZIP, in case anybody still uses the code to create universal moz archives. * This in turn revealed two issues in moz that have been addressed with a new macosx_build_fix.patch.
Diffstat (limited to 'moz')
-rw-r--r--moz/makefile.mk5
-rw-r--r--moz/patches/index.txt15
-rw-r--r--moz/patches/macosx_build_fix.patch23
3 files changed, 41 insertions, 2 deletions
diff --git a/moz/makefile.mk b/moz/makefile.mk
index 94e942f97a5e..15480f54b830 100644
--- a/moz/makefile.mk
+++ b/moz/makefile.mk
@@ -95,7 +95,8 @@ PATCH_FILES = \
patches/link_fontconfig.patch \
patches/brokenmakefile.patch \
patches/aix_build_fix.patch \
- patches/libpr0n_build_fix.patch
+ patches/libpr0n_build_fix.patch \
+ patches/macosx_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)
@@ -349,7 +350,7 @@ $(MISC)$/build$/moztools.complete : $(MISC)$/build$/moztools.unpack
zip: \
$(MISC)$/CREATETARBALL
-.IF "$(GUIBASE)"=="aqua"
+.IF "$(GUIBASE)"=="aqua" && "$(CREATE_UNIVERSAL_MAC_MOZ_ZIP)"!=""
MOZ_ARCH=$(eq,$(CPU),I i386 ppc)
MOZILLA_CONFIGURE_FLAGS+=$(eq,$(CPU),I --target=i386-apple-darwin8 --target=powerpc-apple-darwin8)
diff --git a/moz/patches/index.txt b/moz/patches/index.txt
index fd27f442a05c..8eb067718bc8 100644
--- a/moz/patches/index.txt
+++ b/moz/patches/index.txt
@@ -63,3 +63,18 @@ Description
call.
The patch changes the DoQuery behavior to respect the arguments of the second call.
+====================================================================================
+File name
+---------
+ macosx_build_fix.patch.patch
+
+Description
+-----------
+ For one, recently introduced --with-system-nspr/--with-nspr-prefix in
+ moz/makefile.mk reveals that directory/c-sdk/build.mk/build.mk uses just a
+ hard-coded list of nspr libraries, lacking a proper -L switch (as provided by
+ nspr-config).
+ For another, disabling the routine use of MOZ_ARCH and resulting
+ MOZ_CROSS_COMPILE for Mac OS X in moz/makefile.mk reveals that
+ xpcom/build/Makefile.in wants to link against a macmorefiles_s library
+ without a proper -L switch.
diff --git a/moz/patches/macosx_build_fix.patch b/moz/patches/macosx_build_fix.patch
new file mode 100644
index 000000000000..e79f58207fa7
--- /dev/null
+++ b/moz/patches/macosx_build_fix.patch
@@ -0,0 +1,23 @@
+--- misc/mozilla/directory/c-sdk/build.mk 2011-09-27 14:45:02.000000000 +0200
++++ misc/build/mozilla/directory/c-sdk/build.mk 2011-09-27 14:44:18.000000000 +0200
+@@ -157,8 +157,8 @@
+ PLDSBASE=plds$(NSPR_LIBVERSION)
+ NSPRBASE=nspr$(NSPR_LIBVERSION)
+
+-DYNAMICNSPR = -l$(PLCBASE) -l$(PLDSBASE) -l$(NSPRBASE)
++DYNAMICNSPR = $(NSPR_LIBS)
+
+ PLC_LIBNAME=plc$(NSPR_LIBVERSION)
+ PLDS_LIBNAME=plds$(NSPR_LIBVERSION)
+ ifeq ($(OS_ARCH), WINNT)
+--- misc/mozilla/xpcom/build/Makefile.in 2008-06-16 00:26:11.000000000 +0200
++++ misc/build/mozilla/xpcom/build/Makefile.in 2011-09-28 10:41:02.000000000 +0200
+@@ -135,7 +135,7 @@
+ # pull in MoreFiles for MacOSX
+ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ EXTRA_DSO_LIBS = macmorefiles_s
+-EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
++EXTRA_DSO_LDOPTS += -L$(DIST)/lib $(EXTRA_DSO_LIBS)
+ EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
+ endif
+