summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch')
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch59
1 files changed, 0 insertions, 59 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
deleted file mode 100644
index 7eb7defcde..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/scripts-Makefile.headersinst-install-headers-from-sc.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From b200d4bcffc86bb08fd3898bc7cde00f0686f62d Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Fri, 13 Sep 2013 22:01:02 -0400
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
17Robert:
18Use "$(foreach ,,$(shell echo))" rather than "echo" to make it work when
19len(TMPDIR) <= 410.
20
21Upstream-Status: Inappropriate [oe-specific]
22
23Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
24Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
25---
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(-)
29
30diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
31--- a/scripts/Makefile.headersinst
32+++ b/scripts/Makefile.headersinst
33@@ -72,7 +72,7 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
34 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
35 file$(if $(word 2, $(all-files)),s))
36 cmd_install = \
37- $(CONFIG_SHELL) $< $(installdir) $(input-files); \
38+ xargs $(CONFIG_SHELL) $< $(installdir) < $(INSTALL_HDR_PATH)/.input-files; \
39 for F in $(wrapper-files); do \
40 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \
41 done; \
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.
49 $(install-file): scripts/headers_install.sh $(input-files) FORCE
50 $(if $(unwanted),$(call cmd,remove),)
51 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
52+ $(shell echo -n > $(INSTALL_HDR_PATH)/.input-files)
53+ $(foreach f,$(input-files),$(shell echo -n "$(f) " >> \
54+ $(INSTALL_HDR_PATH)/.input-files))
55 $(call if_changed,install)
56+ @rm $(INSTALL_HDR_PATH)/.input-files
57
58 else
59 __headerscheck: $(subdirs) $(check-file)