summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2013-09-14 02:48:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-17 19:34:55 +0100
commit7303b67d33ce10445e5918f7f6fd36d1246e8df4 (patch)
tree5fecfd7afcd71be8e08aedcfd42e9f775d608dcf /meta/recipes-kernel
parent8dd7ab3a7897fee4733d77d0ff41c88688334fd2 (diff)
downloadpoky-7303b67d33ce10445e5918f7f6fd36d1246e8df4.tar.gz
linux-libc-headers: do_install: fix "Argument list too long" error
There would be an "Argument list too long" error when the TMPDIR is in a deep dir, for example, when "len(readlink -f TMPDIR) >= 350 (our supported value is 410)". Use "$(foreach ,,$(shell echo))" to fix it. There was already a patch which tried to fix this issue, so squash the current change into the previous one as Bruce suggested. [YOCTO #5138] (From OE-Core rev: 4e10c45d7c61ac1ccf8b53ef525ca03d3d458bba) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch39
1 files changed, 26 insertions, 13 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
index 9bc59823a3..7eb7defcde 100644
--- 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
@@ -1,6 +1,6 @@
1From e60cc1b011bf0f1acdb7e5168b7bed4ebb78c91f Mon Sep 17 00:00:00 2001 1From b200d4bcffc86bb08fd3898bc7cde00f0686f62d Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com> 2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Wed, 9 Jan 2013 16:24:39 -0500 3Date: Fri, 13 Sep 2013 22:01:02 -0400
4Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file 4Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file
5 5
6If headers_install is executed from a deep/long directory structure, the 6If headers_install is executed from a deep/long directory structure, the
@@ -14,18 +14,23 @@ By 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 14input list from the scratch file, we can avoid blowing out the maximum
15argument size and install headers in a long path name environment. 15argument size and install headers in a long path name environment.
16 16
17Robert:
18Use "$(foreach ,,$(shell echo))" rather than "echo" to make it work when
19len(TMPDIR) <= 410.
20
21Upstream-Status: Inappropriate [oe-specific]
22
17Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> 23Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
24Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
18--- 25---
19RP: Refreshed for 3.10 as the problem still exists there on the autobuilders 26RP: Refreshed for 3.10 as the problem still exists there on the autobuilders
27 scripts/Makefile.headersinst | 9 ++++++++-
28 1 file changed, 8 insertions(+), 1 deletion(-)
20 29
21 scripts/Makefile.headersinst | 4 +++- 30diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
22 1 files changed, 3 insertions(+), 1 deletions(-) 31--- a/scripts/Makefile.headersinst
23 32+++ b/scripts/Makefile.headersinst
24Index: linux-3.10/scripts/Makefile.headersinst 33@@ -72,7 +72,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
25===================================================================
26--- linux-3.10.orig/scripts/Makefile.headersinst
27+++ linux-3.10/scripts/Makefile.headersinst
28@@ -72,7 +72,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH
29 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ 34 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
30 file$(if $(word 2, $(all-files)),s)) 35 file$(if $(word 2, $(all-files)),s))
31 cmd_install = \ 36 cmd_install = \
@@ -34,11 +39,19 @@ Index: linux-3.10/scripts/Makefile.headersinst
34 for F in $(wrapper-files); do \ 39 for F in $(wrapper-files); do \
35 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \ 40 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \
36 done; \ 41 done; \
37@@ -101,7 +101,9 @@ targets += $(install-file) 42@@ -98,10 +98,17 @@ __headersinst: $(subdirs) $(install-file)
43 @:
44
45 targets += $(install-file)
46+# Use the $(foreach ,,$(shell echo)) to avoid the "Argument list too
47+# long" error, and use the "$(shell echo)" rather than "echo" to keep
48+# the order.
38 $(install-file): scripts/headers_install.sh $(input-files) FORCE 49 $(install-file): scripts/headers_install.sh $(input-files) FORCE
39 $(if $(unwanted),$(call cmd,remove),) 50 $(if $(unwanted),$(call cmd,remove),)
40 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) 51 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
41+ @echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files 52+ $(shell echo -n > $(INSTALL_HDR_PATH)/.input-files)
53+ $(foreach f,$(input-files),$(shell echo -n "$(f) " >> \
54+ $(INSTALL_HDR_PATH)/.input-files))
42 $(call if_changed,install) 55 $(call if_changed,install)
43+ @rm $(INSTALL_HDR_PATH)/.input-files 56+ @rm $(INSTALL_HDR_PATH)/.input-files
44 57