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 1204162

Summary: hardened build flag breaks static linking
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: distributionAssignee: Václav Pavlín <vpavlin>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: berrange, dennis, extras-qa, jkaluza, moez.roy, orion, prabhjyotsingh95, ptoscano, rjones
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1202091 Environment:
Last Closed: 2016-06-09 14:14:29 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:    
Bug Blocks: 1199775, 1202091, 1210424    

Description Richard W.M. Jones 2015-03-20 13:52:57 UTC
+++ This bug was initially created as a clone of Bug #1202091 +++

When you use the hardened build flags, and your package contains any
static linking at all (including in the ./configure tests), it fails
with the following error:

gcc -static -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -static -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o init init-init.o
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/5.0.0/../../../../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.0.0/../../../../lib64/libc.a: error adding symbols: Bad value

Comment 1 Jan Kurik 2015-07-15 14:23:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 2 Daniel Berrangé 2016-06-08 13:17:22 UTC
FWIW, this bug is really filed against the wrong component. The problem lies in redhat-rpm-config and a fix is shown in this bug https://bugzilla.redhat.com/show_bug.cgi?id=1343892

Comment 3 Richard W.M. Jones 2016-06-09 14:14:29 UTC

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