From: Alexander Kanavin Date: Fri, 10 Feb 2023 06:42:13 +0000 (+0100) Subject: go-cross-canadian: use gcc-crosssdk, not gcc-native X-Git-Tag: 2023-04-mickledore~529 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9212704a0e6ba79c3a3c4d85fc132e0ab6de1747;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git go-cross-canadian: use gcc-crosssdk, not gcc-native The recipe was building native go against build host headers and libraries, and then installing it as a nativesdk item, which is entirely incorrect. This has been working by coincidence (go generally uses C and C libraries lightly) but with go 1.20 this turned into hard breakage. Also nativesdk sysroot was being passed in incorrectly. Signed-off-by: Alexander Kanavin Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc index c1aa9874277..5a80ceffa38 100644 --- a/meta/recipes-devtools/go/go-cross-canadian.inc +++ b/meta/recipes-devtools/go/go-cross-canadian.inc @@ -21,10 +21,10 @@ export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "-- do_configure[noexec] = "1" do_compile() { - export CC_FOR_${HOST_GOTUPLE}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}" - export CXX_FOR_${HOST_GOTUPLE}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}" + export CC_FOR_${HOST_GOTUPLE}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS}" + export CXX_FOR_${HOST_GOTUPLE}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS}" cd src - ./make.bash --host-only --no-banner + ./make.bash --target-only --no-banner cd ${B} } do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"