From patchwork Thu Nov 13 12:57:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Marko X-Patchwork-Id: 74422 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 526EFCD6E69 for ; Thu, 13 Nov 2025 12:57:28 +0000 (UTC) Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net [185.136.65.227]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.23159.1763038637497306633 for ; Thu, 13 Nov 2025 04:57:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=peter.marko@siemens.com header.s=fm1 header.b=eDWSNCbc; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.65.227, mailfrom: fm-256628-202511131257154898b509790002074e-wdpfxf@rts-flowmailer.siemens.com) Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 202511131257154898b509790002074e for ; Thu, 13 Nov 2025 13:57:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=peter.marko@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=AGI8F6yXhUcW0sfq7OAntne7OdPodNK/v6Yig0UQYJ8=; b=eDWSNCbcV9s6p4LEBf5XCtBkHFumGInxS+ehKBDcCyuASNoEYxIXgOJZ9Na3dxMcxe+Tlm YjNrErj3qw4NGBpp5BhXtBL/dOkpwQhq0Hhmx64mb51YKb7EVFaZYCEggYYHVOMaZnBP9+2U zHmQAeuMKdt64gfjG7U/pSFpB4ypoAzDehDNgDDIN2t/uIlkZegYA6DmffrmznQ+mvEfeK0g qvj7wOPnLEY93bZGWED0f2RNixHC6LV//g2903n3v6DR9DoTzQBVNZ9/NHrtH0+1JEyw3kKE eyIoCxqkiEumktwe/C3seSaA2sUTNCk1hzmpKB08lY2ut+u1XPiqcQGA==; From: Peter Marko To: yocto-patches@lists.yoctoproject.org Cc: peter.marko@siemens.com, jose.quaresma@foundries.io Subject: [meta-lts-mixins][scarthgap/go][RFC PATCH 26/34] go-cross-canadian: fix binaries install and GOARCH Date: Thu, 13 Nov 2025 13:57:04 +0100 Message-Id: <20251113125712.18914-27-peter.marko@siemens.com> In-Reply-To: <20251113125712.18914-1-peter.marko@siemens.com> References: <20251113125712.18914-1-peter.marko@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-256628:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Nov 2025 12:57:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2531 From: Osama Abdelkader set GOARCH to HOST_GOARCH which is set from SDKMACHINE, since GOARCH defaults to TARGET_GOARCH, which is set from MACHINE (wrong arch). Also fix do_install to correctly install all binaries from ${GO_BUILD_BINDIR} by using 'find -type f' to avoid issues when the directory contains subdirectories (e.g. "linux_arm"). (From OE-Core rev: 31e3bd61c7986bc044e547aa5cb9caba7b32bf22) Signed-off-by: Osama Abdelkader Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie Signed-off-by: Peter Marko --- recipes-devtools/go/go-cross-canadian.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/go/go-cross-canadian.inc b/recipes-devtools/go/go-cross-canadian.inc index 101a208..9ebcf9c 100644 --- a/recipes-devtools/go/go-cross-canadian.inc +++ b/recipes-devtools/go/go-cross-canadian.inc @@ -5,6 +5,8 @@ DEPENDS = "go-native virtual/${HOST_PREFIX}go virtual/nativesdk-${HOST_PREFIX}go virtual/nativesdk-${HOST_PREFIX}compilerlibs" PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}" +GOARCH = "${HOST_GOARCH}" + # it uses gcc on build machine during go-cross-canadian bootstrap, but # the gcc version may be old and not support option '-fmacro-prefix-map' # which is one of default values of DEBUG_PREFIX_MAP @@ -51,7 +53,7 @@ do_install() { install -d ${D}${libdir}/go/pkg/tool cp --preserve=mode,timestamps -R ${B}/pkg/tool/${HOST_GOTUPLE} ${D}${libdir}/go/pkg/tool/ install -d ${D}${bindir} ${D}${libdir}/go/bin - for f in ${B}/${GO_BUILD_BINDIR}/* + for f in $(find ${B}/${GO_BUILD_BINDIR} -type f) do base=`basename $f` install -m755 $f ${D}${libdir}/go/bin