summaryrefslogtreecommitdiffstats
path: root/recipes-networking/netns
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-06-12 01:00:09 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-06-20 12:09:46 -0400
commit69ea90a25e1421427861c4c5c8f69d7230e811f3 (patch)
tree7b53a11630c658f86e9ed155c520ea154c5ab1e8 /recipes-networking/netns
parent614b5dbb4f79c63000ba25fef6d00cb56edbb646 (diff)
downloadmeta-virtualization-69ea90a25e1421427861c4c5c8f69d7230e811f3.tar.gz
netns: adjust GOROOT, CGO_CFLAGS and CGO_LDFALGS
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@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-networking/netns')
-rw-r--r--recipes-networking/netns/netns_git.bb6
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes-networking/netns/netns_git.bb b/recipes-networking/netns/netns_git.bb
index cd17e1a3..a4dcb42b 100644
--- a/recipes-networking/netns/netns_git.bb
+++ b/recipes-networking/netns/netns_git.bb
@@ -19,7 +19,7 @@ EXTRA_OEMAKE = "GO='${GO}'"
19 19
20do_compile() { 20do_compile() {
21 export GOARCH="${TARGET_GOARCH}" 21 export GOARCH="${TARGET_GOARCH}"
22 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" 22 export GOROOT="${STAGING_LIBDIR}/go"
23 # Setup vendor directory so that it can be used in GOPATH. 23 # Setup vendor directory so that it can be used in GOPATH.
24 # 24 #
25 # Go looks in a src directory under any directory in GOPATH but netns 25 # Go looks in a src directory under any directory in GOPATH but netns
@@ -37,8 +37,8 @@ do_compile() {
37 export CGO_ENABLED="1" 37 export CGO_ENABLED="1"
38 export CFLAGS="" 38 export CFLAGS=""
39 export LDFLAGS="" 39 export LDFLAGS=""
40 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" 40 export CGO_CFLAGS="${TARGET_CFLAGS}"
41 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" 41 export CGO_LDFLAGS="${TARGET_LDFLAGS}"
42 export GOFLAGS="-mod=vendor" 42 export GOFLAGS="-mod=vendor"
43 43
44 cd ${S}/src/import 44 cd ${S}/src/import