Skip to contentSkip to conversation

Fix building with O=

PATCH New Tom Rini 1 participant 1 message Oct 20, 2004 MIPS

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Fix building with O=

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

arch/mips/Makefile +4 -3
@@ -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
 
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/