Skip to content

Commit

Permalink
Linux header install hack for elf.h circular dependency
Browse files Browse the repository at this point in the history
Fix from Arnaud Dovi:

#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
"
  • Loading branch information
mingwandroid committed Apr 26, 2014
1 parent 9c27e67 commit 33f2a4e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 33f2a4e

Please sign in to comment.