]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
go-native: fix PATH issue when len(TMPDIR) == 410
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 15 Nov 2017 02:57:05 +0000 (10:57 +0800)
committerRobert Yang <liezhi.yang@windriver.com>
Thu, 30 Nov 2017 01:27:27 +0000 (09:27 +0800)
The buf is used for saving PATH, 4096 is a little small when building in deep
path, for example, it would be failed when oe-coe's len(TMPDIR) == 410, use
8192 can fix the problem.

Fixed:
$ bitbake go-native
[snip]
gcc -isystem/workspace2/lyang1/aaaaaaaa/[snip]
exec gcc: No such file or directory
[snip]

Only go-native needs this patch since only it uses go1.4 which has unix.c.

[YOCTO #11351]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-devtools/go/files/0001-cmd-dist-unix.c-bprintf-use-larger-buf.patch [new file with mode: 0644]
meta/recipes-devtools/go/go-native.inc

diff --git a/meta/recipes-devtools/go/files/0001-cmd-dist-unix.c-bprintf-use-larger-buf.patch b/meta/recipes-devtools/go/files/0001-cmd-dist-unix.c-bprintf-use-larger-buf.patch
new file mode 100644 (file)
index 0000000..82c1fc1
--- /dev/null
@@ -0,0 +1,38 @@
+From 443724ac952aa9b7550dc89ac14dbea1c2cd05b0 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 15 Nov 2017 10:49:03 +0800
+Subject: [PATCH] cmd/dist/unix.c: bprintf(): use larger buf
+
+The buf is used for saving PATH, 4096 is a little small when building in deep
+path, for example, it would be failed when oe-coe's len(TMPDIR) == 410, use
+8192 can fix the problem.
+
+Fixed:
+[snip]
+gcc -isystem/workspace2/lyang1/aaaaaaaa/[snip]
+exec gcc: No such file or directory
+[snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ go/src/cmd/dist/unix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/go/src/cmd/dist/unix.c b/go/src/cmd/dist/unix.c
+index 4a78684..fa41964 100644
+--- a/go/src/cmd/dist/unix.c
++++ b/go/src/cmd/dist/unix.c
+@@ -32,7 +32,7 @@ char*
+ bprintf(Buf *b, char *fmt, ...)
+ {
+       va_list arg;
+-      char buf[4096];
++      char buf[8192];
+       
+       breset(b);
+       va_start(arg, fmt);
+-- 
+2.7.4
+
index 95db1c2b7c5a2ce6353f8053edc10cb428f6aeb6..0791b6d5e15bfb14899c9a238957a764e784f01e 100644 (file)
@@ -4,7 +4,9 @@ nonstaging_libdir := "${libdir}"
 
 inherit native
 
-SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4 \
+                   file://0001-cmd-dist-unix.c-bprintf-use-larger-buf.patch;patchdir=../go1.4 \
+"
 SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04"
 SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"