Closed
Bug 983186
Opened 11 years ago
Closed 11 years ago
js/src/configure.in should append -Wl,--build-id to NSPR_LDFLAGS
Categories
(Firefox Build System :: General, defect, P2)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file, 2 obsolete files)
947 bytes,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
The first issue is easy to fix.
In http://hg.mozilla.org/mozilla-central/rev/178f3283557b,
the use of NSPR_LDFLAGS was inadvertently copied to
js/src/configure.in.
Attachment #8390565 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 1•11 years ago
|
||
Steve: I cc'ed you on this patch because you are moving this
code to a new file in bug 975011.
The second issue is that the linker flags -Wl,-z,text -Wl,--build-id
passed to NSPR are duplicated, because these flags are added to both
LDFLAGS and NSPR_LDFLAGS, and we pass "$LDFLAGS $NSPR_LDFLAGS" to NSPR
like this:
export LDFLAGS="$LDFLAGS $NSPR_LDFLAGS"
export CFLAGS="$CFLAGS $MOZ_FRAMEPTR_FLAGS"
AC_OUTPUT_SUBDIRS(nsprpub)
There are two ways to fix this. In this patch, I don't add a linker
flag to NSPR_LDFLAGS if it's already added to LDFLAGS. This fix is
simpler, but has the downside that some linker flags in LDFLAGS
could be inappropriate or irrelevant to NSPR, for example,
-static-libstdc++.
The other way to fix this is to pass only $NSPR_LDFLAGS to NSPR.
This requires inspecting how configure.in builds LDFLAGS and
adding any applicable linker flags to NSPR_LDFLAGS.
Attachment #8390582 -
Flags: review?(mh+mozilla)
Attachment #8390582 -
Flags: feedback?(sphink)
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 8390582 [details] [diff] [review]
Don't add -Wl,-z,text -Wl,--build-id to both LDFLAGS and NSPR_LDFLAGS
Review of attachment 8390582 [details] [diff] [review]:
-----------------------------------------------------------------
I only see the second issue in the B2G {ICS,JB,KK} Emulator builds.
So I guess this issue only occurs when $direct_nspr_config is 1,
and so this patch seems incorrect in general.
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 8390582 [details] [diff] [review]
Don't add -Wl,-z,text -Wl,--build-id to both LDFLAGS and NSPR_LDFLAGS
Review of attachment 8390582 [details] [diff] [review]:
-----------------------------------------------------------------
The direct_nspr_config variable was added in this checkin:
http://hg.mozilla.org/mozilla-central/diff/27a6377f1e17/configure.in
So this issue was probably introduced then.
Comment 4•11 years ago
|
||
Comment on attachment 8390565 [details] [diff] [review]
Remove the unused NSPR_LDFLAGS variable from js/src/configure.in
Review of attachment 8390565 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/configure.in
@@ -1128,5 @@
> AC_MSG_CHECKING([for -z text option to ld])
> _SAVE_LDFLAGS=$LDFLAGS
> LDFLAGS="$LDFLAGS -Wl,-z,text"
> - AC_TRY_LINK(,,AC_MSG_RESULT([yes])
> - [NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text"],
bug 975011 is going to use this.
Attachment #8390565 -
Flags: review?(mh+mozilla) → review-
Updated•11 years ago
|
Attachment #8390582 -
Flags: review?(mh+mozilla) → review+
Comment 5•11 years ago
|
||
Comment on attachment 8390582 [details] [diff] [review]
Don't add -Wl,-z,text -Wl,--build-id to both LDFLAGS and NSPR_LDFLAGS
Review of attachment 8390582 [details] [diff] [review]:
-----------------------------------------------------------------
Hum, yeah, that would break the normal case of direct_nspr_config being empty.
Attachment #8390582 -
Flags: review+ → review-
Updated•11 years ago
|
Assignee: mh+mozilla → wtc
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8390565 [details] [diff] [review]
Remove the unused NSPR_LDFLAGS variable from js/src/configure.in
Review of attachment 8390565 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/configure.in
@@ -1128,5 @@
> AC_MSG_CHECKING([for -z text option to ld])
> _SAVE_LDFLAGS=$LDFLAGS
> LDFLAGS="$LDFLAGS -Wl,-z,text"
> - AC_TRY_LINK(,,AC_MSG_RESULT([yes])
> - [NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text"],
If bug 975011 is going to use this, then js/src/configure.in
has a different bug: the AC_TRY_LINK statement below should
append -Wl,--build-id to NSPR_LDFLAGS. Do you agree?
Assignee | ||
Comment 7•11 years ago
|
||
Depending on whether js/src/configure.in will use NSPR_LDFLAGS or not,
it seems that one of this patch and attachment 8390565 [details] [diff] [review] is needed.
Attachment #8390565 -
Attachment is obsolete: true
Attachment #8393016 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8390582 [details] [diff] [review]
Don't add -Wl,-z,text -Wl,--build-id to both LDFLAGS and NSPR_LDFLAGS
Marked the patch obsolete because it would break the normal case of
direct_nspr_config being empty. I guess we'll live with the repeated
linker flags when $direct_nspr_config is 1.
Attachment #8390582 -
Attachment is obsolete: true
Attachment #8390582 -
Flags: feedback?(sphink)
Updated•11 years ago
|
Attachment #8393016 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Comment on attachment 8393016 [details] [diff] [review]
js/src/configure.in should append -Wl,--build-id to NSPR_LDFLAGS
Patch pushed to mozilla-inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/776f0b2ed5ad
Attachment #8393016 -
Flags: checkin+
Assignee | ||
Updated•11 years ago
|
Priority: -- → P2
Summary: Fix two issues with NSPR_LDFLAGS → js/src/configure.in should append -Wl,--build-id to NSPR_LDFLAGS
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•