sh: x3 - fix setup_bootmem_node() compile error with shx3_defconfig
[linux-block.git] / arch / sh / Makefile
index c7323e7dce67bd2253b2797b25d69f7a852052b4..37cf636fba552f2657262db9a37c8b7debdf892c 100644 (file)
@@ -34,19 +34,34 @@ 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 \
+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,)
+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
 
-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-$(CONFIG_SH_DSP)                        += -Wa,-dsp
+cflags-y       += $(isaflags-y) -ffreestanding
 
 cflags-$(CONFIG_MORE_COMPILE_OPTIONS)  += \
        $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
@@ -91,11 +106,8 @@ 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_SATURN)                    += saturn
 machdir-$(CONFIG_SH_DREAMCAST)                 += dreamcast
 machdir-$(CONFIG_SH_MPC1211)                   += mpc1211
 machdir-$(CONFIG_SH_SH03)                      += sh03
@@ -106,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
@@ -113,7 +126,6 @@ machdir-$(CONFIG_SH_SHMIN)                  += shmin
 machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE)      += se/7206
 machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE)      += se/7619
 machdir-$(CONFIG_SH_LBOX_RE2)                  += lboxre2
-machdir-$(CONFIG_SH_UNKNOWN)                   += unknown
 
 incdir-y       := $(notdir $(machdir-y))
 
@@ -123,8 +135,7 @@ core-y      += $(addprefix arch/sh/boards/, \
 endif
 
 # Companion chips
-core-$(CONFIG_HD64461)         += arch/sh/cchips/hd6446x/hd64461/
-core-$(CONFIG_HD64465)         += arch/sh/cchips/hd6446x/hd64465/
+core-$(CONFIG_HD6446X_SERIES)  += arch/sh/cchips/hd6446x/
 core-$(CONFIG_VOYAGERGX)       += arch/sh/cchips/voyagergx/
 
 cpuincdir-$(CONFIG_CPU_SH2)    := cpu-sh2
@@ -200,7 +211,9 @@ compressed: zImage
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
-CLEAN_FILES += include/asm-sh/machtypes.h
+CLEAN_FILES += include/asm-sh/machtypes.h \
+              include/asm-sh/cpu include/asm-sh/.cpu \
+              include/asm-sh/mach include/asm-sh/.mach
 
 define archhelp
        @echo '* zImage                    - Compressed kernel image'