X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2FMakefile;h=a1f8d8b96b03faf5217d597ae59d28356012fb96;hb=57c351de715458f8fbee1e92e8cc65ddc00da04c;hp=6dcdbfb15ce37fade8e3f7f401dacab6218f5961;hpb=1f21d2bde0046e959b53756f74d96dfd040a803b;p=linux-2.6 diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6dcdbfb15c..a1f8d8b96b 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -18,15 +18,15 @@ cflags-y := # Select the object file format to substitute into the linker script. # ifdef CONFIG_CPU_LITTLE_ENDIAN -32bit-tool-prefix = mipsel-linux- -64bit-tool-prefix = mips64el-linux- +32bit-tool-archpref = mipsel +64bit-tool-archpref = mips64el 32bit-bfd = elf32-tradlittlemips 64bit-bfd = elf64-tradlittlemips 32bit-emul = elf32ltsmip 64bit-emul = elf64ltsmip else -32bit-tool-prefix = mips-linux- -64bit-tool-prefix = mips64-linux- +32bit-tool-archpref = mips +64bit-tool-archpref = mips64 32bit-bfd = elf32-tradbigmips 64bit-bfd = elf64-tradbigmips 32bit-emul = elf32btsmip @@ -34,16 +34,18 @@ else endif ifdef CONFIG_32BIT -tool-prefix = $(32bit-tool-prefix) +tool-archpref = $(32bit-tool-archpref) UTS_MACHINE := mips endif ifdef CONFIG_64BIT -tool-prefix = $(64bit-tool-prefix) +tool-archpref = $(64bit-tool-archpref) UTS_MACHINE := mips64 endif -ifdef CONFIG_CROSSCOMPILE -CROSS_COMPILE := $(tool-prefix) +ifneq ($(SUBARCH),$(ARCH)) + ifeq ($(CROSS_COMPILE),) + CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-linux-gnu- $(tool-archpref)-unknown-linux-gnu-) + endif endif ifdef CONFIG_32BIT @@ -148,7 +150,8 @@ endif # # Firmware support # -libs-$(CONFIG_ARC) += arch/mips/arc/ +libs-$(CONFIG_ARC) += arch/mips/fw/arc/ +libs-$(CONFIG_CFE) += arch/mips/fw/cfe/ libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/ # @@ -278,7 +281,6 @@ core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/ cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000 -CLEAN_FILES += drivers/tc/lk201-map.c # # Wind River PPMC Board (4KC + GT64120) @@ -534,6 +536,13 @@ load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000 libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/ load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 +# +# Broadcom BCM47XX boards +# +core-$(CONFIG_BCM47XX) += arch/mips/bcm47xx/ +cflags-$(CONFIG_BCM47XX) += -Iinclude/asm-mips/mach-bcm47xx +load-$(CONFIG_BCM47XX) := 0xffffffff80001000 + # # SNI RM # @@ -594,18 +603,20 @@ ifdef CONFIG_64BIT endif ifeq ($(KBUILD_SYM32), y) - cflags-y += -msym32 -DKBUILD_64BIT_SYM32 + ifeq ($(call cc-option-yn,-msym32), y) + cflags-y += -msym32 -DKBUILD_64BIT_SYM32 + endif endif endif -AFLAGS += $(cflags-y) -CFLAGS += $(cflags-y) \ +KBUILD_AFLAGS += $(cflags-y) +KBUILD_CFLAGS += $(cflags-y) \ -D"VMLINUX_LOAD_ADDRESS=$(load-y)" LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS -CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ +CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \ egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") ifdef CONFIG_64BIT @@ -622,7 +633,7 @@ OBJCOPYFLAGS += --remove-section=.reginfo # CPPFLAGS_vmlinux.lds := \ - $(CFLAGS) \ + $(KBUILD_CFLAGS) \ -D"LOADADDR=$(load-y)" \ -D"JIFFIES=$(JIFFIES)" \ -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"