Bug 728974

Summary: rpm should export $RPM_LD_FLAGS
Product: [Fedora] Fedora Reporter: Adam Jackson <ajax>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: ffesti, jnovy, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-4.9.1.1-2.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-22 15:14:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
rpm-4.9.1.1-ld-flags.patch none

Description Adam Jackson 2011-08-08 14:26:04 UTC
Created attachment 517233 [details]
rpm-4.9.1.1-ld-flags.patch

Description of problem:

For background:

https://fedorahosted.org/fesco/ticket/563

The goal is to be able to say %define _hardened_build 1 in one's specfile and have all the necessary gcc and ld flags configured for you in the common cases.  This requires passing different arguments to the compile and link phases.  rpm has a $RPM_OPT_FLAGS for CFLAGS, but no matching RPM_LD_FLAGS for LDFLAGS.

I tried to find a way to export this from redhat-rpm-config, but it's pretty much not possible without copy-and-pasting the entire ___build_pre section from rpm.  Much simpler to just patch rpm's macros file directly, as in the attached patch.

This is a bit of a layering violation since __global_ldflags is defined in redhat-rpm-config, but detangling that mess is for another day.

Comment 1 Fedora Update System 2011-08-08 14:46:14 UTC
rpm-4.9.1-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/rpm-4.9.1-3.fc16

Comment 2 Fedora Update System 2011-08-08 20:49:38 UTC
Package rpm-4.9.1-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rpm-4.9.1-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/rpm-4.9.1-3.fc16
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-08-15 10:22:18 UTC
rpm-4.9.1.1-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/rpm-4.9.1.1-2.fc16

Comment 4 Fedora Update System 2011-08-22 15:14:13 UTC
rpm-4.9.1.1-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.