Bug 1036832: dont use the linker script from bug 938437 on OpenBSD, libxul.so fails to link with ld 2.15. r=glandium
authorLandry Breuil <landry@openbsd.org>
Tue, 26 Aug 2014 09:47:02 +0200
changeset 211298 7cb633f637af5de82058825127214f82081def40
parent 211297 2fc1d14dee3eb51b26da5375a092b04967f3b167
child 211299 8ce721baa271f46794323530953e43ff920e1b46
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-esr52@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1036832, 938437
milestone34.0a1
Bug 1036832: dont use the linker script from bug 938437 on OpenBSD, libxul.so fails to link with ld 2.15. r=glandium
toolkit/library/libxul.mk
--- a/toolkit/library/libxul.mk
+++ b/toolkit/library/libxul.mk
@@ -39,19 +39,21 @@ endif
 
 # BFD ld doesn't create multiple PT_LOADs as usual when an unknown section
 # exists. Using an implicit linker script to make it fold that section in
 # .data.rel.ro makes it create multiple PT_LOADs. That implicit linker
 # script however makes gold misbehave, first because it doesn't like that
 # the linker script is given after crtbegin.o, and even past that, replaces
 # the default section rules with those from the script instead of
 # supplementing them. Which leads to a lib with a huge load of sections.
+ifneq (OpenBSD,$(OS_TARGET))
 ifdef LD_IS_BFD
 OS_LDFLAGS += $(topsrcdir)/toolkit/library/StaticXULComponents.ld
 endif
+endif
 
 ifeq (WINNT,$(OS_TARGET))
 get_first_and_last = dumpbin -exports $1 | grep _NSModule@@ | sort -k 3 | sed -n 's/^.*?\([^@]*\)@@.*$$/\1/;1p;$$p'
 else
 get_first_and_last = $(TOOLCHAIN_PREFIX)nm -g $1 | grep _NSModule$$ | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
 endif
 
 LOCAL_CHECKS = test "$$($(get_first_and_last) | xargs echo)" != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0