diff options
author | Geng Qi <gengqi@linux.alibaba.com> | 2021-04-28 16:29:33 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2021-05-12 11:22:43 +0800 |
commit | 0ffbf77146542299e3873a136bf64cb82ad0cbdc (patch) | |
tree | 8718bef1637dd51c32a079dc2d38868177dba82d /libgomp/taskloop.c | |
parent | 9625dd9e58b99fe934e67b280c1f26f332be644c (diff) | |
download | gcc-0ffbf77146542299e3873a136bf64cb82ad0cbdc.zip gcc-0ffbf77146542299e3873a136bf64cb82ad0cbdc.tar.gz gcc-0ffbf77146542299e3873a136bf64cb82ad0cbdc.tar.bz2 |
RISC-V: For '-march' and '-mabi' options, add 'Negative' property mentions itself.
When use multi-lib riscv-tool-chain. A bug is triggered when there are two
'-march' at command line.
riscv64-unknown-elf-gcc -march=rv32gcp -mabi=ilp32f -march=rv32gcpzp64 HelloWorld.c
/lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/lib/crt0.o: ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/lib/crt0.o
/lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: /lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/crtbegin.o: ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /lhome/gengq/riscv64-linux-ptest/lib/gcc/riscv64-unknown-elf/10.2.0/crtbegin.o
......
This patch fix it. And the DRIVER would prune the extra '-march' and '-mabi'
options and keep only the last one valid.
gcc/ChangeLog:
* config/riscv/riscv.opt (march=,mabi=): Negative itself.
(cherry picked from commit 17f2908fcf058e145cff275966e34f8c7f57c2c5)
Diffstat (limited to 'libgomp/taskloop.c')
0 files changed, 0 insertions, 0 deletions