Bug 804683 - The global ldflag isn't
Summary: The global ldflag isn't
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 16
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-19 15:15 UTC by Steve Grubb
Modified: 2012-10-08 16:47 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-08 16:47:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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