mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
oci-runtime-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>
This commit is contained in:
parent
7808674c4c
commit
08d50052be
|
@ -18,7 +18,7 @@ inherit go
|
||||||
|
|
||||||
do_compile() {
|
do_compile() {
|
||||||
export GOARCH="${TARGET_GOARCH}"
|
export GOARCH="${TARGET_GOARCH}"
|
||||||
export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
|
export GOROOT="${STAGING_LIBDIR}/go"
|
||||||
export GOPATH="${S}/src/import:${S}/src/import/vendor"
|
export GOPATH="${S}/src/import:${S}/src/import/vendor"
|
||||||
|
|
||||||
# Pass the needed cflags/ldflags so that cgo
|
# Pass the needed cflags/ldflags so that cgo
|
||||||
|
@ -26,8 +26,8 @@ do_compile() {
|
||||||
export CGO_ENABLED="1"
|
export CGO_ENABLED="1"
|
||||||
export CFLAGS=""
|
export CFLAGS=""
|
||||||
export LDFLAGS=""
|
export LDFLAGS=""
|
||||||
export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
export CGO_CFLAGS="${TARGET_CFLAGS}"
|
||||||
export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
export CGO_LDFLAGS="${TARGET_LDFLAGS}"
|
||||||
export GO111MODULE=off
|
export GO111MODULE=off
|
||||||
|
|
||||||
# fixes:
|
# fixes:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user