diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-06-01 04:25:42 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-06-07 22:43:46 -0400 |
commit | 6240d92f2f2fb74094b66b3510733fa0a1e2631a (patch) | |
tree | 8a9396be85e8902a3514b22dd475556bd8ef83e4 | |
parent | fa1ec92e1dcd4fa4be23db24e4c019c0e4194c89 (diff) |
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: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index ec2d82eda90d..aa76167ceb48 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -34,12 +34,14 @@ isa-y := $(isa-y)-nofpu | |||
34 | endif | 34 | endif |
35 | endif | 35 | endif |
36 | 36 | ||
37 | cflags-$(CONFIG_CPU_SH2) := -m2 | 37 | cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,) |
38 | cflags-$(CONFIG_CPU_SH2A) := -m2a $(call cc-option,-m2a-nofpu,) | 38 | cflags-$(CONFIG_CPU_SH2A) := $(call cc-option,-m2a,) \ |
39 | cflags-$(CONFIG_CPU_SH3) := -m3 | 39 | $(call cc-option,-m2a-nofpu,) |
40 | cflags-$(CONFIG_CPU_SH4) := -m4 \ | 40 | cflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,) |
41 | cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \ | ||
41 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) | 42 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) |
42 | cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) $(call cc-option,-m4a-nofpu,) | 43 | cflags-$(CONFIG_CPU_SH4A) := $(call cc-option,-m4a,) \ |
44 | $(call cc-option,-m4a-nofpu,) | ||
43 | 45 | ||
44 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | 46 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb |
45 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | 47 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml |