How to determine what is default x86-64 -march= value for a given release of gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm building something with
=============================
zorn:~> gcc-12 -v
Using built-in specs.
COLLECT_GCC=gcc-12
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 12.3.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-ALHxjy/gcc-12-12.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-ALHxjy/gcc-12-12.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04)
=============================
On this processor:

model name	: Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz

which one web page says is
=============================
For my Xeon X5460 CPU ("Harpertown", a Yorkfield-based, i.e. "core2", but with the "Penryn" microarchitecture)
=============================
it fails with

Program received signal SIGILL, Illegal instruction.
0x00007ffff7c8ed0a in ___H___repl () from /export/users/lucier/local/Gambit/current/lib/libgambit.so
(gdb) disassemble 0x00007ffff7c8ed0a, 0x00007ffff7c8ed0f
Dump of assembler code from 0x7ffff7c8ed0a to 0x7ffff7c8ed0f:
=> 0x00007ffff7c8ed0a <___H___repl+184138>:	rdtscp
   0x00007ffff7c8ed0d <___H___repl+184141>:	shl    $0x20,%rdx
End of assembler dump.

And it works fine on another machine with the processor:

Intel Xeon E3-1271 v3 Haswell 3.6GHz 8MB L3 Cache ...

The software build doesn't specify any -march= value, and I don't see that gcc-12 was built with any special value for -march=

So it appears that the Xeon X5460 CPU from 2008 doesn't have the rdtscp instruction, which is used by default by this version of gcc on x86-64 when no architecture is specified.

If I say

gcc -Q --help=target

I get

  -march=                     		x86-64


with a lot of other options enabled or disabled.

So, is there a way to tell what the default -march= value for a given version of gcc is?

Brad



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux