aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2022-01-25 20:44:04 +0800
committerKito Cheng <kito.cheng@sifive.com>2022-02-05 16:10:12 +0800
commit06e32a5ebf20c11dd31bc2677bede569fef84316 (patch)
treef5c4044dad74f9b18895ae89c5621d1a7694003f /gcc/config.gcc
parent119cea98f664764cce04963243c39c8f6d797d33 (diff)
downloadgcc-06e32a5ebf20c11dd31bc2677bede569fef84316.zip
gcc-06e32a5ebf20c11dd31bc2677bede569fef84316.tar.gz
gcc-06e32a5ebf20c11dd31bc2677bede569fef84316.tar.bz2
RISC-V: Always pass -misa-spec to assembler [PR104219]
Add -misa-spec to OPTION_DEFAULT_SPECS to make sure -misa-spec will always pass that into assembler, that prevent GCC and binutils using different way to interpret the ISA string. gcc/ChangeLog: PR target/104219 * config.gcc (riscv*-*-*): Normalize the with_isa_spec value. (all_defaults): Add isa_spec. * config/riscv/riscv.h (OPTION_DEFAULT_SPECS): Add isa_spec.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index fdcfb5b..2cc5aee 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4643,12 +4643,14 @@ case "${target}" in
case "${with_isa_spec}" in
""|default|20191213|201912)
tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20191213"
+ with_isa_spec=20191213
;;
2.2)
tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_2P2"
;;
20190608 | 201906)
tm_defines="${tm_defines} TARGET_DEFAULT_ISA_SPEC=ISA_SPEC_CLASS_20190608"
+ with_isa_spec=20190608
;;
*)
echo "--with-isa-spec only accept 2.2, 20191213, 201912, 20190608 or 201906" 1>&2
@@ -5430,7 +5432,7 @@ case ${target} in
esac
t=
-all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu nan fp_32 odd_spreg_32 divide llsc mips-plt synci tls lxc1-sxc1 madd4"
+all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu nan fp_32 odd_spreg_32 divide llsc mips-plt synci tls lxc1-sxc1 madd4 isa_spec"
for option in $all_defaults
do
eval "val=\$with_"`echo $option | sed s/-/_/g`