gcc2_flags() may produce non-working flags. if CFLAGS is set to "-march=pentium -pipe" for example, it is replaced by "-march=i686-pipe", which is definitely wrong (pentium != i686, and missing space between options). when compiling gcc-2.95-r8 on a pentium system, this leads to "illegal instructions" and the build fails. here is a correct gcc2_flags(): gcc2_flags() { CFLAGS=${CFLAGS//pentium-mmx/i586} CFLAGS=${CFLAGS//pentium[234]/i686} CFLAGS=${CFLAGS//k6-[23]/k6} CFLAGS=${CFLAGS//athlon-tbird/i686} CFLAGS=${CFLAGS//athlon-4/i686} CFLAGS=${CFLAGS//athlon-[xm]p/i686} CFLAGS=${CFLAGS//athlon/i686} CXXFLAGS=${CXXFLAGS//pentium-mmx/i586} CXXFLAGS=${CXXFLAGS//pentium[234]/i686} CXXFLAGS=${CXXFLAGS//k6-[23]/k6} CXXFLAGS=${CXXFLAGS//athlon-tbird/i686} CXXFLAGS=${CXXFLAGS//athlon-4/i686} CXXFLAGS=${CXXFLAGS//athlon-[xm]p/i686} CXXFLAGS=${CXXFLAGS//athlon/i686} export CFLAGS CXXFLAGS } greetings, jukka
Created attachment 7293 [details, diff] patch for gcc.eclass v 1.8
why remove pentiumpro and classics pentium ?
'pentium' and 'pentiumpro' are valid options vor gcc3 AND gcc2 (see gcc2 info: Invoking GCC -> Submodel Options -> i386 Options).
here's a complete list of all i386 options of gcc2 and gcc3, so you can see what has to be changed in gcc2_flags() (what my patch already does): gcc2 gcc3 ---- ---- i386 i386 i486 i486 i586 (pentium) i586 (pentium) i686 (pentiumpro) i686 (pentiumpro) pentium-mmx pentium2 pentium3 pentium4 k6 k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp
Commited, thanks.