diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2020-12-03 18:40:34 +0000 |
---|---|---|
committer | Sebastian Pop <spop@amazon.com> | 2020-12-14 17:31:46 +0000 |
commit | 4dc486b6ba9362f45fe8252b91d0f5c03d85a0d0 (patch) | |
tree | 8db61072a2218a5d9c04a29a6ab3d20ccfc287a6 /gcc/config.gcc | |
parent | ca086b8b8bb3995f369a523e92db4bf0cb763194 (diff) | |
download | gcc-4dc486b6ba9362f45fe8252b91d0f5c03d85a0d0.zip gcc-4dc486b6ba9362f45fe8252b91d0f5c03d85a0d0.tar.gz gcc-4dc486b6ba9362f45fe8252b91d0f5c03d85a0d0.tar.bz2 |
AArch64: Add support for --with-tune
Add support for --with-tune. Like --with-cpu and --with-arch, the argument is
validated and transformed into a -mtune option to be processed like any other
command-line option. --with-tune has no effect if a -mcpu or -mtune option
is used. The validating code didn't allow --with-cpu=native, so explicitly
allow that.
Co-authored-by: Delia Burduv <delia.burduv@arm.com>
Bootstrap OK, regress pass, OK to commit?
2020-09-03 Wilco Dijkstra <wdijkstr@arm.com>
gcc/
* config.gcc (aarch64*-*-*): Add --with-tune. Support --with-cpu=native.
* config/aarch64/aarch64.h (OPTION_DEFAULT_SPECS): Add --with-tune.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_tune_cortex_a76): New
effective target test.
* gcc.target/aarch64/with-tune-config.c: New test.
* gcc.target/aarch64/with-tune-march.c: Likewise.
* gcc.target/aarch64/with-tune-mcpu.c: Likewise.
* gcc.target/aarch64/with-tune-mtune.c: Likewise.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 3650b46..50c10dc 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4157,6 +4157,12 @@ case "${target}" in sed -e 's/,.*$//'` fi + # Disallow extensions in --with-tune=cortex-a53+crc. + if [ $which = tune ] && [ x"$ext_val" != x ]; then + echo "Architecture extensions not supported in --with-$which=$val" 1>&2 + exit 1 + fi + # Use the pre-processor to strip flatten the options. # This makes the format less rigid than if we use # grep and sed directly here. @@ -4214,8 +4220,13 @@ case "${target}" in fi true else - echo "Unknown $which used in --with-$which=$val" 1>&2 - exit 1 + # Allow --with-$which=native. + if [ "$val" = native ]; then + true + else + echo "Unknown $which used in --with-$which=$val" 1>&2 + exit 1 + fi fi done ;; |