diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2020-06-19 16:59:52 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2020-06-22 11:24:54 +0800 |
commit | f4670347f10d36816e7da08796f96f087094ba58 (patch) | |
tree | e9db1ceb35119b119a7e5eb87372aec5fa56e43b | |
parent | 33d9794b7277a64543914bfbbfd567505e72da6c (diff) | |
download | gcc-f4670347f10d36816e7da08796f96f087094ba58.zip gcc-f4670347f10d36816e7da08796f96f087094ba58.tar.gz gcc-f4670347f10d36816e7da08796f96f087094ba58.tar.bz2 |
RISC-V: Normalize arch string in driver time
- Normalize arch string would help the multi-lib handling, e.g. rv64gc and
rv64g_c are both valid and same arch, but latter one would confuse
the detection of multi-lib, earlier normalize can resolve this issue.
gcc/ChangeLog:
* config/riscv/riscv.h (ASM_SPEC): Remove riscv_expand_arch call.
(DRIVER_SELF_SPECS): New.
-rw-r--r-- | gcc/config/riscv/riscv.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index cbcd574..9f67d82 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -64,10 +64,14 @@ extern const char *riscv_expand_arch (int argc, const char **argv); #define ASM_SPEC "\ %(subtarget_asm_debugging_spec) \ %{" FPIE_OR_FPIC_SPEC ":-fpic} \ -%{march=*:-march=%:riscv_expand_arch(%*)} \ +%{march=*} \ %{mabi=*} \ %(subtarget_asm_spec)" +#undef DRIVER_SELF_SPECS +#define DRIVER_SELF_SPECS \ +"%{march=*:-march=%:riscv_expand_arch(%*)}" + #define TARGET_DEFAULT_CMODEL CM_MEDLOW #define LOCAL_LABEL_PREFIX "." |