From 69ea90a25e1421427861c4c5c8f69d7230e811f3 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Sun, 12 Jun 2022 01:00:09 -0700 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-networking/netns/netns_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes-networking/netns') 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}'" 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 netns @@ -37,8 +37,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 GOFLAGS="-mod=vendor" cd ${S}/src/import -- cgit v1.2.3-54-g00ecf