arm arch configuration question

Andreas Tobler andreast-list@fgznet.ch
Wed Nov 5 22:42:00 GMT 2014


Hi,

I wonder what the common configuration for an arm arch is.

Is my understanding correct, when I build a gcc for arm (32-bit) I have 
to pass the --with-arch=xxx. Then the compiler is built against this 
arch and especially 'tuned' for the corresponding cpu?

E.g, --with-arch=armv7-a gives an -mcpu=cortexa8 and the compiler can 
use all the nice features from this cpu set.

Another example, with --with-arch=armv6z it gives -mcpu=arm1176jzs and I 
can not use NEON stuff since it is not in this cpu subset, right?

Now when I do not pass the --with-arch I'll end up with code which is 
'optimized' for the arm10tdmi aka. --with-arch=armv5? (On linux eabi)
((#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi))

Back to my original question, if a distribution is going to ship an arm 
compiler, they always have to pass the --with-arch= switch to match 
their wishes?

My question originates from this situation:

- I have an arm-*-freebsd* triplet where I say the minimum 
SUBTARGET_CPU_DEFAULT is xx

- I have another triplet, armv6*-*-freebsd* where I want to set another 
SUBTARGET_CPU_DEFAULT

and on both configuration/buildsteps I want to avoid to pass the 
--with-arch.

Thanks,
Andreas



More information about the Gcc-help mailing list