[PATCH 4/5] oci-image-tools: 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/oci-image-tools/oci-image-tools_git.bb | 5 -----
1 file changed, 5 deletions(-)

diff --git a/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
index 8bafd2a..5d2f7c9 100644
--- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -20,7 +20,6 @@ SRCREV = "11f9988298305d36f64248a6ee55318e60bf170b"
PV = "1.0.0-rc3+git${SRCPV}"
GO_IMPORT = "import"

-inherit goarch
inherit go

# This disables seccomp and apparmor, which are on by default in the
@@ -28,8 +27,6 @@ inherit go
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
@@ -48,8 +45,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