Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75860 - (toolchain) Can't compile a non-hardened gcc 3.4.3
Summary: (toolchain) Can't compile a non-hardened gcc 3.4.3
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-27 17:17 UTC by Olivier Galibert
Modified: 2005-01-14 10:00 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Galibert 2004-12-27 17:17:57 UTC
gcc-3.4.3-r1 compiles in hardened mode, or at last with the pie/ssp patches even with USE="-hardened -pie -pic -ssp" with the result of breaking xorg and maybe other programs.  Selecting in gcc-config the version without -hardened* doesn't make any difference.


Reproducible: Always
Steps to Reproduce:
1. add -hardened -pie -pic -ssp and ~x86 to make.conf
2. emerge gcc
3. gcc -v, or alternatively emerge xorg-x11

Actual Results:  
gcc version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)



Expected Results:  
It shouldn't have included ssp or pie in the compilation.
Comment 1 Christian Apolloni 2005-01-11 07:54:48 UTC
Have you tried to select a different profile with gcc-config?
E.g. the "vanilla" profile.
Comment 2 solar (RETIRED) gentoo-dev 2005-01-11 08:51:21 UTC
make sure the env var GCC_SPECS is not set. echo $GCC_SPECS
Comment 3 Olivier Galibert 2005-01-13 13:56:25 UTC
GCC_SPECS is indeed set to hardened through /etc/csh.env while the vanilla profile is selected.  Interesting.  I guess that's a bug of env-update (and hence portage) then.  I'll try to trace it.

  OG.
Comment 4 solar (RETIRED) gentoo-dev 2005-01-14 09:32:33 UTC
remove the entry in /etc/env.d/gcc/ upgrade gcc-config and relogin to your tty's that still have it set in the env.

Note: it was not hardened@ that made the GCC_SPECS bug.

To see what's bins have been compiled with the hardened specs you can do something like this.
# note this will take a while.
for bin in $(for f in $(echo $PATH | tr : ' '); do file $f/* | grep ELF" "[36][24]-bit" "[LM]SB" shared object"; done | cut -d : -f 1) ; do qpkg -f $bin ; done | sort -u | less
Comment 5 Olivier Galibert 2005-01-14 10:00:26 UTC
Thanks.  A too old gcc-config was indeed the fundamental problem.  All looks well now.

  OG.