From: Aníbal Limón <anibal.li...@linaro.org> This reverts commit fdee07aadc1b5224a540c7e8893144207e1979cb.
Causes build failures when is cross-compiling to aarch64, | CGO_ENABLED=1 aarch64-linaro-linux-go build -i -tags " cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X main.version=1.0.0-rc3 " -o runc . ... | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link: running aarch64-linaro-linux-gcc failed: exit status 1 | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crt1.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crti.o: No such file or directory | /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld: cannot find crtbeginT.o: No such file or directory ... Signed-off-by: Aníbal Limón <anibal.li...@linaro.org> --- recipes-containers/runc/runc.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc index b1f2ba8..83d5f86 100644 --- a/recipes-containers/runc/runc.inc +++ b/recipes-containers/runc/runc.inc @@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''" inherit goarch do_compile() { + export GOARCH="${TARGET_GOARCH}" + export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" # Set GOPATH. See 'PACKAGERS.md'. Don't rely on # docker to download its dependencies but rather # use dependencies packaged independently. @@ -32,6 +34,7 @@ do_compile() { (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname}) export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" # Fix up symlink for go-cross compiler rm -f ${S}/src/import/vendor/src -- 2.11.0 -- _______________________________________________ meta-virtualization mailing list meta-virtualization@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-virtualization