From 33f2a4eba53774ba80bf6d2df9e92c4f2cc06c45 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 29 Jan 2014 18:52:56 +0000 Subject: [PATCH] Linux header install hack for elf.h circular dependency Fix from Arnaud Dovi: https://github.com/diorcety/crosstool-ng/issues/11# " I think I have found the root cause of this elf.h issue Its a circular dependency problem __headers: $(version_h) scripts_basic asm-generic archheaders archscripts FORCE $(Q)$(MAKE) $(build)=scripts build_unifdef PHONY += headers_install headers_install: __headers $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \ $(error Headers not exportable for the $(SRCARCH) architecture)) $(Q)$(MAKE) $(hdr-inst)=include/uapi $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) In short headers_install depends on archscripts but archscripts compiles a code with a header elf.h installed by headers_install Next once you fix this you will realize the headers are copied under linux\elf.h of the sysroot when the code looks for elf.h " --- ...isable-archscripts-due-to-elf_h-circular-dep.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch diff --git a/patches/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/patches/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 00000000..ea59dbe2 --- /dev/null +++ b/patches/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch @@ -0,0 +1,11 @@ +--- linux-3.12.8/Makefile.orig 2014-01-16 00:31:56.000000000 +0100 ++++ linux-3.12.8/Makefile 2014-01-20 00:03:25.961403100 +0100 +@@ -906,7 +906,7 @@ + archscripts: + + PHONY += __headers +-__headers: $(version_h) scripts_basic asm-generic archheaders archscripts FORCE ++__headers: $(version_h) scripts_basic asm-generic archheaders FORCE + $(Q)$(MAKE) $(build)=scripts build_unifdef + + PHONY += headers_install_all