Status

defect
RESOLVED FIXED
2 years ago
10 months ago

People

(Reporter: gps, Assigned: sylvestre)

Tracking

unspecified
mozilla56
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

I suspect this is a regression from bug 1351109.

On my machine, /usr/bin/ld (not gold) is used to link libxul, js, etc. This occurs with and without --enable-gold (not using --enable-release).

On the current tip of the beta repo (009589ce), ../../build/unix/gold/ld is used when linking. On central, /usr/bin/ld is invoked.

Looking at code in toolchain.configure, the output of configure (checking for ld... gold), and what's in config.status, configure finds gold. But for whatever reason the build system doesn't actually invoke it.
Here is a diff of config.status before and after d0e782180741fa86dd13bb2a2d35ee8b361020d9:

--- good        2017-07-24 18:12:41.449546441 -0700
+++ bad 2017-07-24 18:13:19.904689560 -0700
@@ -192 +192 @@
-    'EXPAND_LIBS_ORDER_STYLE': 'section-ordering-file',
+    'EXPAND_LIBS_ORDER_STYLE': 'linkerscript',
@@ -267 +266,0 @@
-    'LD_IS_BFD': '',
@@ -284,0 +284,4 @@
+    'LINKER_LDFLAGS': [
+        '-B',
+        '/home/gps/src/firefox/objdir/build/unix/gold',
+    ],
@@ -800 +803 @@
-    'OS_LDFLAGS': '-lpthread  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B /home/gps/src/firefox/objdir/build/unix/gold',
+    'OS_LDFLAGS': '-lpthread  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id',

LINKER_LDFLAGS isn't used. So the loss of -B from OS_LDFLAGS looks like the bug here.
Looks like it disappear during the review phase. Too bad, this is just the most important part :p
Comment on attachment 8889729 [details]
Bug 1383966 - Give the result of the linker detection to OS_LDFLAGS

https://reviewboard.mozilla.org/r/160806/#review166130
Attachment #8889729 - Flags: review?(mh+mozilla) → review+
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9706855e5596
Give the result of the linker detection to OS_LDFLAGS r=glandium
https://hg.mozilla.org/mozilla-central/rev/9706855e5596
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Comment on attachment 8889729 [details]
Bug 1383966 - Give the result of the linker detection to OS_LDFLAGS

Thanks for stealing the review, glandium! And thanks for the quick patch, Sylvestre!
Attachment #8889729 - Flags: review?(gps)
Product: Core → Firefox Build System
Assignee: nobody → sledru
You need to log in before you can comment on or make changes to this bug.