Bug 804683

Summary: The global ldflag isn't
Product: [Fedora] Fedora Reporter: Steve Grubb <sgrubb>
Component: redhat-rpm-configAssignee: Panu Matilainen <pmatilai>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 16CC: a.badger, fche, jonathan, mitr, notting, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-08 16:47:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Steve Grubb 2012-03-19 15:15:08 UTC
Description of problem:
The global LDFLAG is not getting passed into everything like it should. For example, mysql:
http://kojipkgs.fedoraproject.org/packages/mysql/5.5.21/1.fc16/data/logs/x86_64/build.log

-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):
9.1.0-24.fc16

Comment 1 Bill Nottingham 2012-03-28 18:56:25 UTC
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 20:24:41 UTC
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 20:32:19 UTC
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 20:46:09 UTC
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 17:58:23 UTC
Can this bug be closed now?

Comment 6 Steve Grubb 2012-10-08 16:47:14 UTC
Yes this can be closed. This was fixed under Bug 807831.