]> git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Expand system-dependent -m{arch,cpu,tune}=native options master
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 24 Jul 2025 13:35:47 +0000 (15:35 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 24 Jul 2025 14:22:01 +0000 (16:22 +0200)
commit29d24c81f42341f8cb725da3dbca7f7357ecbb40
tree964b04837eb5b86cd2f12778f41ac12b1186e51f
parentb98a57bad7ba2d409938453a0d7640d199d38802
fix: Expand system-dependent -m{arch,cpu,tune}=native options

The -march=native, -mcpu=native and -mtune=native options have different
effects depending on which system the compiler is run.

Fix this by asking the compiler which cc1 options the -m*=native options
expand to and including them in the input hash.

Fixes #824.
src/ccache/argprocessing.cpp
src/ccache/argprocessing.hpp
src/ccache/ccache.cpp
test/fake-compilers/clang-march-native.sh [new file with mode: 0755]
test/fake-compilers/gcc-march-native.sh [new file with mode: 0755]
test/run
test/suites/base.bash