Gentoo Archives: gentoo-user

From: Steffen Loos <fenlo@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gcc 4.2.4 fails to build
Date: Tue, 01 Dec 2009 16:07:17
Message-Id: 4B153F18.4050405@gmx.net
In Reply to: [gentoo-user] gcc 4.2.4 fails to build by Roger Mason
1 Roger Mason schrieb:
2 > Hello,
3 >
4 > I need to build gcc 4.2 on a core 2 duo system. The only 4.2.x version
5 > is 4.2.4, which is masked by ~. When I try to build it fails:
6 >
7 > ...
8 > /var/tmp/portage/sys-devel/gcc-4.2.4-r1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.2.4-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 -O2 -O2 -O2 -march=core2 -pipe -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -msse -c \
9 > /var/tmp/portage/sys-devel/gcc-4.2.4-r1/work/gcc-4.2.4/gcc/config/i386/crtfastmath.c \
10 > -o crtfastmath.o
11 > /var/tmp/portage/sys-devel/gcc-4.2.4-r1/work/gcc-4.2.4/gcc/config/i386/crtfastmath.c:1: error: bad value (core2) for -march= switch
12 > /var/tmp/portage/sys-devel/gcc-4.2.4-r1/work/gcc-4.2.4/gcc/config/i386/crtfastmath.c:1:
13 > error: bad value (core2) for -mtune= switch
14 >
15 > I do indeed have -march=core2 in /etc/make.conf. I suppose I could
16 > change -march= to something else and try again - but what should I
17 > change it to? gcc-4.2.4 would only be used for non-portage compiling
18 > so, am I right in thinking that after it is built it would be safe to
19 > revert to -march=core2?
20
21 You can try "march=native".
22
23 Maybe it is a good choice for make.conf too?!
24
25 And yes, you can switch back to core2 after emerge gcc-4.2.4. It's only used from emerge processes.
26
27 Steffen