From patchwork Wed Aug 23 18:25:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 29375 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 72A61C71145 for ; Wed, 23 Aug 2023 18:25:40 +0000 (UTC) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mx.groups.io with SMTP id smtpd.web11.505.1692815134063309608 for ; Wed, 23 Aug 2023 11:25:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=n2o1fQBr; spf=pass (domain: konsulko.com, ip: 209.85.222.172, mailfrom: scott.murray@konsulko.com) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-76da8e70ed3so215447585a.3 for ; Wed, 23 Aug 2023 11:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1692815132; x=1693419932; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZUeTe/gYDrkxTjKd5F1S8VV1lejMPxOULBLfTm1Oa64=; b=n2o1fQBrV6aPbkQznFNjGrVwXh6d99oJvJP20JHHuKJMtiL6U9Ac4LL3Zt8fWBQung X9JPnINI3GmBx1fGaEvV69561OKGA8FAutXXuIDDSrjiu692exCpVlW5sZfx2AfHiCDk 54cD7ZrzhS75NHJlwhbvMQC4Cvjoy5kuo1pSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692815132; x=1693419932; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZUeTe/gYDrkxTjKd5F1S8VV1lejMPxOULBLfTm1Oa64=; b=BgooGCuM+KEy0JVJ41+vIuZz74gMgKlRyzOob44jaHy/pby5MFJK8oCasgCUI0C6p7 f1Ka/HM7YScBXzqvxk57ApQj9aWkb9QEgYXAYi/UR7CNbbKgKx5fiRE+B9Vga5Z1c0X6 3Sz/NjHHQyBtJFFsZFqXMHwTKr2SdA/EMzf8bp7e6k5LptJ0KRNjS7VlL4LsEJT1vV/2 PbZDirwt25EH6o+4oOpsd92C95P2leZnLJbMUYWlUNw9HSymQlmBCj9ECh/mPo9X6odF xqkcd+mZQZi/+TJmlsCwtNDFTrOxLD1StjLgzTAr33zM8G3gs2SmDBQP0VlgEP+91/CX jdzg== X-Gm-Message-State: AOJu0YwXm0o/Q9DHNM7kcKKFG4DIcUegU42gPlI4BA6o3rqeiaGiC4hb WpbpQcam7ppBm/HAc2O7gW3Ap33wzizaEpFt660= X-Google-Smtp-Source: AGHT+IFoZRAQvISiOwowClHYJirPiNAkadTW22nvpxAyO75Kdv2eDRBE/Zi5BI9w/DIUfui5cTc03A== X-Received: by 2002:a05:620a:b57:b0:76e:ed42:37da with SMTP id x23-20020a05620a0b5700b0076eed4237damr677544qkg.57.1692815132360; Wed, 23 Aug 2023 11:25:32 -0700 (PDT) Received: from ghidorah.spiteful.org (192-0-174-82.cpe.teksavvy.com. [192.0.174.82]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a16b600b0076cf49bcb50sm4107431qkj.37.2023.08.23.11.25.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 11:25:31 -0700 (PDT) From: Scott Murray To: yocto@lists.yoctoproject.org Subject: [meta-lts-mixins][PATCH 1/4] cargo.bbclass: set up cargo environment in common do_compile Date: Wed, 23 Aug 2023 14:25:09 -0400 Message-ID: <20230823182512.1073623-2-scott.murray@konsulko.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230823182512.1073623-1-scott.murray@konsulko.com> References: <20230823182512.1073623-1-scott.murray@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 18:25:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/60864 From: Alexander Kanavin cargo_do_compile runs only if the recipe is built using cargo as the top level tool. Some recipes hide usage of cargo inside setuptools (or autoconf) and use do_compile definitions specific to those, and so the environment isn't properly set up. This was exposed by latest versions of python3-cryptography. (From OE-Core rev: a1946efdbec608d47f9e992c1b5cf3c671a204fc) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 9f4ff643a028d7f5670d80861f2ce19ca2d90faa) Signed-off-by: Steve Sakoman Signed-off-by: Scott Murray --- classes/cargo.bbclass | 1 - classes/cargo_common.bbclass | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/cargo.bbclass b/classes/cargo.bbclass index 7a8cc1e..3ef0bbb 100644 --- a/classes/cargo.bbclass +++ b/classes/cargo.bbclass @@ -55,7 +55,6 @@ oe_cargo_build () { do_compile[progress] = "outof:\s+(\d+)/(\d+)" cargo_do_compile () { - oe_cargo_fix_env oe_cargo_build } diff --git a/classes/cargo_common.bbclass b/classes/cargo_common.bbclass index 82ab25b..1ca0be4 100644 --- a/classes/cargo_common.bbclass +++ b/classes/cargo_common.bbclass @@ -149,6 +149,10 @@ python cargo_common_do_patch_paths() { } do_configure[postfuncs] += "cargo_common_do_patch_paths" +do_compile:prepend () { + oe_cargo_fix_env +} + oe_cargo_fix_env () { export CC="${RUST_TARGET_CC}" export CXX="${RUST_TARGET_CXX}" From patchwork Wed Aug 23 18:25:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 29376 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 74B3DC7113B for ; Wed, 23 Aug 2023 18:25:40 +0000 (UTC) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mx.groups.io with SMTP id smtpd.web11.506.1692815135431476022 for ; Wed, 23 Aug 2023 11:25:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=LtM9OA3z; spf=pass (domain: konsulko.com, ip: 209.85.222.172, mailfrom: scott.murray@konsulko.com) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-76d83954c40so410863985a.1 for ; Wed, 23 Aug 2023 11:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1692815134; x=1693419934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VbGeKDkhYfqw/7/VsPMBJABezQ/KBEHadfj6W86fd+c=; b=LtM9OA3zRP/k0DQpP7aDUgXh+Yo/vMWIoWnEUwgjbWtAlUEIAvgaZKekeM8zIGYwg0 IAycS0miFY/5cfNEelKsMmo3WkBA7sdAt1p+E8Kr5Yg6+BPC2eEpZjkJij9fKCJoGWN9 BYeqcZ6Ohn+ppKpn6P4t2OMEwUynp3ZvuDsO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692815134; x=1693419934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VbGeKDkhYfqw/7/VsPMBJABezQ/KBEHadfj6W86fd+c=; b=LrFropHE3/o4hqciDlKpeYecwMiPyRH4NTYDqM1/7Z65MazRCZgcI5J0X442o1VF2V ExncM1HYGsy99vaEsnAGS+6YJVAHA7bTfFEiNAF4xuW6uajLX8H+vt/inzxM1bB15uJb TUBwzOpxVU/FdMfYb8ydT4axhhC6TcOQmxB5YaoxxuF4j+mxqLNKnqIapv8JBI/zSrq1 guQCKXYvF2VZgwUWBTGQFFCEp/h+WPNiXMn+jitMcMnzuHF7WidknTq377Cgwd+sbytI RpOaELGDv3fxaWxUgTd1f4/eFuV5jZO2bHPUrmGHWftiJYGuCDZkzbMszMTAbtRnhgIi KuaA== X-Gm-Message-State: AOJu0YzI3sAUVhqrvHDiNDRAo1sNFWzOPgtWfeuQfAcPUzH+lKOFeq9b I/azahjWe/Tz6psXoSGs+LdLolmmd4hjn0Vj53E= X-Google-Smtp-Source: AGHT+IFqZ607hJWzaARHH30lbmhU14Pl6xvyo5Z0CDK/98KKvdsvDBMDsj/deE/6S7/UBYOnKHhbWw== X-Received: by 2002:a05:620a:218c:b0:767:edc0:64f8 with SMTP id g12-20020a05620a218c00b00767edc064f8mr13406355qka.2.1692815133861; Wed, 23 Aug 2023 11:25:33 -0700 (PDT) Received: from ghidorah.spiteful.org (192-0-174-82.cpe.teksavvy.com. [192.0.174.82]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a16b600b0076cf49bcb50sm4107431qkj.37.2023.08.23.11.25.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 11:25:32 -0700 (PDT) From: Scott Murray To: yocto@lists.yoctoproject.org Subject: [meta-lts-mixins][PATCH 2/4] rust-common.bbclass: move musl-specific linking fix from rust-source.inc Date: Wed, 23 Aug 2023 14:25:10 -0400 Message-ID: <20230823182512.1073623-3-scott.murray@konsulko.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230823182512.1073623-1-scott.murray@konsulko.com> References: <20230823182512.1073623-1-scott.murray@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 18:25:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/60865 From: Alexander Kanavin This needs to be done for any item that is linked under rustc, and not just rust itself. Latest python-cryptography exposes the issue. (From OE-Core rev: 967d847a9815df43d0c92ca61cc544e1fe5dcc03) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit d3811228747590ea06e8d68be4785d45ec9c478f) Signed-off-by: Steve Sakoman Signed-off-by: Scott Murray --- classes/rust-common.bbclass | 4 ++++ recipes-devtools/rust/rust-source.inc | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/classes/rust-common.bbclass b/classes/rust-common.bbclass index e0cedd7..8782727 100644 --- a/classes/rust-common.bbclass +++ b/classes/rust-common.bbclass @@ -158,6 +158,10 @@ WRAPPER_TARGET_CXX = "${CXX}" WRAPPER_TARGET_CCLD = "${CCLD}" WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}" WRAPPER_TARGET_EXTRALD = "" +# see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch +# we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'" +# when building MACHINE=qemux86 for musl +WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared" WRAPPER_TARGET_AR = "${AR}" # compiler is used by gcc-rs diff --git a/recipes-devtools/rust/rust-source.inc b/recipes-devtools/rust/rust-source.inc index b25b5c1..0534e59 100644 --- a/recipes-devtools/rust/rust-source.inc +++ b/recipes-devtools/rust/rust-source.inc @@ -17,8 +17,3 @@ export TARGET_VENDOR UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" UPSTREAM_CHECK_REGEX = "rustc-(?P\d+(\.\d+)+)-src" - -# see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch -# we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'" -# when building MACHINE=qemux86 for musl -WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared" From patchwork Wed Aug 23 18:25:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 29374 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 5CA89C27C40 for ; Wed, 23 Aug 2023 18:25:40 +0000 (UTC) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by mx.groups.io with SMTP id smtpd.web10.496.1692815136747095112 for ; Wed, 23 Aug 2023 11:25:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=BMcMYeAb; spf=pass (domain: konsulko.com, ip: 209.85.222.174, mailfrom: scott.murray@konsulko.com) Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-76dbd877cd9so70931385a.0 for ; Wed, 23 Aug 2023 11:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1692815135; x=1693419935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZSpoWV7IbzWbnJrDWWkPzrU9Hoin5nH8bv3WeZr/GcE=; b=BMcMYeAbVfo0yNyA1oUA7cJbws4V1pkVJw2vvhTVsx1N8J7Tt34lpLYRSAh98MJM9y TypSYo5C/E7Ww089t8ADFmHSy3jHTzXyOL05/Rig1JhtvdD0JqzvK/mk/Zq/RGvqlItB cidHOfE8K5fUETqZ+vrWNlPDSLcByK+TL3eNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692815135; x=1693419935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZSpoWV7IbzWbnJrDWWkPzrU9Hoin5nH8bv3WeZr/GcE=; b=GCFttipo7zPuwBgl1idXNlkC/dKCbiYpoFm+iX/Znkw5c+WegJaugDJFRb+KtOEOk3 Sy5s/SoNsADyCj6MBkBTbEBYmxc8MwX1OAZOl4WozN0nolp6PAtrLMVzwKlveE7fENwe 8hzww29rknAvzTnO8tt8rFYhNPvkLcC5jo8aDPDeyTEkvIsesNesYMbUmxZ6jZY7tKQ2 ZOjnI4PryI09KmJWy5hGzCAO3CcG4QRjIH3Y/DU7SQ+V5eFn+sVIqgEEHtZIC4sCvrWm jZ3lEq90ZeqwObRCwS5m7eTuwq7hTpDRjDOiEaSlNg2Qei3oXRJ2YwBUpzYMU4y9FJHQ qyHw== X-Gm-Message-State: AOJu0YxT2m3zsE/11v7sYjAwexNNJGkXmaBEYNhK3Hkrh8wSJCnCpJ0F IzzEmkjNExq1Ksl9e/RqNsXD5QK6C4O6rtiL/zI= X-Google-Smtp-Source: AGHT+IHlE8pd9Gw5XmsWHLh+4Ia6YFwaGxvSDM3WsLcRgRKwepU4Q3sTJUcjF0SZebnoVHL30YLoUQ== X-Received: by 2002:a05:620a:d93:b0:76c:bc55:1a4 with SMTP id q19-20020a05620a0d9300b0076cbc5501a4mr15852709qkl.39.1692815135163; Wed, 23 Aug 2023 11:25:35 -0700 (PDT) Received: from ghidorah.spiteful.org (192-0-174-82.cpe.teksavvy.com. [192.0.174.82]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a16b600b0076cf49bcb50sm4107431qkj.37.2023.08.23.11.25.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 11:25:34 -0700 (PDT) From: Scott Murray To: yocto@lists.yoctoproject.org Subject: [meta-lts-mixins][PATCH 3/4] librsvg: upgrade to 2.54.6 Date: Wed, 23 Aug 2023 14:25:11 -0400 Message-ID: <20230823182512.1073623-4-scott.murray@konsulko.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230823182512.1073623-1-scott.murray@konsulko.com> References: <20230823182512.1073623-1-scott.murray@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 18:25:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/60866 From: Chee Yang Lee update include fix for CVE-2023-38633. Signed-off-by: Chee Yang Lee Signed-off-by: Steve Sakoman Signed-off-by: Scott Murray --- recipes-gnome/librsvg/{librsvg_2.54.5.bb => librsvg_2.54.6.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename recipes-gnome/librsvg/{librsvg_2.54.5.bb => librsvg_2.54.6.bb} (97%) diff --git a/recipes-gnome/librsvg/librsvg_2.54.5.bb b/recipes-gnome/librsvg/librsvg_2.54.6.bb similarity index 97% rename from recipes-gnome/librsvg/librsvg_2.54.5.bb rename to recipes-gnome/librsvg/librsvg_2.54.6.bb index 59278d1..b917b76 100644 --- a/recipes-gnome/librsvg/librsvg_2.54.5.bb +++ b/recipes-gnome/librsvg/librsvg_2.54.6.bb @@ -20,7 +20,7 @@ SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.pat file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \ " -SRC_URI[archive.sha256sum] = "4f03190f45324d1fa1f52a79dfcded1f64eaf49b3ae2f88eedab0c07617cae6e" +SRC_URI[archive.sha256sum] = "0ee6174140b5fc017e19a75c26e8c3324a560bf2c37f7abd3da06bd58542bb03" # librsvg is still autotools-based, but is calling cargo from its automake-driven makefiles # so we cannot use cargo class directly, but still need bits and pieces from it From patchwork Wed Aug 23 18:25:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 29377 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 5DE31C3DA6F for ; Wed, 23 Aug 2023 18:25:40 +0000 (UTC) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mx.groups.io with SMTP id smtpd.web10.497.1692815138217363180 for ; Wed, 23 Aug 2023 11:25:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=sFO6h16B; spf=pass (domain: konsulko.com, ip: 209.85.222.172, mailfrom: scott.murray@konsulko.com) Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-76df3d8fb4eso64337985a.1 for ; Wed, 23 Aug 2023 11:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1692815137; x=1693419937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LZo4vO352x/bL4R5LS+DLy/ijWWZfHOvXAOtn8oy2f8=; b=sFO6h16B2nkuwsvHztJ79WAcV6MbfZYY1LLhtZ2+GcE68/zM0x2N4EnO0xWTIeR//4 D31wBfbSSaHf/GH8vVMUOvJ+G/2B3zFqKRjWhc3/6C6woZZbcypDgBW7lDYPWTHxHbNQ 2wVWl2lQ0l4UhU/luMwL3v3hMrUxqaB5JogkM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692815137; x=1693419937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LZo4vO352x/bL4R5LS+DLy/ijWWZfHOvXAOtn8oy2f8=; b=BP/oYDkzPAxGuncyYI7641f3DtHcexFjm9B9xGaKKrXc0Lqrgn+HsyzoJSY6v0FwQU nuvP9YJh1ttCK3flhBUXq2mvedw3UTo6dzgCkCn3ML/kKX8IKCH8o6zw1sylAyb73CGg J/rdiZiU/juKFEAXcY62OtAFEC1DHSgIcBsefCtgVQhuYy6ihztYCTWqMJaunqu6mQh9 mGhgLTaKVNea8JZoL/nQA9eB177MnKXvcW20ODbZWCz9M0W7m33InLDqEWTEs7xVkhPn 5lAgsbsJWa8GvJhUMgxE447d9mi7DndYvZ3MFSG/oMJyIns+T/BQNi1cExEZfJk3eWDf J5Sw== X-Gm-Message-State: AOJu0Yx2EQ4taP61i69pbIATg8PjLuZ6P+TQMFE+jpqOIgdCEax2y2mX JB5SqYYVYiDMVBgUD2xpaQxrU3CS7Ve2nNKhspA= X-Google-Smtp-Source: AGHT+IGu/I6Q5e+Dx/9rNM9V5FvbMtYdoezbpkW+p/DOeiMt/E6xJ3eMi4OuWbCxv3FUO6ZxLNEMeA== X-Received: by 2002:a05:620a:2224:b0:76c:ad46:2680 with SMTP id n4-20020a05620a222400b0076cad462680mr13529208qkh.44.1692815136773; Wed, 23 Aug 2023 11:25:36 -0700 (PDT) Received: from ghidorah.spiteful.org (192-0-174-82.cpe.teksavvy.com. [192.0.174.82]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a16b600b0076cf49bcb50sm4107431qkj.37.2023.08.23.11.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 11:25:35 -0700 (PDT) From: Scott Murray To: yocto@lists.yoctoproject.org Subject: [meta-lts-mixins][PATCH 4/4] Fix RISC-V support Date: Wed, 23 Aug 2023 14:25:12 -0400 Message-ID: <20230823182512.1073623-5-scott.murray@konsulko.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230823182512.1073623-1-scott.murray@konsulko.com> References: <20230823182512.1073623-1-scott.murray@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 23 Aug 2023 18:25:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/60867 Building Rust projects for RISC-V platforms was failing due to the layer not including a copy of lib/oe/rust.py to get all the changes from oe-core commit 1cfb9c8a ("rust-target-config: match riscv target names with what rust expects"). Reverting the changes from that commit seems likely to make things less robust, so instead add a copy of the updated lib/oe/rust.py in lib/mixin and update callers of arch_to_rust_arch to use it. This is not ideal from an ease of further maintenance perspective, but seems more inline with the intent of matching the behavior of the Rust toolchain as it stands in Mickledore branch. Signed-off-by: Scott Murray --- classes/rust-common.bbclass | 4 ++-- classes/rust-target-config.bbclass | 2 +- conf/layer.conf | 4 ++++ lib/mixin/rust.py | 13 +++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 lib/mixin/rust.py diff --git a/classes/rust-common.bbclass b/classes/rust-common.bbclass index 8782727..a8971cd 100644 --- a/classes/rust-common.bbclass +++ b/classes/rust-common.bbclass @@ -51,7 +51,7 @@ def rust_base_triple(d, thing): if d.getVar('{}_ARCH'.format(thing)) == d.getVar('TARGET_ARCH') and target_is_armv7(d): arch = "armv7" else: - arch = oe.rust.arch_to_rust_arch(d.getVar('{}_ARCH'.format(thing))) + arch = mixin.rust.arch_to_rust_arch(d.getVar('{}_ARCH'.format(thing))) # Substituting "unknown" when vendor is empty will match rust's standard # targets when building native recipes (including rust-native itself) @@ -77,7 +77,7 @@ def rust_base_triple(d, thing): # In some cases uname and the toolchain differ on their idea of the arch name -RUST_BUILD_ARCH = "${@oe.rust.arch_to_rust_arch(d.getVar('BUILD_ARCH'))}" +RUST_BUILD_ARCH = "${@mixin.rust.arch_to_rust_arch(d.getVar('BUILD_ARCH'))}" # Naming explanation # Yocto diff --git a/classes/rust-target-config.bbclass b/classes/rust-target-config.bbclass index 21a56ed..663b02c 100644 --- a/classes/rust-target-config.bbclass +++ b/classes/rust-target-config.bbclass @@ -343,7 +343,7 @@ def rust_gen_target(d, thing, wd, arch): if arch == "arm" and target_is_armv7(d): arch = 'armv7' - rust_arch = oe.rust.arch_to_rust_arch(arch) + rust_arch = mixin.rust.arch_to_rust_arch(arch) if abi: arch_abi = "{}-{}".format(rust_arch, abi) diff --git a/conf/layer.conf b/conf/layer.conf index b057c77..fa0cbd6 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -23,3 +23,7 @@ BBMASK:append = " meta/recipes-devtools/cargo/ meta/recipes-devtools/rust/ meta/ # These are in bitbake.conf in langdale and up, adding them here to make # using the layer more turn-key seems reasonable. BB_BASEHASH_IGNORE_VARS:append = " RUST_BUILD_SYS RUST_HOST_SYS RUST_TARGET_SYS" + +# Since we cannot overlay the lib/oe version easily, make sure our backport +# of rust.py in lib/mixin is picked up. +OE_EXTRA_IMPORTS:append = " mixin.rust" diff --git a/lib/mixin/rust.py b/lib/mixin/rust.py new file mode 100644 index 0000000..185553e --- /dev/null +++ b/lib/mixin/rust.py @@ -0,0 +1,13 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +# Handle mismatches between `uname -m`-style output and Rust's arch names +def arch_to_rust_arch(arch): + if arch == "ppc64le": + return "powerpc64le" + if arch in ('riscv32', 'riscv64'): + return arch + 'gc' + return arch