Bug 804683 - The global ldflag isn't
The global ldflag isn't
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-19 11:15 EDT by Steve Grubb
Modified: 2012-10-08 12:47 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-10-08 12:47:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Grubb 2012-03-19 11:15:08 EDT
Description of problem:
The global LDFLAG is not getting passed into everything like it should. For example, mysql:

-Wl,-z,relro is not anywhere in the build log. However, it is defined in %__global_ldflags. A random check of f16 packages pushed out over the weekend show almost none picked up partial relro support.

Version-Release number of selected component (if applicable):
Comment 1 Bill Nottingham 2012-03-28 14:56:25 EDT
Can you provide more examples behind mysql? By setting LDFLAGS in the spec, it's only going to transparently work if the project's buildsystem honors LDFLAGS from the environment. I suspect a lot of the software we ship is inconsistent in those regards.
Comment 2 Steve Grubb 2012-03-28 16:24:41 EDT
Here's some from recent updates that do not have partial relro: gnutls, xulrunner, ksh, firefox, chkconfig, libgcc, libquadmath, cups-libs, kdevplatform, libgomp, cpp, gcc, wireshark, foomatic, gcc-java, ntsysv, exempi, iproute, pigz, libtool-ldl   there are more. I do see some files with partial relro, though. Not sure if the correlation is using %configure vs ./configure.
Comment 3 Steve Grubb 2012-03-28 16:32:19 EDT
To clarify, I see how %__global_ldflags gets picked up if %configure is used. I don't see how it gets picked up in any other case. You can trace the %__global_cflags and how it gets picked up in either case, but the same thing is not done for the ldflags macro.
Comment 4 Bill Nottingham 2012-03-28 16:46:09 EDT
That's the most likely  correlation, yes. And in many cases, even if it's in the environment as LDFLAGS or RPM_LD_FLAGS, not everything picks that up. (I just fixed chkconfig in this regard.)

Bug 807831 filed to use a bigger hammer.
Comment 5 Toshio Ernie Kuratomi 2012-10-03 13:58:23 EDT
Can this bug be closed now?
Comment 6 Steve Grubb 2012-10-08 12:47:14 EDT
Yes this can be closed. This was fixed under Bug 807831.

Note You need to log in before you can comment on or make changes to this bug.