This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

March=native with a main 64bit system and 32bit chroot


Hi all,
I've a main Gentoo 64bit system with CHOST="x86_64-pc-linux-gnu" and
CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer".
My cpu is a Pentium 4 Prescott and i'm using gcc-4.3.2.

With this little script:
"echo 'float x(float x){return x < 0 ? -x : x;}' > x.c && gcc
-fverbose-asm -mtune=native -march=native -S x.c && grep
'\(-march\|-mtune\)' x.s && rm -fr x.c && rm -fr x.s "
i've found that gcc uses march=nocona and mtune=nocona, and this is ok.

In this main system i've some 32bit chroots with
CHOST="i686-pc-linux-gnu" and CFLAGS="-march=native -mtune=native -O2
-pipe -fomit-frame-pointer".
But this time gcc is using march=nocona and mtune=nocona again, that
is wrong i think.

Should i use march=native or march=prescott (that is what i was using
with old gcc versions) for my chroots?

If march=prescott is the right choice i think that the gcc "native"
detection should consider also $CHOST.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]