summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-06-12 01:00:08 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-06-20 12:09:46 -0400
commit614b5dbb4f79c63000ba25fef6d00cb56edbb646 (patch)
tree8dca27f503451fc2d5d0898ca0e3ad37a6d9b22b
parent0bad7905e5ea3bc0b36560a2c60fb7b842f6efc1 (diff)
downloadmeta-virtualization-614b5dbb4f79c63000ba25fef6d00cb56edbb646.tar.gz
oci-image-tools: 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>
-rw-r--r--recipes-containers/oci-image-tools/oci-image-tools_git.bb6
1 files changed, 3 insertions, 3 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 8bafd2ab..90e671ca 100644
--- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -29,7 +29,7 @@ EXTRA_OEMAKE="BUILDTAGS=''"
29 29
30do_compile() { 30do_compile() {
31 export GOARCH="${TARGET_GOARCH}" 31 export GOARCH="${TARGET_GOARCH}"
32 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" 32 export GOROOT="${STAGING_LIBDIR}/go"
33 # Setup vendor directory so that it can be used in GOPATH. 33 # Setup vendor directory so that it can be used in GOPATH.
34 # 34 #
35 # Go looks in a src directory under any directory in GOPATH but riddler 35 # Go looks in a src directory under any directory in GOPATH but riddler
@@ -48,8 +48,8 @@ do_compile() {
48 export CGO_ENABLED="1" 48 export CGO_ENABLED="1"
49 export CFLAGS="" 49 export CFLAGS=""
50 export LDFLAGS="" 50 export LDFLAGS=""
51 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" 51 export CGO_CFLAGS="${TARGET_CFLAGS}"
52 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" 52 export CGO_LDFLAGS="${TARGET_LDFLAGS}"
53 export GO111MODULE=off 53 export GO111MODULE=off
54 54
55 cd ${S}/src/import 55 cd ${S}/src/import