Status

RESOLVED FIXED
2 years ago
4 months ago

People

(Reporter: gps, Assigned: sylvestre)

Tracking

unspecified
mozilla56

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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.
(Reporter)

Comment 1

2 years ago
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.
Comment hidden (mozreview-request)
(Assignee)

Comment 3

2 years ago
Looks like it disappear during the review phase. Too bad, this is just the most important part :p

Comment 4

2 years ago
mozreview-review
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+

Comment 5

2 years ago
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

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9706855e5596
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(Reporter)

Comment 7

2 years ago
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)

Updated

11 months ago
Product: Core → Firefox Build System
(Assignee)

Updated

4 months ago
Assignee: nobody → sledru
You need to log in before you can comment on or make changes to this bug.