Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666096 - sys-libs/glibc-2.27-r6 `__TMC_END__' can not be used when making a PIE object
Summary: sys-libs/glibc-2.27-r6 `__TMC_END__' can not be used when making a PIE object
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-12 18:23 UTC by Andreas Westin
Modified: 2018-09-12 20:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log.tar.xz,129.28 KB, application/x-xz)
2018-09-12 18:25 UTC, Andreas Westin
Details
emerge --info (info.log,5.49 KB, text/plain)
2018-09-12 18:25 UTC, Andreas Westin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Westin 2018-09-12 18:23:53 UTC
Hi,

emerging glibc-2.27-r6 (and -r5) results in a compilation error:

/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/crtbegin.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: nonrepresentable section on output


Reproducible: Always
Comment 1 Andreas Westin 2018-09-12 18:25:22 UTC
Created attachment 546786 [details]
build log
Comment 2 Andreas Westin 2018-09-12 18:25:45 UTC
Created attachment 546788 [details]
emerge --info
Comment 3 Andreas Westin 2018-09-12 18:27:37 UTC
Just to clarify, this is using a hardened toolchain.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2018-09-12 19:03:12 UTC
This breakage is caused by explicit mention of -fPIC / -fPIE in CFLAGS:
> CFLAGS="-march=native -O2 -pipe -fPIE -fPIC"

Normally you should hever add those flags to CFLAGS. Previous instance is bug #664340
Comment 5 Andreas Westin 2018-09-12 20:47:14 UTC
Thanks Sergei, that solved the issue. I've had those flags there for a long time, completely forgot about them.