Closed
Bug 1022425
Opened 10 years ago
Closed 10 years ago
mozgtk stub libraries lose their necessary dependency on gtk when building with -Wl,--as-needed
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox32 fixed, firefox33 fixed)
RESOLVED
FIXED
mozilla33
People
(Reporter: glandium, Assigned: glandium)
References
Details
(Whiteboard: [npotb])
Attachments
(1 file)
(deleted),
patch
|
mshal
:
review+
|
Details | Diff | Splinter Review |
While -Wl,--as-needed is not our default, I've been using it in Debian packages for a while, and it works well. I plan to make that the default on our builds too, but I need to ensure this works on android and b2g before that, and I want this fix in the tree independently.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8436579 -
Flags: review?(mshal)
Updated•10 years ago
|
Attachment #8436579 -
Flags: review?(mshal) → review+
Assignee | ||
Comment 2•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/de5c523c5ed4
Assignee | ||
Updated•10 years ago
|
Whiteboard: [checkin-needed-aurora] [npotb]
Comment 3•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/de5c523c5ed4
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment 4•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/730801cf5af4
status-firefox32:
--- → fixed
status-firefox33:
--- → fixed
Whiteboard: [checkin-needed-aurora] [npotb] → [npotb]
Comment 5•10 years ago
|
||
Comment on attachment 8436579 [details] [diff] [review] Force mozgtk stubs dependency on gtk libraries when -Wl,--as-needed is used Review of attachment 8436579 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/gtk/mozgtk/gtk2/Makefile.in @@ +9,5 @@ > +# If LDFLAGS contains -Wl,--as-needed, we need to add -Wl,--no-as-needed > +# before the gtk libraries, otherwise the linker will drop those dependencies > +# because no symbols are used from them. But those dependencies need to be > +# kept for things to work properly. > +ifeq (,$(filter -Wl,--as-needed),$(LDFLAGS)) Um, how does this (and its gtk3 counterpart) work? Notice that the parenthesization of the |filter| call is wrong, and therefore I think we always take the true branch here...
Attachment #8436579 -
Flags: feedback?(mh+mozilla)
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #5) > Um, how does this (and its gtk3 counterpart) work? Notice that the > parenthesization of the |filter| call is wrong, and therefore I think we > always take the true branch here... In fact, we always take the false branch[1]. Which is why I didn't notice it didn't work as expected. Please feel free to fixup. (1) it ultimately expands to ifeq (,,$(LDFLAGS)), which, even if LDFLAGS is empty, is ifeq (,,), which a) make is happy not to consider a syntax error, and b) apparently means "if '' equals ','.
Comment 7•10 years ago
|
||
Comment on attachment 8436579 [details] [diff] [review] Force mozgtk stubs dependency on gtk libraries when -Wl,--as-needed is used (In reply to Mike Hommey [:glandium] from comment #6) > (In reply to Nathan Froyd (:froydnj) from comment #5) > > Um, how does this (and its gtk3 counterpart) work? Notice that the > > parenthesization of the |filter| call is wrong, and therefore I think we > > always take the true branch here... > > In fact, we always take the false branch[1]. Which is why I didn't notice it > didn't work as expected. Please feel free to fixup. > > (1) it ultimately expands to ifeq (,,$(LDFLAGS)), which, even if LDFLAGS is > empty, is ifeq (,,), which a) make is happy not to consider a syntax error, > and b) apparently means "if '' equals ','. I can just imagine the fun of trying to ensure the comma in -Wl,--as-needed is parsed as part of the argument and not as part of the make syntax. One more thing that would be easier in moz.build.
Attachment #8436579 -
Flags: feedback?(mh+mozilla)
Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #7) > Comment on attachment 8436579 [details] [diff] [review] > Force mozgtk stubs dependency on gtk libraries when -Wl,--as-needed is used > > (In reply to Mike Hommey [:glandium] from comment #6) > > (In reply to Nathan Froyd (:froydnj) from comment #5) > > > Um, how does this (and its gtk3 counterpart) work? Notice that the > > > parenthesization of the |filter| call is wrong, and therefore I think we > > > always take the true branch here... > > > > In fact, we always take the false branch[1]. Which is why I didn't notice it > > didn't work as expected. Please feel free to fixup. > > > > (1) it ultimately expands to ifeq (,,$(LDFLAGS)), which, even if LDFLAGS is > > empty, is ifeq (,,), which a) make is happy not to consider a syntax error, > > and b) apparently means "if '' equals ','. > > I can just imagine the fun of trying to ensure the comma in -Wl,--as-needed > is parsed as part of the argument and not as part of the make syntax. $(COMMA)
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•