sh: x3 - fix setup_bootmem_node() compile error with shx3_defconfig
[linux-block.git] / arch / sh / Makefile
index 0016609d1ebaac288b7541e91c46aacdb213c948..37cf636fba552f2657262db9a37c8b7debdf892c 100644 (file)
@@ -34,6 +34,8 @@ isa-y                 := $(isa-y)-nofpu
 endif
 endif
 
+isa-y                  := $(isa-y)-up
+
 cflags-$(CONFIG_CPU_SH2)               := $(call cc-option,-m2,)
 cflags-$(CONFIG_CPU_SH2A)              += $(call cc-option,-m2a,) \
                                           $(call cc-option,-m2a-nofpu,)
@@ -46,7 +48,20 @@ cflags-$(CONFIG_CPU_SH4A)            += $(call cc-option,-m4a,) \
 cflags-$(CONFIG_CPU_BIG_ENDIAN)                += -mb
 cflags-$(CONFIG_CPU_LITTLE_ENDIAN)     += -ml
 
-cflags-y       += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding
+#
+# -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that
+# support it, while -Wa,-dsp by itself limits the range of usable opcodes
+# on certain CPU subtypes. Try the ISA variant first, and if that fails,
+# fall back on -Wa,-dsp for the old binutils versions. Even without DSP
+# opcodes, we always want the best ISA tuning the version of binutils
+# will provide.
+#
+isaflags-y     := $(call as-option,-Wa$(comma)-isa=$(isa-y),)
+
+isaflags-$(CONFIG_SH_DSP)              := \
+       $(call as-option,-Wa$(comma)-isa=$(isa-y),-Wa$(comma)-dsp)
+
+cflags-y       += $(isaflags-y) -ffreestanding
 
 cflags-$(CONFIG_MORE_COMPILE_OPTIONS)  += \
        $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
@@ -91,9 +106,7 @@ machdir-$(CONFIG_SH_SOLUTION_ENGINE)         += se/770x
 machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE)      += se/7722
 machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)      += se/7751
 machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE)      += se/7780
-machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)      += se/7300
 machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE)      += se/7343
-machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE)     += se/73180
 machdir-$(CONFIG_SH_HP6XX)                     += hp6xx
 machdir-$(CONFIG_SH_DREAMCAST)                 += dreamcast
 machdir-$(CONFIG_SH_MPC1211)                   += mpc1211
@@ -105,6 +118,7 @@ machdir-$(CONFIG_SH_7751_SYSTEMH)           += renesas/systemh
 machdir-$(CONFIG_SH_EDOSK7705)                 += renesas/edosk7705
 machdir-$(CONFIG_SH_HIGHLANDER)                        += renesas/r7780rp
 machdir-$(CONFIG_SH_7710VOIPGW)                        += renesas/sh7710voipgw
+machdir-$(CONFIG_SH_X3PROTO)                   += renesas/x3proto
 machdir-$(CONFIG_SH_SH4202_MICRODEV)           += superh/microdev
 machdir-$(CONFIG_SH_LANDISK)                   += landisk
 machdir-$(CONFIG_SH_TITAN)                     += titan