Jon Ringle
2009-Sep-15 20:08 UTC
[klibc] [PATCH] add linux' arch/$ARCH/include to search path From: Marc Kleine-Budde <mkl@pengutronix.de> Date: Mon, 5 Jan 2009 17:46:47 +0100
with the recent move of the includes from linux' include/asm-$ARCH to arch/$ARCH/asm, klibc fails to compile, because the in-linux-header files include from asm/, but this is not in the header search path. e.g. against linux-2.6.27 arm: arm-iwmmx-linux-gnueabi-gcc -Wp,-MD,usr/klibc/.vsnprintf.o.d -nostdinc -iwithprefix include -Iusr/include/arch/arm -Iusr/include/bits32 -Iusr/klibc/../include -Iusr/include -Ilinux/include -D__KLIBC__=1 -D__KLIBC_MINOR__=5 -D_BITSIZE=32 -fno-stack-protector -fno-exceptions -mabi=aapcs-linux -mno-thumb-interwork -Os -march=armv4 -mtune=strongarm -W -Wall -Wno-sign-compare -Wno-unused-parameter -c -o usr/klibc/vsnprintf.o usr/klibc/vsnprintf.c In file included from usr/klibc/../include/sys/types.h:15, from usr/klibc/../include/unistd.h:11, from usr/klibc/../include/stdio.h:11, from usr/klibc/vsnprintf.c:13: linux/include/linux/posix_types.h:47:29: error: asm/posix_types.h: No such file or directory In file included from usr/klibc/../include/unistd.h:11, from usr/klibc/../include/stdio.h:11, from usr/klibc/vsnprintf.c:13: usr/klibc/../include/sys/types.h:16:23: error: asm/types.h: No such file or directory In file included from usr/klibc/../include/unistd.h:11, from usr/klibc/../include/stdio.h:11, from usr/klibc/vsnprintf.c:13: This patch fixes the problem by adding a -I to linux' arch/$ARCH/asm to the CPPFLAGS. This will fail on x86 (64 and 32 bit) though, because in linux x86 is unified, while in klibc it's seperate. Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de> Signed-off-by: Jon Ringle <jon at ringle.org> --- scripts/Kbuild.klibc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc index 227b9bd..8d80f2c 100644 --- a/scripts/Kbuild.klibc +++ b/scripts/Kbuild.klibc @@ -104,6 +104,7 @@ KLIBCCPPFLAGS := -nostdinc -iwithprefix include \ # kernel include paths KLIBCKERNELSRC ?= $(srctree)/ KLIBCCPPFLAGS += -I$(KLIBCKERNELSRC)include \ + -I$(KLIBCKERNELSRC)/arch/$(KLIBCARCHDIR)/include \ $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)include2 -I$(KLIBCKERNELOBJ)include -I$(srctree)/include) \ $(KLIBCARCHINCFLAGS) -- 1.6.4.rc3.12.gdf73a
H. Peter Anvin
2009-Sep-18 16:22 UTC
[klibc] [PATCH] add linux' arch/$ARCH/include to search path From: Marc Kleine-Budde <mkl@pengutronix.de> Date: Mon, 5 Jan 2009 17:46:47 +0100
On 09/15/2009 01:08 PM, Jon Ringle wrote:> with the recent move of the includes from linux' > include/asm-$ARCH to arch/$ARCH/asm, klibc fails to compile, > because the in-linux-header files include from asm/, but this > is not in the header search path.I think the real answer is to use the headers produced by the kernel "make headers_install"... it will require some beating on the scripts, though. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Reasonably Related Threads
- Build problems: klibc with Linux 3.10.7
- (fwd) Bug#618616: arm build failure with latest binutils - usr/klibc/syscalls/_exit.S:29: Error: .size expression does not evaluate to a constant
- Fwd: Launchpad [Bug 1843743] [NEW] klibc ftbfs in eoan
- [PATCH] Update header locations for uapi & generated
- Fwd: [Bug 1843743] Re: klibc ftbfs in eoan