Bug 1548397 - redhat-rpm-config: Move -z now from GCC specs file to GCC command line
Summary: redhat-rpm-config: Move -z now from GCC specs file to GCC command line
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Festi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1548418
TreeView+ depends on / blocked
 
Reported: 2018-02-23 12:10 UTC by Florian Weimer
Modified: 2018-02-26 12:25 UTC (History)
8 users (show)

Fixed In Version: redhat-rpm-config-102-1.fc29 redhat-rpm-config-102-1.fc28
Clone Of:
Environment:
Last Closed: 2018-02-24 22:12:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2018-02-23 12:10:44 UTC
-z now is not conditional on PIC vs PIE, so it is not necessary to specify it in redhat-hardened-ld.  We can put it directly into %_hardening_ldflags.  This should improve the injection success for shared objects somewhat, in case a linker invocation is used which strips the -specs= argument.

Comment 1 Igor Gnatenko 2018-02-23 12:36:27 UTC
How would this affect clang?

Comment 2 Florian Weimer 2018-02-23 12:47:00 UTC
Clang would recognize -Wl,-z,now as a linker flag and pass it to ld, so it would produce by accident the full set of required linker flags for shared objects after this change.

(Keep in mind that clang is not a supported compiler for building RPMs.)

Comment 3 Florian Weimer 2018-02-24 17:06:59 UTC
I'm implementing this gradually, first leaving -z now in the GCC specs file in place, and removing that only after rebuilding some of the extension builders.


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