]> err.no Git - linux-2.6/commitdiff
sh: Wrap CPU tuning through cc-option.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 1 Jun 2007 08:25:42 +0000 (17:25 +0900)
committerPaul Mundt <lethal@hera.kernel.org>
Fri, 8 Jun 2007 02:43:46 +0000 (02:43 +0000)
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>
arch/sh/Makefile

index ec2d82eda90d0ee11edb6af11d83ffcebfb3a964..aa76167ceb48bacfe629db9efd2383cb814d595a 100644 (file)
@@ -34,12 +34,14 @@ isa-y                       := $(isa-y)-nofpu
 endif
 endif
 
-cflags-$(CONFIG_CPU_SH2)               := -m2
-cflags-$(CONFIG_CPU_SH2A)              := -m2a $(call cc-option,-m2a-nofpu,)
-cflags-$(CONFIG_CPU_SH3)               := -m3
-cflags-$(CONFIG_CPU_SH4)               := -m4 \
+cflags-$(CONFIG_CPU_SH2)               := $(call cc-option,-m2,)
+cflags-$(CONFIG_CPU_SH2A)              := $(call cc-option,-m2a,) \
+                                          $(call cc-option,-m2a-nofpu,)
+cflags-$(CONFIG_CPU_SH3)               := $(call cc-option,-m3,)
+cflags-$(CONFIG_CPU_SH4)               := $(call cc-option,-m4,) \
        $(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_LITTLE_ENDIAN)     += -ml