[PATCH V2 7/9] riddler: adjust GOROOT, CGO_CFLAGS and CGO_LDFALGS


Chen Qi
 

Adjust the GOROOT setting as directory specified by the original
one does not exist.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags instead
of the nativesdk ones.

Signed-off-by: Chen Qi <Qi.Chen@...>
---
recipes-containers/riddler/riddler_git.bb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb
index be751d6..e103331 100644
--- a/recipes-containers/riddler/riddler_git.bb
+++ b/recipes-containers/riddler/riddler_git.bb
@@ -26,7 +26,7 @@ EXTRA_OEMAKE="BUILDTAGS=''"

do_compile() {
export GOARCH="${TARGET_GOARCH}"
- export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ export GOROOT="${STAGING_LIBDIR}/go"
# Setup vendor directory so that it can be used in GOPATH.
#
# Go looks in a src directory under any directory in GOPATH but riddler
@@ -44,8 +44,8 @@ do_compile() {
export CGO_ENABLED="1"
export CFLAGS=""
export LDFLAGS=""
- export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
- export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_CFLAGS="${TARGET_CFLAGS}"
+ export CGO_LDFLAGS="${TARGET_LDFLAGS}"
export GO111MODULE=off

cd ${S}/src/import
--
2.36.0