From: Kito Cheng Date: Fri, 19 Jun 2020 08:59:52 +0000 (+0800) Subject: RISC-V: Normalize arch string in driver time X-Git-Tag: basepoints/gcc-12~6678 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4670347f10d36816e7da08796f96f087094ba58;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index cbcd5749bed4..9f67d82e74e8 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 "."