summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux-libc-headers
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-01-10 15:49:16 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-10 23:53:51 +0000
commit53cc748b93e8af584557d6db5309c3e955182c5c (patch)
tree5b5e9da961327aaa1bd501fe193092bd0a5a8ed3 /meta/recipes-kernel/linux-libc-headers
parent5371d96686718b98e6f006c083b5d1177cb1196b (diff)
downloadpoky-53cc748b93e8af584557d6db5309c3e955182c5c.tar.gz
linux-libc-headers: fix headers install in long path name environments
If a build is started in a deep directory structure, or in a path with long directory names the installation of linux-libc-headers will fail with: | make[2]: execvp: /bin/sh: Argument list too long | make[2]: *** >From within the kernel Makefiles themselves. The solution is to patch the kernel build rules with the following change: [ scripts/Makefile.headersinst: install headers from scratch file If headers_install is executed from a deep/long directory structure, the shell's maximum argument length can be execeeded, which breaks the operation with: | make[2]: execvp: /bin/sh: Argument list too long | make[2]: *** By dumping the input files to a scratch file and using xargs to read the input list from the scratch file, we can avoid blowing out the maximum argument size and install headers in a long path name environment. ] Until this change, or a similar one, is merged into the mainline kernel, this change should be applied to any 3.7 or greater libc-headers build. Upstream-status: Pending (From OE-Core rev: 1e63a3b7b7915d40bb59976a02b9f53968997ed3) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers')
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch47
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb4
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch
new file mode 100644
index 0000000000..be1ef2502f
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch
@@ -0,0 +1,47 @@
1From e60cc1b011bf0f1acdb7e5168b7bed4ebb78c91f Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Wed, 9 Jan 2013 16:24:39 -0500
4Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file
5
6If headers_install is executed from a deep/long directory structure, the
7shell's maximum argument length can be execeeded, which breaks the operation
8with:
9
10| make[2]: execvp: /bin/sh: Argument list too long
11| make[2]: ***
12
13By dumping the input files to a scratch file and using xargs to read the
14input list from the scratch file, we can avoid blowing out the maximum
15argument size and install headers in a long path name environment.
16
17Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
18---
19 scripts/Makefile.headersinst | 4 +++-
20 1 files changed, 3 insertions(+), 1 deletions(-)
21
22diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
23index 06ba4a7..536d722 100644
24--- a/scripts/Makefile.headersinst
25+++ b/scripts/Makefile.headersinst
26@@ -71,7 +71,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
27 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
28 file$(if $(word 2, $(all-files)),s))
29 cmd_install = \
30- $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \
31+ xargs $(PERL) $< $(installdir) $(SRCARCH) < $(INSTALL_HDR_PATH)/.input-files; \
32 for F in $(wrapper-files); do \
33 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \
34 done; \
35@@ -100,7 +100,9 @@ targets += $(install-file)
36 $(install-file): scripts/headers_install.pl $(input-files) FORCE
37 $(if $(unwanted),$(call cmd,remove),)
38 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
39+ @echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files
40 $(call if_changed,install)
41+ @rm $(INSTALL_HDR_PATH)/.input-files
42
43 else
44 __headerscheck: $(subdirs) $(check-file)
45--
461.7.0.4
47
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb
index 3d688b76eb..a363289988 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.7.bb
@@ -1,4 +1,8 @@
1require linux-libc-headers.inc 1require linux-libc-headers.inc
2 2
3SRC_URI += "file://scripts-Makefile.headersinst-install-headers-from-sc.patch"
4
5PR = "r1"
6
3SRC_URI[md5sum] = "5323f3faadd051e83af605a63be5ea2e" 7SRC_URI[md5sum] = "5323f3faadd051e83af605a63be5ea2e"
4SRC_URI[sha256sum] = "dc08d87a579fe2918362e6666e503a95a76296419195cb499aa9dd4dbe171a9e" 8SRC_URI[sha256sum] = "dc08d87a579fe2918362e6666e503a95a76296419195cb499aa9dd4dbe171a9e"