Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1287743

Summary: -specs=/usr/lib/rpm/redhat/redhat-hardened-ld breaks -static
Product: [Fedora] Fedora Reporter: Kamil Dudka <kdudka>
Component: redhat-rpm-configAssignee: Florian Festi <ffesti>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: ffesti, fweimer, jonathan, moez.roy, pmatilai, praiskup, rjones
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-08 10:50:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1192183    
Bug Blocks: 1199775, 1202091    

Description Kamil Dudka 2015-12-02 15:09:32 UTC
Description of problem:
With -specs=/usr/lib/rpm/redhat/redhat-hardened-ld in LDFLAGS it is no longer possible to statically link the C run-time.  I see no way to work around this breakage, except removing -specs=/usr/lib/rpm/redhat/redhat-hardened-ld from LDFLAGS.


Version-Release number of selected component (if applicable):
redhat-rpm-config-36-1.fc23.noarch


Steps to Reproduce:
$ printf 'int main() { }\n' | gcc -xc - -static
$ printf 'int main() { }\n' | gcc -xc - -static -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/libc.a(libc-start.o): relocation R_X86_64_32 against `_dl_starting_up' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/libc.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Comment 1 Kamil Dudka 2016-02-12 09:03:51 UTC
No reply for two months.  Is this package still actively maintained?

Comment 2 Panu Matilainen 2016-11-08 10:50:14 UTC
Marking as duplicate of bug 1343892 which has more information and a possible fix.

*** This bug has been marked as a duplicate of bug 1343892 ***

Comment 3 Richard W.M. Jones 2016-11-24 11:55:01 UTC
*** Bug 1202091 has been marked as a duplicate of this bug. ***