[PATCH 5/5] netns: 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-networking/netns/netns_git.bb | 5 -----
1 file changed, 5 deletions(-)

diff --git a/recipes-networking/netns/netns_git.bb b/recipes-networking/netns/netns_git.bb
index cd17e1a..cf5ce39 100644
--- a/recipes-networking/netns/netns_git.bb
+++ b/recipes-networking/netns/netns_git.bb
@@ -12,14 +12,11 @@ GO_IMPORT = "import"

S = "${WORKDIR}/git"

-inherit goarch
inherit go

EXTRA_OEMAKE = "GO='${GO}'"

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 netns
@@ -37,8 +34,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 GOFLAGS="-mod=vendor"

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