diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-11-22 17:35:23 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-11-27 15:54:30 +0100 |
commit | 297fe5c166f1d920da6d5ef9c7e02846b0148575 (patch) | |
tree | 34af4f21c4b84a3b0752b9bbd220473254b45387 /libcpp/expr.cc | |
parent | c768917402d4cba69a92c737e56e177f5b8ab0df (diff) | |
download | gcc-297fe5c166f1d920da6d5ef9c7e02846b0148575.zip gcc-297fe5c166f1d920da6d5ef9c7e02846b0148575.tar.gz gcc-297fe5c166f1d920da6d5ef9c7e02846b0148575.tar.bz2 |
GCN: Tag '-march=[...]', '-mtune=[...]' as 'Negative' of themselves [PR112669]
Certain other command-line flags are mutually exclusive (random example: GCN
'-march=gfx906', '-march=gfx908'). If they're not appropriately marked up,
this does disturb the multilib selection machinery, for example:
$ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory -march=gfx906
gfx906
$ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory -march=gfx908
gfx908
$ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory -march=gfx906 -march=gfx908
.
In the last invocation, '-march=gfx900 -march=gfx906', for example, in
'gcc/gcc.cc:set_multilib_dir' we see both flags -- which there doesn't exist a
matching multilib for, therefore we "fail" to the default ('.'). Tagges as
'Negative', only the last flag survives, and we, for example, get the expected:
$ build-gcc-offload-amdgcn-amdhsa/gcc/xgcc -print-multi-directory -march=gfx906 -march=gfx908
gfx908
I quickly found that the same also applies to GCN's '-mtune=[...]', but I've
not otherwise reviewed the GCN options.
PR target/112669
gcc/
* config/gcn/gcn.opt (march=, mtune=): Tag as 'Negative' of
themselves.
Diffstat (limited to 'libcpp/expr.cc')
0 files changed, 0 insertions, 0 deletions