Remove 'TOPDIR' from Makefiles
Subsystems (7)
cover Remove 'TOPDIR' from Makefiles
TOPDIR is obsolete, use srctree or objtree instead.
This patch set removes all the TOPDIR use in the whole source tree and finally drops it in the top Makefile. They're against the current linus-tree.
Note that Patch [8/8] should be applied _after_ all the previous patches are applied.
Regards.
PATCH 1/8 UML: Remove 'TOPDIR' from Makefiles
TOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all UML Makefiles.
---
arch/um/Makefile +2 -2
@@ -158,7 +158,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ else - $(Q)cd $(TOPDIR)/$(dir $@) ; \ + $(Q)cd $(objtree)/$(dir $@) ; \ ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@) endif
@@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch else - $(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch + $(Q)cd $(objtree)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch endif $(objtree)/$(ARCH_DIR)/include:
arch/um/sys-ppc/Makefile +11 -11
@@ -6,7 +6,7 @@ OBJ = built-in.o OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ ptrace_user.o sysrq.o -EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(TOPDIR)/arch/ppc/kernel +EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(objtree)/arch/ppc/kernel all: $(OBJ)
@@ -22,25 +22,25 @@ sigcontext.o: sigcontext.c semaphore.c: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@ + ln -s $(objtree)/arch/ppc/kernel/$@ $@ checksum.S: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/lib/$@ $@ + ln -s $(objtree)/arch/ppc/lib/$@ $@ mk_defs.c: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@ + ln -s $(objtree)/arch/ppc/kernel/$@ $@ ppc_defs.head: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@ + ln -s $(objtree)/arch/ppc/kernel/$@ $@ ppc_defs.h: mk_defs.c ppc_defs.head \ - $(TOPDIR)/include/asm-ppc/mmu.h \ - $(TOPDIR)/include/asm-ppc/processor.h \ - $(TOPDIR)/include/asm-ppc/pgtable.h \ - $(TOPDIR)/include/asm-ppc/ptrace.h + $(objtree)/include/asm-ppc/mmu.h \ + $(objtree)/include/asm-ppc/processor.h \ + $(objtree)/include/asm-ppc/pgtable.h \ + $(objtree)/include/asm-ppc/ptrace.h # $(CC) $(CFLAGS) -S mk_defs.c cp ppc_defs.head ppc_defs.h # for bk, this way we can write to the file even if it's not checked out
@@ -56,13 +56,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \ checksum.o: checksum.S rm -f asm - ln -s $(TOPDIR)/include/asm-ppc asm + ln -s $(objtree)/include/asm-ppc asm $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm misc.o: misc.S ppc_defs.h rm -f asm - ln -s $(TOPDIR)/include/asm-ppc asm + ln -s $(objtree)/include/asm-ppc asm $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm
arch/x86/Makefile_32 +0 -0
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
Quoted 4 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from all UML Makefiles.
I do not feel confident with these changes.
In some places I had expected to see srctree and not objtree. I would like to see this tested before applying it.
Building a ppc toolchain now to test it...
Sam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
Quoted 11 lines · Sam Ravnborg
Quoted 4 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from all UML Makefiles.I do not feel confident with these changes.
In some places I had expected to see srctree and not objtree. I would like to see this tested before applying it.Building a ppc toolchain now to test it...
It seems that building a ppc based um kernel is not supported in mainline.Kconfig.ppc is missing and when creating it um build fails in sys-ppc/ due to user-offset.c is missing.
As most of your patch touches ppc specific code I suggest
to just replace TOPDIR with srctree all over (no semantic change) and the the um people can figure out the ppc stuff when they get to it.
Sam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
(Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
Quoted 13 lines · Sam Ravnborg
Quoted 11 lines · Sam Ravnborg
Quoted 4 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from all UML Makefiles.I do not feel confident with these changes.
In some places I had expected to see srctree and not objtree. I would like to see this tested before applying it.Building a ppc toolchain now to test it...
Quoted 8 lines
It seems that building a ppc based um kernel is not supported in mainline.
Kconfig.ppcis missing and when creating it um build fails in sys-ppc/ due touser-offset.cis missing.As most of your patch touches ppc specific code I suggest
to just replace TOPDIR with srctree all over (no semantic change) and the the um people can figure out the ppc stuff when they get to it.
You're right. I use srctree instead. And tested with:
$ make O=../foobar/ ARCH=um linux
It works fine. Thanks for your points!
-------->
TOPDIR is obsolete, use srctree instead. This patch removes TOPDIR from all UML Makefiles.
---
arch/um/Makefile +2 -2
@@ -158,7 +158,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ else - $(Q)cd $(TOPDIR)/$(dir $@) ; \ + $(Q)cd $(srctree)/$(dir $@) ; \ ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@) endif
@@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch else - $(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch + $(Q)cd $(srctree)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch endif $(objtree)/$(ARCH_DIR)/include:
arch/um/sys-ppc/Makefile +11 -11
@@ -6,7 +6,7 @@ OBJ = built-in.o OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ ptrace_user.o sysrq.o -EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(TOPDIR)/arch/ppc/kernel +EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel all: $(OBJ)
@@ -22,25 +22,25 @@ sigcontext.o: sigcontext.c semaphore.c: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@ + ln -s $(srctree)/arch/ppc/kernel/$@ $@ checksum.S: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/lib/$@ $@ + ln -s $(srctree)/arch/ppc/lib/$@ $@ mk_defs.c: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@ + ln -s $(srctree)/arch/ppc/kernel/$@ $@ ppc_defs.head: rm -f $@ - ln -s $(TOPDIR)/arch/ppc/kernel/$@ $@ + ln -s $(srctree)/arch/ppc/kernel/$@ $@ ppc_defs.h: mk_defs.c ppc_defs.head \ - $(TOPDIR)/include/asm-ppc/mmu.h \ - $(TOPDIR)/include/asm-ppc/processor.h \ - $(TOPDIR)/include/asm-ppc/pgtable.h \ - $(TOPDIR)/include/asm-ppc/ptrace.h + $(srctree)/include/asm-ppc/mmu.h \ + $(srctree)/include/asm-ppc/processor.h \ + $(srctree)/include/asm-ppc/pgtable.h \ + $(srctree)/include/asm-ppc/ptrace.h # $(CC) $(CFLAGS) -S mk_defs.c cp ppc_defs.head ppc_defs.h # for bk, this way we can write to the file even if it's not checked out
@@ -56,13 +56,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \ checksum.o: checksum.S rm -f asm - ln -s $(TOPDIR)/include/asm-ppc asm + ln -s $(srctree)/include/asm-ppc asm $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm misc.o: misc.S ppc_defs.h rm -f asm - ln -s $(TOPDIR)/include/asm-ppc asm + ln -s $(srctree)/include/asm-ppc asm $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o rm -f asm
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: (Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
Quoted 2 lines · WANG Cong
TOPDIR is obsolete, use srctree instead.
This patch removes TOPDIR from all UML Makefiles.
Thanks, I'll send this to Andrew.
Jeff
Signature · 10 lines
Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: (Try #2) [Patch 1/8] UML: Remove 'TOPDIR' from Makefiles
Quoted 5 lines · Jeff Dike
Quoted 2 lines · WANG Cong
TOPDIR is obsolete, use srctree instead.
This patch removes TOPDIR from all UML Makefiles.Thanks, I'll send this to Andrew.
Thanks Jeff.
Sam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH 2/8 MIPS: Remove 'TOPDIR' from Makefiles
In reply to WANG CongTOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all Mips Makefiles.
---
arch/mips/lasat/image/Makefile +2 -2
@@ -12,7 +12,7 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = $(objtree)/vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) -I$(objtree)/include -c -o $@ $< OBJECTS = head.o kImage.o
Re: [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 15 lines · WANG Cong
TOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all Mips Makefiles.
Cc Ralf Baechle <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>---
arch/mips/lasat/image/Makefile +0
-0
arch/mips/lasat/image/Makefile endif · line 15
Quoted 5 lines
arch/mips/lasat/image/Makefile +1
-1@@ -12,7 +12,7 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = $(objtree)/vmlinux
Current directory when building is $(objtree) so here we should just skip the use of TOPDIR like this:
arch/mips/lasat/image/Makefile HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 27
Quoted 12 lines
arch/mips/lasat/image/Makefile +2
-1+KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) -I$(objtree)/include -c -o $@ $<
This has never worked with O=.. builds.
The correct fix here is to use:
arch/mips/lasat/image/Makefile HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 28
Quoted 1 line
arch/mips/lasat/image/Makefile +1
-0+ $(CC) -fno-pic $(HEAD_DEFINES) -Iinclude -Iinclude2 -c -o $@ $<
The -Iinclude2 is only for O=... builds so to keep current behaviour removing $(TOPDIR)/ would do it.
Sam
(Try #2) [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 20 lines
Review
Quoted 3 lines
(quoted diff) +1
-1-KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = $(objtree)/vmlinuxCurrent directory when building is $(objtree) so here we should just skip the use of TOPDIR like this:
Review HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 27
Quoted 12 lines
(quoted diff) +2
-1+KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) -I$(objtree)/include -c -o $@ $<This has never worked with O=.. builds.
The correct fix here is to use:
Quoted 4 lines
Review HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 28
Quoted 1 line
(quoted diff) +1
-0+ $(CC) -fno-pic $(HEAD_DEFINES) -Iinclude -Iinclude2 -c -o $@ $<The -Iinclude2 is only for O=... builds so to keep current behaviour removing $(TOPDIR)/ would do it.
Thank you for your explanations!
The following one corrects all the mistakes as you told.
------->
Since TOPDIR is obsolete, this patch removes TOPDIR from the Mips Makefiles.
---
arch/mips/lasat/image/Makefile +2 -2
@@ -12,7 +12,7 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) -Iinclude -Iinclude2 -c -o $@ $< OBJECTS = head.o kImage.o
Re: [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
In reply to Sam RavnborgQuoted 8 lines · Sam Ravnborg
arch/mips/lasat/image/Makefile HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 27
Quoted 6 lines
arch/mips/lasat/image/Makefile +1
-1@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) -I$(objtree)/include -c -o $@ $<This has never worked with O=.. builds.
The correct fix here is to use:
Quoted 4 lines
Review HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 28
Quoted 1 line
(quoted diff) +1
-0+ $(CC) -fno-pic $(HEAD_DEFINES) -Iinclude -Iinclude2 -c -o $@ $<The -Iinclude2 is only for O=... builds so to keep current behaviour removing $(TOPDIR)/ would do it.
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 10 lines · Andreas Schwab
Quoted 8 lines · Sam Ravnborg
arch/mips/lasat/image/Makefile HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 27
Quoted 6 lines
arch/mips/lasat/image/Makefile +1
-1@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) -I$(objtree)/include -c -o $@ $<This has never worked with O=.. builds.
The correct fix here is to use:
Quoted 6 lines
Quoted 4 lines
Review HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ · line 28
Quoted 1 line
(quoted diff) +1
-0+ $(CC) -fno-pic $(HEAD_DEFINES) -Iinclude -Iinclude2 -c -o $@ $<The -Iinclude2 is only for O=... builds so to keep current behaviour removing $(TOPDIR)/ would do it.
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
It would be better to use $(LINUXINCLUDE) as we then pull in all config symbols too and do not have to hardcode kbuild internal names (include2).
As for the use of KBUILD_CPPFLAGS at present the usage is not consistent across the architectures. Why does arm for example say:KBUILD_CPPFLAGS += -mbig-endian
This looks like a KBUILD_CFLAGS thing to me.
So we should preferably stick with LINUXINCLUDE for now.
Sam
(Try #3) [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 5 lines
Quoted 3 lines
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
It would be better to use $(LINUXINCLUDE) as we then pull in all config symbols too and do not have to hardcode kbuild internal names (include2).
OK. Refine this patch.
----------->
Since TOPDIR is obsolete, this patch removes TOPDIR from the Mips Makefiles.
---
arch/mips/lasat/image/Makefile +2 -2
@@ -12,7 +12,7 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )
@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $< OBJECTS = head.o kImage.o
Sam Ravnborg
AppliedRe: (Try #3) [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 8 lines · WANG Cong
Quoted 5 lines
Quoted 3 lines
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
It would be better to use $(LINUXINCLUDE) as we then pull in all config symbols too and do not have to hardcode kbuild internal names (include2).
OK. Refine this patch.
Quoted 9 lines
----------->
Since TOPDIR is obsolete, this patch removes TOPDIR from the Mips Makefiles.
Cc Ralf Baechle <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>
Applied.
Sam
Re: (Try #3) [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
In reply to WANG CongQuoted 5 lines · WANG Cong
Quoted 3 lines
Quoted 1 line
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
It would be better to use $(LINUXINCLUDE) as we then pull in all config symbols too and do not have to hardcode kbuild internal names (include2).
OK. Refine this patch.
LDSCRIPT also needed fixing to get builds in a separate object directory working again.
I've applied below fix.
Ralf
From 8babf06e1265214116fb8ffc634c04df85597c52 Mon Sep 17 00:00:00 2001
From: WANG Cong <[email protected]>
Date: Wed, 2 Jan 2008 14:21:36 +0800
Subject: [PATCH] [MIPS] Lasat: Fix built in separate object directory.
[Ralf: The LDSCRIPT script needed fixing, too]
arch/mips/lasat/image/Makefile +3 -3
@@ -12,11 +12,11 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ ) -LDSCRIPT= -L$(obj) -Tromscript.normal +LDSCRIPT= -L$(srctree)/$(obj) -Tromscript.normal HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D_kernel_entry=0x$(KERNEL_ENTRY) \
@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $< OBJECTS = head.o kImage.o
Re: (Try #3) [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 6 lines · Ralf Baechle
Quoted 4 lines · WANG Cong
Quoted 3 lines
Quoted 1 line
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
It would be better to use $(LINUXINCLUDE) as we then pull in all config symbols too and do not have to hardcode kbuild internal names (include2).
Quoted 6 lines
Quoted 1 line
OK. Refine this patch.
LDSCRIPT also needed fixing to get builds in a separate object directory working again.
I've applied below fix.
Great - I will drop it from my tree.
See small comment below.
Sam
Quoted 18 lines
Ralf
From
8babf06e1265214116fb8ffc634c04df85597c52Mon Sep 17 00:00:00 2001
From: WANG Cong <[email protected]>
Date: Wed, 2 Jan 2008 14:21:36 +0800
Subject: [PATCH] [MIPS] Lasat: Fix built in separate object directory.Signed-off-by WANG Cong <[email protected]>[Ralf: The LDSCRIPT script needed fixing, too]
Signed-off-by Ralf Baechle <[email protected]>arch/mips/lasat/image/Makefile +0
-0
arch/mips/lasat/image/Makefile endif · line 19
Quoted 10 lines
arch/mips/lasat/image/Makefile +2
-2@@ -12,11 +12,11 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ ) -LDSCRIPT= -L$(obj) -Tromscript.normal +LDSCRIPT= -L$(srctree)/$(obj) -Tromscript.normal
This needs to read:
arch/mips/lasat/image/Makefile endif · line 20
Quoted 1 line
arch/mips/lasat/image/Makefile +1
-0+LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal
(There is no difference between src and obj in normal cases but to be consistent it shuld be like above).
Quoted 12 lines
arch/mips/lasat/image/Makefile +1
-1HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D_kernel_entry=0x$(KERNEL_ENTRY) \@@ -24,7 +24,7 @@ HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ -D TIMESTAMP=$(shell date +%s) $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) - $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< + $(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $< OBJECTS = head.o kImage.o
Re: (Try #3) [Patch 2/8] MIPS: Remove 'TOPDIR' from Makefiles
Quoted 51 lines · Sam Ravnborg
Quoted 6 lines · Ralf Baechle
Quoted 4 lines · WANG Cong
Quoted 3 lines
Quoted 1 line
Shouldn't that use $(LINUXINCLUDE), or $(KBUILD_CPPFLAGS)?
It would be better to use $(LINUXINCLUDE) as we then pull in all config symbols too and do not have to hardcode kbuild internal names (include2).
Quoted 6 lines
Quoted 1 line
OK. Refine this patch.
LDSCRIPT also needed fixing to get builds in a separate object directory working again.
I've applied below fix.
Great - I will drop it from my tree.
See small comment below.
Sam
Quoted 18 lines
Ralf
From
8babf06e1265214116fb8ffc634c04df85597c52Mon Sep 17 00:00:00 2001
From: WANG Cong <[email protected]>
Date: Wed, 2 Jan 2008 14:21:36 +0800
Subject: [PATCH] [MIPS] Lasat: Fix built in separate object directory.Signed-off-by WANG Cong <[email protected]>[Ralf: The LDSCRIPT script needed fixing, too]
Signed-off-by Ralf Baechle <[email protected]>arch/mips/lasat/image/Makefile +0
-0arch/mips/lasat/image/Makefile endif · line 19
Quoted 10 lines
arch/mips/lasat/image/Makefile +2
-2@@ -12,11 +12,11 @@ endif MKLASATIMG = mklasatimg MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200 -KERNEL_IMAGE = $(TOPDIR)/vmlinux +KERNEL_IMAGE = vmlinux KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ ) KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ ) -LDSCRIPT= -L$(obj) -Tromscript.normal +LDSCRIPT= -L$(srctree)/$(obj) -Tromscript.normalThis needs to read:
Quoted 5 lines
arch/mips/lasat/image/Makefile endif · line 20
Quoted 1 line
arch/mips/lasat/image/Makefile +1
-0+LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal(There is no difference between src and obj in normal cases but to be consistent it shuld be like above).
Agreed. Thank you!
PATCH 3/8 S390: Remove 'TOPDIR' from Makefiles
In reply to WANG CongTOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all s390 Makefiles.
---
arch/s390/kernel/Makefile +1 -1
@@ -34,4 +34,4 @@ obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) # # This is just to get the dependencies... # -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c +binfmt_elf32.o: $(objtree)/fs/binfmt_elf.c
Re: [Patch 3/8] S390: Remove 'TOPDIR' from Makefiles
Quoted 15 lines · WANG Cong
TOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all s390 Makefiles.
Cc Martin Schwidefsky <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>---
arch/s390/kernel/Makefile +0
-0
arch/s390/kernel/Makefile obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) · line 37
Quoted 5 lines
arch/s390/kernel/Makefile +1
-1@@ -34,4 +34,4 @@ obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) # # This is just to get the dependencies... # -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c +binfmt_elf32.o: $(objtree)/fs/binfmt_elf.c
This prerequisite listing looks just bogus and should be removed altogether. We only need to list prerequisites explicit for generated files.
Sam
(Try #2) [Patch 3/8] S390: Tiny fixes for Makefile
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +1
-1-binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c +binfmt_elf32.o: $(objtree)/fs/binfmt_elf.cThis prerequisite listing looks just bogus and should be removed altogether. We only need to list prerequisites explicit for generated files.
Not so sure whether this is what s390 people do on purpose. Thanks anyway!
The following one contains the new fix.
------------>
This patch removes TOPDIR and fixes a bogus prerequisite in arch/s390/kernel/Makefile.
----
arch/s390/kernel/Makefile +2 -2
@@ -20,7 +20,7 @@ obj-$(CONFIG_AUDIT) += audit.o compat-obj-$(CONFIG_AUDIT) += compat_audit.o obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ compat_wrapper.o compat_exec_domain.o \ - binfmt_elf32.o $(compat-obj-y) + binfmt_elf.o $(compat-obj-y) obj-$(CONFIG_VIRT_TIMER) += vtime.o obj-$(CONFIG_STACKTRACE) += stacktrace.o
@@ -34,4 +34,4 @@ obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) # # This is just to get the dependencies... # -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c +binfmt_elf.o: $(objtree)/fs/binfmt_elf.c
Re: (Try #2) [Patch 3/8] S390: Tiny fixes for Makefile
Quoted 37 lines · WANG Cong
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +1
-1-binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c +binfmt_elf32.o: $(objtree)/fs/binfmt_elf.cThis prerequisite listing looks just bogus and should be removed altogether. We only need to list prerequisites explicit for generated files.
Not so sure whether this is what s390 people do on purpose. Thanks anyway!
The following one contains the new fix.
------------>
This patch removes TOPDIR and fixes a bogus prerequisite in
arch/s390/kernel/Makefile.Cc Martin Schwidefsky <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>----
arch/s390/kernel/Makefile +1
-1@@ -20,7 +20,7 @@ obj-$(CONFIG_AUDIT) += audit.o compat-obj-$(CONFIG_AUDIT) += compat_audit.o obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ compat_wrapper.o compat_exec_domain.o \ - binfmt_elf32.o $(compat-obj-y) + binfmt_elf.o $(compat-obj-y) obj-$(CONFIG_VIRT_TIMER) += vtime.o obj-$(CONFIG_STACKTRACE) += stacktrace.o
arch/s390/kernel/Makefile obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) · line 37
Quoted 5 lines
arch/s390/kernel/Makefile +1
-1@@ -34,4 +34,4 @@ obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) # # This is just to get the dependencies... # -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c +binfmt_elf.o: $(objtree)/fs/binfmt_elf.c
This is wrong. s390 have a file named binfmt_elf32.c and with this change it does no longer build.
If the output file does not exist then kbuild does not care about the dependencies and will just build the target.
On the second invocation when the target exists then kbuild has created a file named .<target>.cmd that list the dependencies and this includes any included .c file.
So there is just no pint in defining this dependency explicit in the MAkefile - kbuild will figure it out automatically.
The right fix is just to kill the explicit listed dependency.
Sam
(Try #3) [Patch 3/8] S390: Remove 'TOPDIR' from Makefile
Quoted 10 lines
If the output file does not exist then kbuild does not care about the dependencies and will just build the target.
On the second invocation when the target exists then kbuild has created a file named .<target>.cmd that list the dependencies and this includes any included .c file.
So there is just no pint in defining this dependency explicit in the MAkefile - kbuild will figure it out automatically.The right fix is just to kill the explicit listed dependency.
If I understand you correctly, then the fix should be the below one.
-------->
This patch removes TOPDIR from arch/s390/kernel/Makefile.
---
arch/s390/kernel/Makefile +0 -4
@@ -31,7 +31,3 @@ S390_KEXEC_OBJS := machine_kexec.o crash.o S390_KEXEC_OBJS += $(if $(CONFIG_64BIT),relocate_kernel64.o,relocate_kernel.o) obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) -# -# This is just to get the dependencies... -# -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c
Re: (Try #3) [Patch 3/8] S390: Remove 'TOPDIR' from Makefile
arch/s390/kernel/Makefile S390_KEXEC_OBJS := machine_kexec.o crash.o · line 37
Quoted 13 lines · WANG Cong
arch/s390/kernel/Makefile +0
-4@@ -31,7 +31,3 @@ S390_KEXEC_OBJS := machine_kexec.o crash.o S390_KEXEC_OBJS += $(if $(CONFIG_64BIT),relocate_kernel64.o,relocate_kernel.o) obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) -# -# This is just to get the dependencies... -# -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c
This one is correct. I'll add it to git390.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Re: (Try #3) [Patch 3/8] S390: Remove 'TOPDIR' from Makefile
Quoted 10 lines · Martin Schwidefsky
Quoted 9 lines · WANG Cong
arch/s390/kernel/Makefile +0
-0@@ -31,7 +31,3 @@ S390_KEXEC_OBJS := machine_kexec.o crash.o S390_KEXEC_OBJS += $(if $(CONFIG_64BIT),relocate_kernel64.o,relocate_kernel.o) obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS)
Quoted 6 lines
arch/s390/kernel/Makefile S390_KEXEC_OBJS := machine_kexec.o crash.o · line 37
Quoted 4 lines
arch/s390/kernel/Makefile +0
-4-# -# This is just to get the dependencies... -# -binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.cThis one is correct. I'll add it to git390.
Thanks Martin.
Sam
PATCH 4/8 CRIS: Remove 'TOPDIR' from Makefiles
In reply to WANG CongTOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all Cris Makefiles.
---
arch/cris/arch-v32/boot/compressed/Makefile +1 -1
@@ -7,7 +7,7 @@ target = $(target_compressed_dir) src = $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +CC = gcc-cris -mlinux -march=v32 -I $(objtree)/include CFLAGS = -O2 LD = gcc-cris -mlinux -march=v32 -nostdlib OBJCOPY = objcopy-cris
Re: [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles
Quoted 15 lines · WANG Cong
TOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all Cris Makefiles.
Cc Mikael Starvik <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>---
arch/cris/arch-v32/boot/compressed/Makefile +0
-0
arch/cris/arch-v32/boot/compressed/Makefile line 10
Quoted 5 lines
arch/cris/arch-v32/boot/compressed/Makefile +1
-1@@ -7,7 +7,7 @@ target = $(target_compressed_dir) src = $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +CC = gcc-cris -mlinux -march=v32 -I $(objtree)/include
As in the mips case the right fix is to use:
arch/cris/arch-v32/boot/compressed/Makefile line 11
Quoted 1 line
arch/cris/arch-v32/boot/compressed/Makefile +1
-0+CC = gcc-cris -mlinux -march=v32 -Iinclude -Iinclude2
In this way we pick up the includes also in the O=.. case.
PS. Mikael - should Jesper be mentioned in MAINTAINERS?
Sam
(Try #2) [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles
Quoted 9 lines
Review
Quoted 3 lines
(quoted diff) +1
-1-CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +CC = gcc-cris -mlinux -march=v32 -I $(objtree)/includeAs in the mips case the right fix is to use:
Quoted 1 line
+CC = gcc-cris -mlinux -march=v32 -Iinclude -Iinclude2
In this way we pick up the includes also in the O=.. case.
Thanks, Sam!
Resend it. ;)
--------->
This patch removes TOPDIR from Cris Makefiles.
---
arch/cris/arch-v32/boot/compressed/Makefile +1 -1
@@ -7,7 +7,7 @@ target = $(target_compressed_dir) src = $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +CC = gcc-cris -mlinux -march=v32 -Iinclude -Iinclude2 CFLAGS = -O2 LD = gcc-cris -mlinux -march=v32 -nostdlib OBJCOPY = objcopy-cris
(Try #3) [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles
Refine it as suggested by Andreas.
-------->
This patch removes TOPDIR from Cris Makefiles.
---
arch/cris/arch-v32/boot/compressed/Makefile +1 -1
@@ -7,7 +7,7 @@ target = $(target_compressed_dir) src = $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) CFLAGS = -O2 LD = gcc-cris -mlinux -march=v32 -nostdlib OBJCOPY = objcopy-cris
Re: (Try #3) [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles
Quoted 11 lines · WANG Cong
Refine it as suggested by Andreas.
-------->
This patch removes TOPDIR from Cris Makefiles.
Cc Mikael Starvik <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Andreas Schwab <[email protected]>Signed-off-by WANG Cong <[email protected]>
Added Jesper to Cc and applied.
Sam
Re: (Try #3) [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles
Quoted 7 lines · Sam Ravnborg
Quoted 6 lines · WANG Cong
Refine it as suggested by Andreas.
-------->
This patch removes TOPDIR from Cris Makefiles.
We had the TOPDIR replaced with $(srcdir) already, but this looks better.
Compiles OK for both EtraxFS and ARTPEC-3 cpus in our tree.
Quoted 6 lines
Quoted 4 lines
Cc Mikael Starvik <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Andreas Schwab <[email protected]>Signed-off-by WANG Cong <[email protected]>Added Jesper to Cc and applied.
Thanks!
Quoted 1 line
Sam
/^JN - Jesper Nilsson
--
Jesper Nilsson -- [email protected]
Sam Ravnborg
Tested-by Jesper NilssonRe: (Try #3) [Patch 4/8] CRIS: Remove 'TOPDIR' from Makefiles
Quoted 5 lines · Jesper Nilsson
Quoted 4 lines · Sam Ravnborg
Quoted 3 lines · WANG Cong
Refine it as suggested by Andreas.
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
-------->
This patch removes TOPDIR from Cris Makefiles.
We had the TOPDIR replaced with $(srcdir) already, but this looks better.
Compiles OK for both EtraxFS and ARTPEC-3 cpus in our tree.
Thanks - added a:
Sam
PATCH 5/8 INFINIBAND: Remove 'TOPDIR' from Makefiles
In reply to WANG CongTOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from all infiniband Makefiles.
---
drivers/infiniband/hw/cxgb3/Makefile +2 -2
@@ -1,5 +1,5 @@ -EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3 \ - -I$(TOPDIR)/drivers/infiniband/hw/cxgb3/core +EXTRA_CFLAGS += -I$(objtree)/drivers/net/cxgb3 \ + -I$(objtree)/drivers/infiniband/hw/cxgb3/core obj-$(CONFIG_INFINIBAND_CXGB3) += iw_cxgb3.o
Re: [Patch 5/8] INFINIBAND: Remove 'TOPDIR' from Makefiles
Quoted 17 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from all infiniband Makefiles.Cc Sam Ravnborg <[email protected]>Cc Roland Dreier <[email protected]>Cc Sean Hefty <[email protected]>Cc Hal Rosenstock <[email protected]>Signed-off-by WANG Cong <[email protected]>---
drivers/infiniband/hw/cxgb3/Makefile +0
-0
drivers/infiniband/hw/cxgb3/Makefile line 2
Quoted 4 lines
drivers/infiniband/hw/cxgb3/Makefile +1
-2@@ -1,5 +1,5 @@ -EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3 \ - -I$(TOPDIR)/drivers/infiniband/hw/cxgb3/core +EXTRA_CFLAGS += -I$(objtree)/drivers/net/cxgb3 \
Drop $(TOPDIR) like this:
drivers/infiniband/hw/cxgb3/Makefile line 5
Quoted 3 lines
drivers/infiniband/hw/cxgb3/Makefile +2
-0+EXTRA_CFLAGS += -Idrivers/net/cxgb3 \ + -I$(objtree)/drivers/infiniband/hw/cxgb3/core
And this line can be deleted - there is no such directory. At least not in my tree.
Sam
(Try #2) [Patch 5/8] INFINIBAND: Remove 'TOPDIR' from Makefiles
Quoted 11 lines
Review
Quoted 5 lines
(quoted diff) +1
-2-EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3 \ - -I$(TOPDIR)/drivers/infiniband/hw/cxgb3/core +EXTRA_CFLAGS += -I$(objtree)/drivers/net/cxgb3 \Drop $(TOPDIR) like this:
Review
Quoted 3 lines
(quoted diff) +2
-0+EXTRA_CFLAGS += -Idrivers/net/cxgb3 \ + -I$(objtree)/drivers/infiniband/hw/cxgb3/coreAnd this line can be deleted - there is no such directory. At least not in my tree.
Yes, correct. Thank you.
----------->
This patch removes TOPDIR from infiniband Makefiles.
---
drivers/infiniband/hw/cxgb3/Makefile +1 -2
@@ -1,5 +1,4 @@ -EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3 \ - -I$(TOPDIR)/drivers/infiniband/hw/cxgb3/core +EXTRA_CFLAGS += -Idrivers/net/cxgb3 obj-$(CONFIG_INFINIBAND_CXGB3) += iw_cxgb3.o
Sam Ravnborg
AppliedRe: (Try #2) [Patch 5/8] INFINIBAND: Remove 'TOPDIR' from Makefiles
Quoted 16 lines · WANG Cong
Quoted 11 lines
drivers/infiniband/hw/cxgb3/Makefile
Quoted 5 lines
drivers/infiniband/hw/cxgb3/Makefile +1
-2-EXTRA_CFLAGS += -I$(TOPDIR)/drivers/net/cxgb3 \ - -I$(TOPDIR)/drivers/infiniband/hw/cxgb3/core +EXTRA_CFLAGS += -I$(objtree)/drivers/net/cxgb3 \Drop $(TOPDIR) like this:
Review
Quoted 3 lines
(quoted diff) +2
-0+EXTRA_CFLAGS += -Idrivers/net/cxgb3 \ + -I$(objtree)/drivers/infiniband/hw/cxgb3/coreAnd this line can be deleted - there is no such directory. At least not in my tree.
Yes, correct. Thank you.
----------->
Quoted 7 lines
This patch removes TOPDIR from infiniband Makefiles.
Cc Sam Ravnborg <[email protected]>Cc Roland Dreier <[email protected]>Cc Sean Hefty <[email protected]>Cc Hal Rosenstock <[email protected]>Signed-off-by WANG Cong <[email protected]>
Applied.
Sam
PATCH 6/8 FRV: Remove 'TOPDIR' from Makefiles
In reply to WANG CongTOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all frv Makefiles.
---
arch/frv/boot/Makefile +4 -4
@@ -10,7 +10,7 @@ targets := Image zImage bootpImage -SYSTEM =$(TOPDIR)/$(LINUX) +SYSTEM =$(objtree)/$(LINUX) ZTEXTADDR = 0x02080000 PARAMS_PHYS = 0x0207c000
@@ -45,7 +45,7 @@ zImage: $(CONFIGURE) compressed/$(LINUX) bootpImage: bootp/bootp $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ -compressed/$(LINUX): $(TOPDIR)/$(LINUX) dep +compressed/$(LINUX): $(objtree)/$(LINUX) dep @$(MAKE) -C compressed $(LINUX) bootp/bootp: zImage initrd
@@ -59,10 +59,10 @@ initrd: # installation # install: $(CONFIGURE) Image - sh ./install.sh $(KERNELRELEASE) Image $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh ./install.sh $(KERNELRELEASE) Image $(objtree)/System.map "$(INSTALL_PATH)" zinstall: $(CONFIGURE) zImage - sh ./install.sh $(KERNELRELEASE) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh ./install.sh $(KERNELRELEASE) zImage $(objtree)/System.map "$(INSTALL_PATH)" # # miscellany
Re: [Patch 6/8] FRV: Remove 'TOPDIR' from Makefiles
Quoted 33 lines · WANG Cong
TOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all frv Makefiles.
Cc David Howells <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>---
arch/frv/boot/Makefile +2
-2@@ -10,7 +10,7 @@ targets := Image zImage bootpImage -SYSTEM =$(TOPDIR)/$(LINUX) +SYSTEM =$(objtree)/$(LINUX) ZTEXTADDR = 0x02080000 PARAMS_PHYS = 0x0207c000@@ -45,7 +45,7 @@ zImage: $(CONFIGURE) compressed/$(LINUX) bootpImage: bootp/bootp $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ -compressed/$(LINUX): $(TOPDIR)/$(LINUX) dep +compressed/$(LINUX): $(objtree)/$(LINUX) dep @$(MAKE) -C compressed $(LINUX) bootp/bootp: zImage initrd
arch/frv/boot/Makefile initrd: · line 65
Quoted 9 lines
arch/frv/boot/Makefile +2
-2@@ -59,10 +59,10 @@ initrd: # installation # install: $(CONFIGURE) Image - sh ./install.sh $(KERNELRELEASE) Image $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh ./install.sh $(KERNELRELEASE) Image $(objtree)/System.map "$(INSTALL_PATH)" zinstall: $(CONFIGURE) zImage - sh ./install.sh $(KERNELRELEASE) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh ./install.sh $(KERNELRELEASE) zImage $(objtree)/System.map "$(INSTALL_PATH)"
In this file we can just drop use of $(TOPDIR) since this is our current directory anyway.
Sam
(Try #2) [Patch 6/8] FRV: Drop 'TOPDIR' from Makefiles
Quoted 3 lines
In this file we can just drop use of $(TOPDIR) since this is our current directory anyway.
Thanks!
-------->
This patch drops TOPDIR from frv Makefiles.
---
arch/frv/boot/Makefile +4 -4
@@ -10,7 +10,7 @@ targets := Image zImage bootpImage -SYSTEM =$(TOPDIR)/$(LINUX) +SYSTEM =$(LINUX) ZTEXTADDR = 0x02080000 PARAMS_PHYS = 0x0207c000
@@ -45,7 +45,7 @@ zImage: $(CONFIGURE) compressed/$(LINUX) bootpImage: bootp/bootp $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ -compressed/$(LINUX): $(TOPDIR)/$(LINUX) dep +compressed/$(LINUX): $(LINUX) dep @$(MAKE) -C compressed $(LINUX) bootp/bootp: zImage initrd
@@ -59,10 +59,10 @@ initrd: # installation # install: $(CONFIGURE) Image - sh ./install.sh $(KERNELRELEASE) Image $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh ./install.sh $(KERNELRELEASE) Image System.map "$(INSTALL_PATH)" zinstall: $(CONFIGURE) zImage - sh ./install.sh $(KERNELRELEASE) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)" + sh ./install.sh $(KERNELRELEASE) zImage System.map "$(INSTALL_PATH)" # # miscellany
Sam Ravnborg
AppliedRe: (Try #2) [Patch 6/8] FRV: Drop 'TOPDIR' from Makefiles
Quoted 6 lines · WANG Cong
Quoted 3 lines
In this file we can just drop use of $(TOPDIR) since this is our current directory anyway.
Thanks!
Quoted 8 lines
-------->
This patch drops TOPDIR from frv Makefiles.
Cc David Howells <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>
Applied.
Sam
PATCH 7/8 FS: Remove 'TOPDIR' from Makefiles
In reply to WANG CongTOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all fs/ Makefiles.
---
fs/smbfs/Makefile +1 -1
@@ -34,5 +34,5 @@ proto: @echo >> proto2.h "struct sock;" @echo >> proto2.h "struct statfs;" @echo >> proto2.h "" - cproto -E "gcc -E" -e -v -I $(TOPDIR)/include -DMAKING_PROTO -D__KERNEL__ $(SRC) >> proto2.h + cproto -E "gcc -E" -e -v -I $(objtree)/include -DMAKING_PROTO -D__KERNEL__ $(SRC) >> proto2.h mv proto2.h proto.h
fs/xfs/Makefile +1 -1
@@ -1 +1 @@ -include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) +include $(objtree)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL)
Re: [Patch 7/8] FS: Remove 'TOPDIR' from Makefiles
Quoted 27 lines · WANG Cong
TOPDIR is obsolete, use objtree instead. This patch removes TOPDIR from all
fs/Makefiles.Cc Alexander Viro <[email protected]>Cc Tim Shimmin <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>---
fs/smbfs/Makefile +1
-1@@ -34,5 +34,5 @@ proto: @echo >> proto2.h "struct sock;" @echo >> proto2.h "struct statfs;" @echo >> proto2.h "" - cproto -E "gcc -E" -e -v -I $(TOPDIR)/include -DMAKING_PROTO -D__KERNEL__ $(SRC) >> proto2.h + cproto -E "gcc -E" -e -v -I $(objtree)/include -DMAKING_PROTO -D__KERNEL__ $(SRC) >> proto2.h mv proto2.h proto.hfs/xfs/Makefile +0
-0
fs/xfs/Makefile line 1
Quoted 2 lines
fs/xfs/Makefile +1
-1@@ -1 +1 @@ -include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) +include $(objtree)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL)
The whole "Maintainer rules" part of this file should be deleted. I cannot see how it can be used anyway.
Sam
(Try #2) [Patch 7/8] FS: Drop 'TOPDIR' from Makefiles and remove some dead code
Quoted 4 lines
The whole "Maintainer rules" part of this file should be deleted. I cannot see how it can be used anyway.
Agreed.
I delete them all and renew the patch.
Passed compiling test.
--------->
This patch drops TOPDIR since it's obsolete and removes some dead code from fs/smbfs/Makefile.
---
fs/smbfs/Makefile +0 -20
@@ -16,23 +16,3 @@ EXTRA_CFLAGS += -DSMBFS_PARANOIA #EXTRA_CFLAGS += -DDEBUG_SMB_TIMESTAMP #EXTRA_CFLAGS += -Werror -# -# Maintainer rules -# - -# getopt.c not included. It is intentionally separate -SRC = proc.c dir.c cache.c sock.c inode.c file.c ioctl.c smbiod.c request.c \ - symlink.c - -proto: - -rm -f proto.h - @echo > proto2.h "/*" - @echo >> proto2.h " * Autogenerated with cproto on: " `date` - @echo >> proto2.h " */" - @echo >> proto2.h "" - @echo >> proto2.h "struct smb_request;" - @echo >> proto2.h "struct sock;" - @echo >> proto2.h "struct statfs;" - @echo >> proto2.h "" - cproto -E "gcc -E" -e -v -I $(TOPDIR)/include -DMAKING_PROTO -D__KERNEL__ $(SRC) >> proto2.h - mv proto2.h proto.h
fs/xfs/Makefile +1 -1
@@ -1 +1 @@ -include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) +include $(objtree)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL)
Sam Ravnborg
AppliedRe: (Try #2) [Patch 7/8] FS: Drop 'TOPDIR' from Makefiles and remove some dead code
Quoted 12 lines · WANG Cong
Quoted 4 lines
The whole "Maintainer rules" part of this file should be deleted. I cannot see how it can be used anyway.
Agreed.
I delete them all and renew the patch.
Passed compiling test.--------->
Quoted 7 lines
This patch drops TOPDIR since it's obsolete and removes some dead code from
fs/smbfs/Makefile.Cc Alexander Viro <[email protected]>Cc Tim Shimmin <[email protected]>Cc Sam Ravnborg <[email protected]>Signed-off-by WANG Cong <[email protected]>
Applied.
Sam
Re: [xfs-masters] [Patch 7/8] FS: Remove 'TOPDIR' from Makefiles
In reply to WANG Congfs/xfs/Makefile line 1
Quoted 10 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from allfs/Makefiles.fs/xfs/Makefile +1
-1@@ -1 +1 @@ -include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) +include $(objtree)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL)
FWIW $(TOPDIR) is already banished from the latest xfs build code:
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile
and the patch is in -mm too via git:
Thanks,
-Eric
p.s. what is $(objtree) exactly? I don't see it mentioned in Documentation/kbuild except as one line in an example... I thought $(obj) and $(src) should be used outside of the core kbuild infrastructure, and in this case wouldn't it be $(src) anyway?
Re: [xfs-masters] [Patch 7/8] FS: Remove 'TOPDIR' from Makefiles
Quoted 4 lines · Eric Sandeen
Quoted 2 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from allfs/Makefiles.
Quoted 10 lines
fs/xfs/Makefile line 1
Quoted 7 lines
fs/xfs/Makefile +1
-1@@ -1 +1 @@ -include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) +include $(objtree)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL)FWIW $(TOPDIR) is already banished from the latest xfs build code:
Good - I will ignore the xfs bits.
Quoted 5 lines
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile
and the patch is in -mm too via git:
You can do this simpler:
+EXTRA_CFLAGS += -I$(src) -I$(src)/linux-2.6 -funsigned-char
+
+XFS_LINUX := linux-2.6
+
+ifeq ($(CONFIG_XFS_DEBUG),y)
+ EXTRA_CFLAGS += -g
+endif
+
like this:
ccflags-y := -I$(src) -I$(src)/linux-2.6 -funsigned-char ccflags-$(CONFIG_XFS_DEBUG) += -g
XFS_LINUX := linux-2.6
Quoted 4 lines
p.s. what is $(objtree) exactly? I don't see it mentioned in
Documentation/kbuildexcept as one line in an example... I thought $(obj) and $(src) should be used outside of the core kbuild infrastructure, and in this case wouldn't it be $(src) anyway?
$(objtree) specify the build directory and is only rarely used. Half of the current users are buggy and I should fix it one day.
Sam
(Try #3) [Patch 7/8] FS: Remove dead code
Quoted 15 lines · Sam Ravnborg
Quoted 4 lines · Eric Sandeen
Quoted 2 lines · WANG Cong
TOPDIR is obsolete, use objtree instead.
This patch removes TOPDIR from allfs/Makefiles.Quoted 10 lines
fs/xfs/Makefile line 1
Quoted 7 lines
fs/xfs/Makefile +1
-1@@ -1 +1 @@ -include $(TOPDIR)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL) +include $(objtree)/fs/xfs/Makefile-linux-$(VERSION).$(PATCHLEVEL)FWIW $(TOPDIR) is already banished from the latest xfs build code:
Quoted 1 line
Good - I will ignore the xfs bits.
Thanks. I will drop the xfs part.
------->
Remove dead code in smbfs makefile.
---
fs/smbfs/Makefile +0 -20
@@ -16,23 +16,3 @@ EXTRA_CFLAGS += -DSMBFS_PARANOIA #EXTRA_CFLAGS += -DDEBUG_SMB_TIMESTAMP #EXTRA_CFLAGS += -Werror -# -# Maintainer rules -# - -# getopt.c not included. It is intentionally separate -SRC = proc.c dir.c cache.c sock.c inode.c file.c ioctl.c smbiod.c request.c \ - symlink.c - -proto: - -rm -f proto.h - @echo > proto2.h "/*" - @echo >> proto2.h " * Autogenerated with cproto on: " `date` - @echo >> proto2.h " */" - @echo >> proto2.h "" - @echo >> proto2.h "struct smb_request;" - @echo >> proto2.h "struct sock;" - @echo >> proto2.h "struct statfs;" - @echo >> proto2.h "" - cproto -E "gcc -E" -e -v -I $(TOPDIR)/include -DMAKING_PROTO -D__KERNEL__ $(SRC) >> proto2.h - mv proto2.h proto.h
PATCH 8/8 Remove 'TOPDIR' from the Top Makefile
In reply to WANG CongTOPDIR is obsolete, thus can be removed.
This patch removes TOPDIR from the top Makefile.
---
Makefile +1 -3
@@ -148,15 +148,13 @@ _all: modules endif srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) -TOPDIR := $(srctree) -# FIXME - TOPDIR is obsolete, use srctree/objtree objtree := $(CURDIR) src := $(srctree) obj := $(objtree) VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) -export srctree objtree VPATH TOPDIR +export srctree objtree VPATH # SUBARCH tells the usermode build what the underlying arch is. That is set
Quoted 2 lines · WANG Cong
TOPDIR is obsolete, use srctree or objtree instead.
Glad to see this being done - long overdue.
Most of your patches (if not all) replaces TOPDIR with objtree but usage of objtree is only correct when dealing with output files. Note that objtree != srctree only for O=... builds.
And a few cases should be dealt with differently. See individual comments.
Sam
Quoted 9 lines · WANG Cong
TOPDIR is obsolete, use srctree or objtree instead.
This patch set removes all the TOPDIR use in the whole source tree and finally drops it in the top
Makefile. They're against the current linus-tree.Note that Patch [8/8] should be applied _after_ all the previous patches are applied.
Hi Wang.
You a heads up. I will most likely apply
the remaining of the patches tonight, except the UM stuff which I hope Jeff to take and the final removal of TOPDIR may wait a bit.
I want the s390, xfs and um changes to hit -mm at least and we have several external modules that uses TOPDIR.
And some of these external modules I care about - not all of them but some of them.
Sam
Quoted 10 lines
Hi Wang.
You a heads up. I will most likely apply
the remaining of the patches tonight, except the UM stuff which I hope Jeff to take and the final removal of TOPDIR may wait a bit.
I want the s390, xfs and um changes to hit -mm at least and we have several external modules that uses TOPDIR.
Quoted 4 lines
And some of these external modules I care about - not all of them but some of them.
Sam
Thanks, Sam!
Cong