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 - hardened build flag breaks static linking
Summary: hardened build flag breaks static linking
Keywords:
Status: CLOSED DUPLICATE of bug 1343892
Alias: None
Product: Fedora
Classification: Fedora
Component: distribution
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Václav Pavlín
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: harden-failure 1202091 1210424
TreeView+ depends on / blocked
 
Reported: 2015-03-20 13:52 UTC by Richard W.M. Jones
Modified: 2016-06-09 14:14 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1202091
Environment:
Last Closed: 2016-06-09 14:14:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


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