From 8c13e67ad79f6b95bc19168d3779156e49c6e725 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 29 Jan 2014 18:52:56 +0000 Subject: [PATCH] Linux header install: Fix elf.h circular dependency For versions 3.10.19, 3.10.38, 3.10.62, 3.10.98, 3.12, 4.3.3 and 4.4.3 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 " Signed-off-by: Ray Donnelly --- ...sable-archscripts-due-to-elf_h-circular-dep.patch | 11 +++++++++++ ...sable-archscripts-due-to-elf_h-circular-dep.patch | 11 +++++++++++ ...sable-archscripts-due-to-elf_h-circular-dep.patch | 12 ++++++++++++ ...sable-archscripts-due-to-elf_h-circular-dep.patch | 12 ++++++++++++ ...sable-archscripts-due-to-elf_h-circular-dep.patch | 11 +++++++++++ ...sable-archscripts-due-to-elf_h-circular-dep.patch | 11 +++++++++++ ...sable-archscripts-due-to-elf_h-circular-dep.patch | 11 +++++++++++ 7 files changed, 79 insertions(+) create mode 100644 packages/linux/3.10.19/130-disable-archscripts-due-to-elf_h-circular-dep.patch create mode 100644 packages/linux/3.10.38/130-disable-archscripts-due-to-elf_h-circular-dep.patch create mode 100644 packages/linux/3.10.62/130-disable-archscripts-due-to-elf_h-circular-dep.patch create mode 100644 packages/linux/3.10.98/130-disable-archscripts-due-to-elf_h-circular-dep.patch create mode 100644 packages/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch create mode 100644 packages/linux/4.3.3/130-disable-archscripts-due-to-elf_h-circular-dep.patch create mode 100644 packages/linux/4.4.3/130-disable-archscripts-due-to-elf_h-circular-dep.patch diff --git a/packages/linux/3.10.19/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/3.10.19/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..ea59dbe220 --- /dev/null +++ b/packages/linux/3.10.19/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 diff --git a/packages/linux/3.10.38/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/3.10.38/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..ea59dbe220 --- /dev/null +++ b/packages/linux/3.10.38/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 diff --git a/packages/linux/3.10.62/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/3.10.62/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..3cd94f9cc4 --- /dev/null +++ b/packages/linux/3.10.62/130-disable-archscripts-due-to-elf_h-circular-dep.patch @@ -0,0 +1,12 @@ +diff -urN linux-3.10.62.orig/Makefile linux-3.10.62/Makefile +--- linux-3.10.62.orig/Makefile 2015-03-04 21:58:38.370006100 +0000 ++++ linux-3.10.62/Makefile 2015-03-04 22:07:00.111621000 +0000 +@@ -905,7 +905,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 diff --git a/packages/linux/3.10.98/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/3.10.98/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..3cd94f9cc4 --- /dev/null +++ b/packages/linux/3.10.98/130-disable-archscripts-due-to-elf_h-circular-dep.patch @@ -0,0 +1,12 @@ +diff -urN linux-3.10.62.orig/Makefile linux-3.10.62/Makefile +--- linux-3.10.62.orig/Makefile 2015-03-04 21:58:38.370006100 +0000 ++++ linux-3.10.62/Makefile 2015-03-04 22:07:00.111621000 +0000 +@@ -905,7 +905,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 diff --git a/packages/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/3.12/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..ea59dbe220 --- /dev/null +++ b/packages/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 diff --git a/packages/linux/4.3.3/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/4.3.3/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..ea59dbe220 --- /dev/null +++ b/packages/linux/4.3.3/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 diff --git a/packages/linux/4.4.3/130-disable-archscripts-due-to-elf_h-circular-dep.patch b/packages/linux/4.4.3/130-disable-archscripts-due-to-elf_h-circular-dep.patch new file mode 100644 index 0000000000..ea59dbe220 --- /dev/null +++ b/packages/linux/4.4.3/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