[OE-core] [PATCH 1/1] gcc-cross: argument list too long when do_install

Robert Yang liezhi.yang at windriver.com
Wed Jun 13 08:27:46 UTC 2012


There would be an "Argument list too long" error when the length of
tmpdir is longer than 190, this is caused by:

headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`

The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
it, use the $(sort list) of GNU make which can handle the too long list
would fix the problem, the header would be short enough after sorted.
The "tr ' ' '\012'" was used for translating the space to "\n", the
$(sort list) doesn't need this.

This doesn't impact the output, so it doesn't need the PR bump.

[YOCTO #2591]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/recipes-devtools/gcc/gcc-common.inc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 45828bb..c3b79ab 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -102,6 +102,10 @@ do_headerfix () {
 	#
 	sed -i ${S}/gcc/config/*/linux*.h -e \
 		's#\(GLIBC_DYNAMIC_LINKER[^ ]*\) \( *"/lib.*\)/\(.*\)#\1 SYSTEMLIBS_DIR "\3#'
+
+	# Fix the "Argument list too long" error
+	sed -i ${S}/gcc/Makefile.in -e \
+		's#headers=`echo $(PLUGIN_HEADERS) | tr .*012.* | sort -u`#headers=\"$(sort $(PLUGIN_HEADERS))\"#'
 }
 
 addtask headerfix after do_unpack before do_patch
-- 
1.7.1





More information about the Openembedded-core mailing list