[PATCH 3/5] riddler: adjust inherit and fix CGO settings


Chen Qi
 

go.bbclass already inherits goarch.bbclass.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
oe-core's go.bbclass, not the SDK related ones.

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

diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb
index be751d6..d92e732 100644
--- a/recipes-containers/riddler/riddler_git.bb
+++ b/recipes-containers/riddler/riddler_git.bb
@@ -13,7 +13,6 @@ GO_IMPORT = "import"

S = "${WORKDIR}/git"

-inherit goarch
inherit go

# In addition to hosts go does not like, we do not build for mips.
@@ -25,8 +24,6 @@ COMPATIBLE_HOST:mipsarch = "null"
EXTRA_OEMAKE="BUILDTAGS=''"

do_compile() {
- export GOARCH="${TARGET_GOARCH}"
- export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/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 +41,6 @@ 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 GO111MODULE=off

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