[klibc] [PATCH klibc 2/4] Kbuild: Remove KLIBCKERNELOBJ variable

Ben Hutchings ben at decadent.org.uk
Sun Jan 6 20:24:42 PST 2019


Since the UAPI/KAPI header split in Linux 3.7, we have needed
KLIBCKERNELSRC to point to the installed UAPI headers.  This makes
KLIBCKERNELOBJ and the extra header directories based on it completely
redundant.

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 Makefile                       | 2 --
 scripts/Kbuild.klibc           | 8 +++-----
 usr/klibc/arch/i386/MCONFIG    | 3 ---
 usr/klibc/arch/ppc/MCONFIG     | 3 ---
 usr/klibc/arch/ppc64/MCONFIG   | 3 ---
 usr/klibc/arch/riscv64/MCONFIG | 2 --
 usr/klibc/arch/x86_64/MCONFIG  | 3 ---
 7 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/Makefile b/Makefile
index 43861355b964..a11d1e6c7ae0 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,6 @@ export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)
 export KLIBCINC := usr/include
 export KLIBCOBJ := usr/klibc
 export KLIBCKERNELSRC ?= linux
-export KLIBCKERNELOBJ ?= $(KLIBCKERNELSRC)
 
 export VPATH := $(srctree)
 
@@ -135,7 +134,6 @@ test: klibc
 	@echo
 	@echo	'Build options:'
 	@echo	'KLIBCKERNELSRC - Path to a configured linux tree'
-	@echo	'KLIBCKERNELOBJ - Path to kernel output dir (defaults to KLIBCKERNELSRC)'
 	@echo	'make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
 	@echo	'make V=2   [targets] 2 => give reason for rebuild of target'
 	@echo
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index 35c375edd909..de1cd278e9f8 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -78,7 +78,7 @@ KLIBCLDFLAGS      :=
 KLIBCCFLAGS       :=
 
 # Defaults for arch to override
-KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/$(KLIBCARCH)/include
+KLIBCARCHINCFLAGS =
 
 # Arch specific definitions for klibc
 include $(srctree)/$(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
@@ -113,10 +113,8 @@ KLIBCCPPFLAGS    := -nostdinc -iwithprefix include \
                     -I$(KLIBCINC)
 # kernel include paths
 KLIBCKERNELSRC	 ?= $(srctree)
-KLIBCKERNELOBJ	 ?= $(objtree)
-KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)/include				    \
-                     $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)/include2 	    \
-		       -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include)    \
+KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)/include		\
+                     $(if $(KBUILD_SRC),-I$(srctree)/include)  \
 		     $(KLIBCARCHINCFLAGS)
 
 # klibc definitions
diff --git a/usr/klibc/arch/i386/MCONFIG b/usr/klibc/arch/i386/MCONFIG
index bfec004a3c8b..0704669500f0 100644
--- a/usr/klibc/arch/i386/MCONFIG
+++ b/usr/klibc/arch/i386/MCONFIG
@@ -31,6 +31,3 @@ KLIBCBITSIZE  = 32
 # calls, and work on the memory models for this architecture
 # 96 MB - normal binaries start at 128 MB
 KLIBCSHAREDFLAGS	= -Ttext-segment 0x06000000
-
-# Asm includes for i386 are in the merged x86 tree
-KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/x86/include
diff --git a/usr/klibc/arch/ppc/MCONFIG b/usr/klibc/arch/ppc/MCONFIG
index 6630df7be4ca..46c5923746f7 100644
--- a/usr/klibc/arch/ppc/MCONFIG
+++ b/usr/klibc/arch/ppc/MCONFIG
@@ -22,8 +22,5 @@ KLIBCBITSIZE       = 32
 # to +/- 16 MB
 KLIBCSHAREDFLAGS     = -Ttext 0x0f800200
 
-# The kernel so far has both asm-ppc* and asm-powerpc.
-KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/powerpc/include
-
 # The asm include files live in asm-powerpc
 KLIBCASMARCH	= powerpc
diff --git a/usr/klibc/arch/ppc64/MCONFIG b/usr/klibc/arch/ppc64/MCONFIG
index 1331e05322c0..a1475935fd3a 100644
--- a/usr/klibc/arch/ppc64/MCONFIG
+++ b/usr/klibc/arch/ppc64/MCONFIG
@@ -20,8 +20,5 @@ KLIBCBITSIZE      = 64
 # to +/- 16 MB
 KLIBCSHAREDFLAGS     = -Ttext 0x0f000200
 
-# The kernel so far has both asm-ppc* and asm-powerpc.
-KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/powerpc/include
-
 # The asm include files live in asm-powerpc
 KLIBCASMARCH	= powerpc
diff --git a/usr/klibc/arch/riscv64/MCONFIG b/usr/klibc/arch/riscv64/MCONFIG
index 38703d937e49..34f077414f8c 100644
--- a/usr/klibc/arch/riscv64/MCONFIG
+++ b/usr/klibc/arch/riscv64/MCONFIG
@@ -18,5 +18,3 @@ KLIBCBITSIZE      = 64
 
 # Normal binaries start at 64 KB, so start the libary at 2 MB.
 KLIBCSHAREDFLAGS  =-Ttext 0x00200200
-
-KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/riscv/include
diff --git a/usr/klibc/arch/x86_64/MCONFIG b/usr/klibc/arch/x86_64/MCONFIG
index 606f041ca3b3..c5f2fa265a26 100644
--- a/usr/klibc/arch/x86_64/MCONFIG
+++ b/usr/klibc/arch/x86_64/MCONFIG
@@ -36,6 +36,3 @@ KLIBCLDFLAGS      = -m elf_x86_64
 # in a broken layout with binutils 2.30.  Since there's no
 # architectural page size betwen 4 KB and 2MB, set it to 4 KB.
 KLIBCSHAREDFLAGS     = -Ttext-segment 0x00200000 -z max-page-size=0x1000
-
-# Asm includes for x86_64 are in the merged x86 tree
-KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/x86/include

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/klibc/attachments/20190107/1eb3fadf/attachment.sig>


More information about the klibc mailing list