[PATCH] Fix building with O=

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When building with O=, -Iinclude/asm-mips/mach-generic catches
$(O)/include/asm-mips/ which isn't what we want.  Similarly, we don't
want $(O)/include/asm/gcc but $(srctree)/include/asm-mips/gcc.  Finally,
we want to explicitly look into $(srctree)/include/asm-mips/mach-generic
when processing vmlinux.lds

Signed-off-by: Tom Rini <trini@xxxxxxxxxxxxxxxxxxx>

--- linux-2.6.9.orig/arch/mips/Makefile
+++ linux-2.6.9/arch/mips/Makefile
@@ -72,7 +72,7 @@ endif
 # machines may also.  Since BFD is incredibly buggy with respect to
 # crossformat linking we rely on the elf2ecoff tool for format conversion.
 #
-cflags-y			+= -I $(TOPDIR)/include/asm/gcc
+cflags-y			+= -I $(srctree)/include/asm-mips/gcc
 cflags-y			+= -G 0 -mno-abicalls -fno-pic -pipe
 cflags-y			+= $(call cc-option, -finline-limit=100000)
 LDFLAGS_vmlinux			+= -G 0 -static -n
@@ -632,7 +632,7 @@ core-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/
 core-$(CONFIG_TOSHIBA_RBTX4927)	+= arch/mips/tx4927/common/
 load-$(CONFIG_TOSHIBA_RBTX4927)	+= 0xffffffff80020000
 
-cflags-y			+= -Iinclude/asm-mips/mach-generic
+cflags-y			+= -I $(srctree)/include/asm-mips/mach-generic
 drivers-$(CONFIG_PCI)		+= arch/mips/pci/
 
 ifdef CONFIG_MIPS32
@@ -669,7 +669,8 @@ OBJCOPYFLAGS		+= --remove-section=.regin
 CPPFLAGS_vmlinux.lds := \
 	-D"LOADADDR=$(load-y)" \
 	-D"JIFFIES=$(JIFFIES)" \
-	-imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h
+	-imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h \
+	-I $(srctree)/include/asm-mips/mach-generic
 
 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o

-- 
Tom Rini
http://gate.crashing.org/~trini/


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux