linux-mips
[Top] [All Lists]

[PATCH] Fix building with O=

To: linux-mips@linux-mips.org
Subject: [PATCH] Fix building with O=
From: Tom Rini <trini@kernel.crashing.org>
Date: Wed, 20 Oct 2004 09:47:39 -0700
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.6+20040907i
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@kernel.crashing.org>

--- 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/

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] Fix building with O=, Tom Rini <=