yocto.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Jose Quaresma <quaresma.jose@gmail.com>
To: yocto@lists.yoctoproject.org
Cc: ricardo@foundries.io, jose.quaresma@foundries.io,
	Alexander Kanavin <alex.kanavin@gmail.com>,
	Alexander Kanavin <alex@linutronix.de>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: [[yocto][meta-lts-mixins][kirkstone/go] 11/16] go-cross-canadian: use gcc-crosssdk, not gcc-native
Date: Fri, 31 Mar 2023 16:20:37 +0000	[thread overview]
Message-ID: <20230331162042.1801766-11-jose.quaresma@foundries.io> (raw)
In-Reply-To: <20230331162042.1801766-1-jose.quaresma@foundries.io>

From: Alexander Kanavin <alex.kanavin@gmail.com>

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>
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 recipes-devtools/go-1.20/go-cross-canadian.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes-devtools/go-1.20/go-cross-canadian.inc b/recipes-devtools/go-1.20/go-cross-canadian.inc
index c1aa987..5a80cef 100644
--- a/recipes-devtools/go-1.20/go-cross-canadian.inc
+++ b/recipes-devtools/go-1.20/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"
-- 
2.34.1



  parent reply	other threads:[~2023-03-31 16:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 16:20 [[yocto][meta-lts-mixins][kirkstone/go] 01/16] Initial commit: add license, readme and layer config Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 02/16] make it kirkstone compatible Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 03/16] go-helloworld: add from openembedded-core master Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 04/16] go-helloworld: recipes-devtools -> recipes-extended Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 05/16] go-helloworld: update to latest revision Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 06/16] " Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 07/16] go-helloworld: remove unused GO_WORKDIR Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 08/16] go-1.18: import recipes from openembedded-core Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 09/16] go-1.19: " Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 10/16] go-1.20: " Jose Quaresma
2023-03-31 16:20 ` Jose Quaresma [this message]
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 12/16] go: update 1.20 -> 1.20.1 Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 13/16] go: use go as CVE product for all golang recipe veriants Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 14/16] go: fix some linkshared regression introduced in go 1.20 Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 15/16] README: add note about backporting Jose Quaresma
2023-03-31 16:20 ` [[yocto][meta-lts-mixins][kirkstone/go] 16/16] README: add my self as maintainer Jose Quaresma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230331162042.1801766-11-jose.quaresma@foundries.io \
    --to=quaresma.jose@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=jose.quaresma@foundries.io \
    --cc=luca.ceresoli@bootlin.com \
    --cc=ricardo@foundries.io \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).