GCC Optimizacija 64bit
Jump to navigation
Jump to search
GCC kompiliatoriaus optimizacijos 64bit platformai[keisti]
Straipsnis yra kaip pavyzdys ir nėra išbaigtas.
echo 'int main(){return 0;}' > test.c && gcc -v -Q -march=native -O2 test.c -o test && rm test.c test
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native" CXXFLAGS="${CFLAGS}"
To find out what -march=native actually picks on the local hardware
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
MAKEOPTS="-j3"
If you're having gcc-4.3+ and "pni" in flags, you may want to use -march=k8-sse3 instead of -march=k8. You can take out the -msse3 by doing this.