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 - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld breaks -static
Summary: -specs=/usr/lib/rpm/redhat/redhat-hardened-ld breaks -static
Keywords:
Status: CLOSED DUPLICATE of bug 1343892
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Festi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1202091 (view as bug list)
Depends On: 1192183
Blocks: harden-failure 1202091
TreeView+ depends on / blocked
 
Reported: 2015-12-02 15:09 UTC by Kamil Dudka
Modified: 2019-12-02 07:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-08 10:50:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1343892 0 unspecified CLOSED Default hardened ld flags break autoconf/libtool detection of -static flag with gcc 2022-05-16 11:32:56 UTC

Internal Links: 1343892

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


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