]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
go-cross-canadian: use gcc-crosssdk, not gcc-native
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 10 Feb 2023 06:42:13 +0000 (07:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 Feb 2023 10:20:44 +0000 (10:20 +0000)
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 <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/go/go-cross-canadian.inc

index c1aa98742775de2e3f366cf13b84002e847156a9..5a80ceffa38a782b2279a6ebcdea2636d68e067d 100644 (file)
@@ -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"