Commit 02f99327 by Kito Cheng

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.
parent 34d6b34b
...@@ -64,10 +64,14 @@ extern const char *riscv_expand_arch (int argc, const char **argv); ...@@ -64,10 +64,14 @@ extern const char *riscv_expand_arch (int argc, const char **argv);
#define ASM_SPEC "\ #define ASM_SPEC "\
%(subtarget_asm_debugging_spec) \ %(subtarget_asm_debugging_spec) \
%{" FPIE_OR_FPIC_SPEC ":-fpic} \ %{" FPIE_OR_FPIC_SPEC ":-fpic} \
%{march=*:-march=%:riscv_expand_arch(%*)} \ %{march=*} \
%{mabi=*} \ %{mabi=*} \
%(subtarget_asm_spec)" %(subtarget_asm_spec)"
#undef DRIVER_SELF_SPECS
#define DRIVER_SELF_SPECS \
"%{march=*:-march=%:riscv_expand_arch(%*)}"
#define TARGET_DEFAULT_CMODEL CM_MEDLOW #define TARGET_DEFAULT_CMODEL CM_MEDLOW
#define LOCAL_LABEL_PREFIX "." #define LOCAL_LABEL_PREFIX "."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment