[Nottingham] gcc install options

Martin martin at ml1.co.uk
Thu Nov 13 16:42:51 GMT 2003


Robert Davies wrote:
> On Wednesday 12 Nov 2003 22:34, Martin wrote:
> 
>>Martin wrote:
> 
> 
>>How should I change the "i686-pc-linux-gnu" to more accurately specify
>>my host cpu?
> 
> 
> It is described in the GCC doc's, in section of boot strapping.  You'll have 
> to invoke Make with right parameters, after the config stage.

Thanks, and sure enough:

At the config stage

[gcc322obj-athlonxp]# ../gcc-3.3.2/configure --prefix=/usr 
--program-suffix=-332 --infodir=/usr/share/info --mandir=/usr/share/man 
--enable-checking athlon-xp
Invalid configuration `athlon-xp': system `xp' not recognized
Invalid configuration `athlon-xp': system `xp' not recognized
Unrecognized host system name athlon-xp.
[gcc322obj-athlonxp]# ../gcc-3.3.2/configure --prefix=/usr 
--program-suffix=-332 --infodir=/usr/share/info --mandir=/usr/share/man 
--enable-checking athlonxp
Invalid configuration `athlonxp': machine `athlonxp' not recognized
Invalid configuration `athlonxp': machine `athlonxp' not recognized
Unrecognized host system name athlonxp.
[gcc322obj-athlonxp]# ../gcc-3.3.2/configure --prefix=/usr 
--program-suffix=-332 --infodir=/usr/share/info --mandir=/usr/share/man 
--enable-checking --target=athlon-xp
Configuring for a i686-pc-linux-gnu host.
Invalid configuration `athlon-xp': system `xp' not recognized
Unrecognized target system name athlon-xp.



The way to do it is:

export MACHTYPE="i686-mandrake-linux-gnu"

Do a 'configure' as normal, and then:

make CFLAGS='-march=athlon-4 -O' LIBCFLAGS='-march=athlon-xp -g -O2' 
LIBCXXFLAGS='-march=athlon-4 -g -O2 -fno-implicit-templates' bootstrap

(Those flags turn off debug for the compiler, and enables debug for the 
libraries.)


The full list is:

   +Choose from this list:
   +
   +        Intel 386:                      i386
   +        Intel 486:                      i486
   +        Intel Pentium 1:                pentium
   +        Intel Pentium MMX:              pentium-mmx
   +        Intel Pentium Pro:              pentiumpro
   +        Intel Pentium 2:                pentium2
   +        Intel Pentium 3:                pentium3
   +        Intel Pentium 4:                pentium4
   +
   +        AMD K6-1:                       k6
   +        AMD K6-2:                       k6-2
   +        AMD K6-3:                       k6-3
   +        AMD Athlon 1 (Classic):         athlon
   +        AMD Athlon 2 (Thunderbird):     athlon-tbird
   +        AMD Athlon 3 (XP):              athlon-xp
   +        AMD Athlon 4 (Palomino):        athlon-4
   +        AMD Athlon 5 (MP):              athlon-mp
   +
   +Set it to the system with
   +
   +        # export CFLAGS=-march=$VALUE
   +        # export CXXFLAGS=-march=$VALUE



Regards,
Martin


-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------




More information about the Nottingham mailing list