Commit 6240d92f authored by Paul Mundt's avatar Paul Mundt Committed by Paul Mundt

sh: Wrap CPU tuning through cc-option.

Some compilers don't support the explicit CPU tuning, while binutils
is still able to handle the special subtype-specific opcodes. Make
the CFLAG optional, falling back on the compiler default if nothing
better exists.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent fa1ec92e
...@@ -34,12 +34,14 @@ isa-y := $(isa-y)-nofpu ...@@ -34,12 +34,14 @@ isa-y := $(isa-y)-nofpu
endif endif
endif endif
cflags-$(CONFIG_CPU_SH2) := -m2 cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,)
cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,) cflags-$(CONFIG_CPU_SH2A) := $(call cc-option,-m2a,) \
cflags-$(CONFIG_CPU_SH3) := -m3 $(call cc-option,-m2a-nofpu,)
cflags-$(CONFIG_CPU_SH4) := -m4 \ cflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,)
cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \
$(call cc-option,-mno-implicit-fp,-m4-nofpu) $(call cc-option,-mno-implicit-fp,-m4-nofpu)
cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) $(call cc-option,-m4a-nofpu,) cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) \
$(call cc-option,-m4a-nofpu,)
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
......
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