未验证 提交 e8be5302 编写于 作者: A Alan Kao 提交者: Palmer Dabbelt

Cleanup ISA string setting

This patch cleanup the MARCH string passing to both compiler and
assembler.  Note that the CFLAGS should not contain "fd" before we
have mechnisms like kernel_fpu_begin/end in other architectures.
Signed-off-by: NAlan Kao <alankao@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
Cc: Vincent Chen <vincentc@andestech.com>
Cc: Zong Li <zong@andestech.com>
Cc: Nick Hu <nickhu@andestech.com>
Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
上级 007f5c35
...@@ -28,7 +28,6 @@ ifeq ($(CONFIG_ARCH_RV64I),y) ...@@ -28,7 +28,6 @@ ifeq ($(CONFIG_ARCH_RV64I),y)
KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128) KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128)
KBUILD_MARCH = rv64im
KBUILD_LDFLAGS += -melf64lriscv KBUILD_LDFLAGS += -melf64lriscv
else else
BITS := 32 BITS := 32
...@@ -36,22 +35,20 @@ else ...@@ -36,22 +35,20 @@ else
KBUILD_CFLAGS += -mabi=ilp32 KBUILD_CFLAGS += -mabi=ilp32
KBUILD_AFLAGS += -mabi=ilp32 KBUILD_AFLAGS += -mabi=ilp32
KBUILD_MARCH = rv32im
KBUILD_LDFLAGS += -melf32lriscv KBUILD_LDFLAGS += -melf32lriscv
endif endif
KBUILD_CFLAGS += -Wall KBUILD_CFLAGS += -Wall
ifeq ($(CONFIG_RISCV_ISA_A),y) # ISA string setting
KBUILD_ARCH_A = a riscv-march-$(CONFIG_ARCH_RV32I) := rv32im
endif riscv-march-$(CONFIG_ARCH_RV64I) := rv64im
ifeq ($(CONFIG_RISCV_ISA_C),y) riscv-march-$(CONFIG_RISCV_ISA_A) := $(riscv-march-y)a
KBUILD_ARCH_C = c riscv-march-y := $(riscv-march-y)fd
endif riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y))
KBUILD_AFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_ARCH_A)fd$(KBUILD_ARCH_C) KBUILD_AFLAGS += -march=$(riscv-march-y)
KBUILD_CFLAGS += -march=$(KBUILD_MARCH)$(KBUILD_ARCH_A)$(KBUILD_ARCH_C)
KBUILD_CFLAGS += -mno-save-restore KBUILD_CFLAGS += -mno-save-restore
KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET) KBUILD_CFLAGS += -DCONFIG_PAGE_OFFSET=$(CONFIG_PAGE_OFFSET)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册