Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46366 - util-linux gives additional -fPIC errors on amd64 with -pie
Summary: util-linux gives additional -fPIC errors on amd64 with -pie
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 All
: High normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-31 07:55 UTC by Travis Tilley (RETIRED)
Modified: 2004-04-02 08:13 UTC (History)
0 users

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


Attachments
Patch against sys-apps/util-linux-2.12-r{4,5} to make them work with CFLGAS="-pie -fPIC" on amd64 (util-linux-2.12-amd64-pie-fPIC.diff,624 bytes, patch)
2004-04-02 04:38 UTC, Danny van Dyk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Travis Tilley (RETIRED) gentoo-dev 2004-03-31 07:55:01 UTC
util-linux gives an additional -fPIC error on amd64 with -pie in LDFLAGS.

make[1]: Entering directory `/var/tmp/portage/util-linux-2.12-r4/work/util-linux-2.12/getopt'
gcc -c -O2 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes -Wstrict-prototypes -DNCH=1   -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -O2 -fomit-frame-pointer -pipe -fstack-protector getopt.c -o getopt.o
gcc -pie getopt.o -o getopt
/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: getopt.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
getopt.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [getopt] Error 1
make[1]: Leaving directory `/var/tmp/portage/util-linux-2.12-r4/work/util-linux-2.12/getopt'

temp fix is likely to filter-ldflags -pie, but the eventual goal is to get pie working.
Comment 1 Danny van Dyk (RETIRED) gentoo-dev 2004-04-02 04:38:13 UTC
Created attachment 28569 [details, diff]
Patch against sys-apps/util-linux-2.12-r{4,5} to make them work with CFLGAS="-pie -fPIC" on amd64

The problem is, that -fPIC gets filtered by the ebuild(s) on all archs except
x86, sparc, hppa and ppc. I added "amd64" to the list of archs on which no
filtering of CFLAGS should happen and it works for me.
I attach patches against sys-apps/util-linux-2.12-r{4,5} as those are the
latest stable and the latest unstable version on amd64 (though the last one is
package.mask'ed).
Comment 2 solar (RETIRED) gentoo-dev 2004-04-02 08:13:33 UTC
updated in ~arch only for now. util-linux-2.12-r5.ebuild

Please test and help get it to a stable state.