firefox-linkorder.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Wed, 13 Jan 2010 23:53:53 +0100
changeset 50 00ee07727e73
parent 8 19a8c8d53349
child 81 c8f7496d60e7
permissions -rw-r--r--
Files managed by update-alternatives should be packaged as %ghost files

From: Wolfgang Rosenauer
Subject: Build fails with --as-needed
References:

diff --git a/browser/components/build/Makefile.in b/browser/components/build/Makefile.in
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -78,19 +78,21 @@ LOCAL_INCLUDES += -I$(srcdir)/../migrati
 SHARED_LIBRARY_LIBS += ../migration/src/$(LIB_PREFIX)migration_s.$(LIB_SUFFIX)
 EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
 endif
 
 # This has to come after the above chunk, because mozreg_s has dependencies on
 # stuff in MOZ_COMPONENT_LIBS.
 EXTRA_DSO_LDOPTS += \
 	$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
-	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
+# if built with --as-needed the NSPR libs need to be linked after mozreg_s
+EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
+
 # Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
 # GTK2: Need to link with glib for GNOME shell service
 ifneq (,$(filter mac cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LDOPTS += \
   $(TK_LIBS) \
   $(NULL)
 endif