From 099c65aa00cc777c8c649c64064be83130ce9ab6 Mon Sep 17 00:00:00 2001 From: Dale Larson Date: Wed, 7 Dec 2016 13:45:51 -0600 Subject: [PATCH 1/2] Fix cgo toolchain path error when on target platform. The path to the gcc and g++ compilers had the yocto build system's paths rather than a target system path baked into the tools. This caused broken builds for native code on the target device. The compile task for the recipe added the package's workspace to PATH and used explicit paths to the compilers to the batch files that wrapped access to the tools. --- recipes-devtools/go/go.inc | 5 ++++- recipes-devtools/go/go_1.6.3.bb | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) mode change 100644 => 100755 recipes-devtools/go/go.inc mode change 100644 => 100755 recipes-devtools/go/go_1.6.3.bb diff --git a/recipes-devtools/go/go.inc b/recipes-devtools/go/go.inc old mode 100644 new mode 100755 index 8dae6ab..b2a00f6 --- a/recipes-devtools/go/go.inc +++ b/recipes-devtools/go/go.inc @@ -52,12 +52,15 @@ setup_go_arch() { } setup_cgo_gcc_wrapper() { + sdkpathnative=${7:-${SDKPATHNATIVE}} + bindir=${5:-${bindir_nativesdk}} + # Is there a bug in the cross-compiler support for CGO? Can't get it # to work without this wrapper for t in gcc g++ ; do cat > ${WORKDIR}/${TARGET_PREFIX}${t} < ${D}${GOROOT_FINAL}/bin/${TARGET_PREFIX}${t} < Date: Wed, 14 Dec 2016 18:57:23 -0600 Subject: [PATCH 2/2] Update go_1.6.3.bb --- recipes-devtools/go/go_1.6.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-devtools/go/go_1.6.3.bb b/recipes-devtools/go/go_1.6.3.bb index 56d9778..11b0c01 100755 --- a/recipes-devtools/go/go_1.6.3.bb +++ b/recipes-devtools/go/go_1.6.3.bb @@ -51,7 +51,7 @@ go_install() { for t in gcc g++ ; do cat > ${D}${GOROOT_FINAL}/bin/${TARGET_PREFIX}${t} <