Bug 728974 - rpm should export $RPM_LD_FLAGS
Summary: rpm should export $RPM_LD_FLAGS
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 16
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-08 14:26 UTC by Adam Jackson
Modified: 2011-08-22 15:14 UTC (History)
3 users (show)

Fixed In Version: rpm-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-08-22 15:14:22 UTC
Type: ---

Attachments (Terms of Use)
rpm- (665 bytes, application/octet-stream)
2011-08-08 14:26 UTC, Adam Jackson
no flags Details

Description Adam Jackson 2011-08-08 14:26:04 UTC
Created attachment 517233 [details]

Description of problem:

For background:


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.

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:
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-08-15 10:22:18 UTC
rpm- has been submitted as an update for Fedora 16.

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

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