]> code.ossystems Code Review - openembedded-core.git/blob
9bc59823a3454fa6e69ce62539381062d641be62
[openembedded-core.git] /
1 From e60cc1b011bf0f1acdb7e5168b7bed4ebb78c91f Mon Sep 17 00:00:00 2001
2 From: Bruce Ashfield <bruce.ashfield@windriver.com>
3 Date: Wed, 9 Jan 2013 16:24:39 -0500
4 Subject: [PATCH] scripts/Makefile.headersinst: install headers from scratch file
5
6 If headers_install is executed from a deep/long directory structure, the
7 shell's maximum argument length can be execeeded, which breaks the operation
8 with:
9
10 | make[2]: execvp: /bin/sh: Argument list too long
11 | make[2]: ***
12
13 By dumping the input files to a scratch file and using xargs to read the
14 input list from the scratch file, we can avoid blowing out the maximum
15 argument size and install headers in a long path name environment.
16
17 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
18 ---
19 RP: Refreshed for 3.10 as the problem still exists there on the autobuilders
20
21  scripts/Makefile.headersinst |    4 +++-
22  1 files changed, 3 insertions(+), 1 deletions(-)
23
24 Index: linux-3.10/scripts/Makefile.headersinst
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))\
30                              file$(if $(word 2, $(all-files)),s))
31        cmd_install = \
32 -        $(CONFIG_SHELL) $< $(installdir) $(input-files); \
33 +        xargs $(CONFIG_SHELL) $< $(installdir) < $(INSTALL_HDR_PATH)/.input-files; \
34          for F in $(wrapper-files); do                                   \
35                  echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
36          done;                                                           \
37 @@ -101,7 +101,9 @@ targets += $(install-file)
38  $(install-file): scripts/headers_install.sh $(input-files) FORCE
39         $(if $(unwanted),$(call cmd,remove),)
40         $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
41 +       @echo $(input-files) > $(INSTALL_HDR_PATH)/.input-files
42         $(call if_changed,install)
43 +       @rm $(INSTALL_HDR_PATH)/.input-files
44  
45  else
46  __headerscheck: $(subdirs) $(check-file)