MIPS: Loongson-3: Set cache flush handlers to cache_noop
[deliverable/linux.git] / arch / mips / Makefile
index e78d60dbdffdad93994421e684a87e2f34f8b802..c0b002a09befe4d80701b736411fa207893969d0 100644 (file)
@@ -12,6 +12,9 @@
 # for "archclean" cleaning up for this architecture.
 #
 
+archscripts: scripts_basic
+       $(Q)$(MAKE) $(build)=arch/mips/boot/tools relocs
+
 KBUILD_DEFCONFIG := ip22_defconfig
 
 #
@@ -93,6 +96,10 @@ LDFLAGS_vmlinux                      += -G 0 -static -n -nostdlib
 KBUILD_AFLAGS_MODULE           += -mlong-calls
 KBUILD_CFLAGS_MODULE           += -mlong-calls
 
+ifeq ($(CONFIG_RELOCATABLE),y)
+LDFLAGS_vmlinux                        += --emit-relocs
+endif
+
 #
 # pass -msoft-float to GAS if it supports it.  However on newer binutils
 # (specifically newer than 2.24.51.20140728) we then also need to explicitly
@@ -310,6 +317,10 @@ rom.bin rom.sw: vmlinux
                $(bootvars-y) $@
 endif
 
+CMD_RELOCS = arch/mips/boot/tools/relocs
+quiet_cmd_relocs = RELOCS  $<
+      cmd_relocs = $(CMD_RELOCS) $<
+
 #
 # Some machines like the Indy need 32-bit ELF binaries for booting purposes.
 # Other need ECOFF, so we build a 32-bit ELF binary for them which we then
@@ -318,6 +329,11 @@ endif
 quiet_cmd_32 = OBJCOPY $@
        cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
 vmlinux.32: vmlinux
+ifeq ($(CONFIG_RELOCATABLE)$(CONFIG_64BIT),yy)
+# Currently, objcopy fails to handle the relocations in the elf64
+# So the relocs tool must be run here to remove them first
+       $(call cmd,relocs)
+endif
        $(call cmd,32)
 
 #
@@ -333,6 +349,9 @@ all:        $(all-y)
 
 # boot
 $(boot-y): $(vmlinux-32) FORCE
+ifeq ($(CONFIG_RELOCATABLE)$(CONFIG_32BIT),yy)
+       $(call cmd,relocs)
+endif
        $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \
                $(bootvars-y) arch/mips/boot/$@
 
@@ -385,6 +404,7 @@ endif
 archclean:
        $(Q)$(MAKE) $(clean)=arch/mips/boot
        $(Q)$(MAKE) $(clean)=arch/mips/boot/compressed
+       $(Q)$(MAKE) $(clean)=arch/mips/boot/tools
        $(Q)$(MAKE) $(clean)=arch/mips/lasat
 
 define archhelp
This page took 0.028908 seconds and 5 git commands to generate.