On a gentoo hardened system, the compile of sys-devel/gcc-4.4.6-r1 fails during the configure phase. Here is a short snippet of the build log: checking for x86_64-pc-linux-gnu-ranlib... /usr/x86_64-pc-linux-gnu/bin/ranlib checking for x86_64-pc-linux-gnu-strip... /usr/x86_64-pc-linux-gnu/bin/strip checking whether ln -s works... yes checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include checking for suffix of object files... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/x86_64-pc-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[2]: *** [configure-stage1-target-libgcc] Error 1 Reproducible: Always Steps to Reproduce: 1. emerge -uDNv world 2. wait for gcc build to fail
Created attachment 309213 [details] emerge --info =sys-devel/gcc-4.4.6-r1
Created attachment 309215 [details] work/build/gcc-build-logs.tar.bz2
output of 'emerge -pqv =sys-devel/gcc-4.4.6-r1': [ebuild U ] sys-devel/gcc-4.4.6-r1 [4.4.5] USE="cxx fortran gtk hardened mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite (-libssp) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla (-libffi%)" * IMPORTANT: 2 news items need reading for repository 'gentoo'. * Use eselect news to read news items.
Comment on attachment 309215 [details] work/build/gcc-build-logs.tar.bz2 Please attach the config.log to this bug report.
(In reply to comment #4) > Comment on attachment 309215 [details] > work/build/gcc-build-logs.tar.bz2 > > Please attach the config.log to this bug report. Skip that, you included it in the tarball.
./x86_64-pc-linux-gnu/libgcc/config.log: configure:2415: /var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -o conftest -g -pipe -O2 -march=atom -mtune=atom -O2 conftest.c >&5 conftest.c:1: error: bad value (atom) for -march= switch conftest.c:1: error: bad value (atom) for -mtune= switch configure:2418: $? = 1 configure:2590: checking for suffix of object files configure:2611: /var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -c -g -pipe -O2 -march=atom -mtune=atom -O2 conftest.c >&5 conftest.c:1: error: bad value (atom) for -march= switch conftest.c:1: error: bad value (atom) for -mtune= switch configure:2614: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:2627: error: in `/var/tmp/portage/sys-devel/gcc-4.4.6-r1/work/build/x86_64-pc-linux-gnu/libgcc': configure:2630: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. You are using a newer gcc which understands -march=atom to build an older gcc which does not, so you need to stick to something like -march/-mtune=i686 in your CFLAGS.