From patchwork Wed Nov 27 12:40:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hemraj, Deepthi" X-Patchwork-Id: 53296 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 300B7D6ACC9 for ; Wed, 27 Nov 2024 12:41:20 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.web11.71035.1732711274346433422 for ; Wed, 27 Nov 2024 04:41:14 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=106132e37a=deepthi.hemraj@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AR5XQ6M014607 for ; Wed, 27 Nov 2024 04:41:14 -0800 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 433feq44e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Nov 2024 04:41:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HnDZIry9BM2AxwIV3Ufz2N9O/MzLC/PJ2h/bYdW6ucQHWBb/51A5fdmyC2bbLU1NNvb8N3Tmv64a+2m87fNYoLlKbHysrgc+ca8NzMf5zGDin+dWqzfEwTRCqG11gj9s2d0OPXdkEv8z1UFXj/nKvukXtvMljHS/JraoC/e5PeJiY9yTdlXZs3ZuG9U9CM4jBPl95aCLVIeywCjg7edOJ0NcoiWf2S5Vc60yNxgsegu7FoY7VnPMyzNkV2dvPJxyhLADYJgaCtwWCZkVP8K5o1O1k051AUE1HluAVstQMl7jKwKKPEFswUy4G7or1I4i3gK5ZrIVoJuqpH1+XTbO5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z6/GzBKxMnDX1fAIX1EpXv8EYU7GZkHrS2mvGKnFdnQ=; b=fjlNt7gKmXmC5+Bp9yjNpdASqSug3Hh+XTo2Sw/vM1R+569LTp+ve5FaPwZ8pqEw6tc4WI3Bupk9XIFXSwB0dQYPW+Q4/d1H439HHkAnhkum5MoWPRUmntsb58t4M8oTroVMmqDDpMPginGEiZIBiPfH3SRJBoPQf/px3dREZLspckw7wXkYVfaSYGEW6F8UNgBqnLq2yxyFdp/B9IKa2qTHCKn8seLQ3FkhjWeQIliHkCFi5ZSkDwZxAejx2q9BvIOVjn5QCOLNsBN4OPpjkvanGjfFn/04HfU/ajZhvkzg3CcR4eGdS2cBq3qQnst0pVNUv3N/zgwKFHX/nvv4yA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from LV3PR11MB8602.namprd11.prod.outlook.com (2603:10b6:408:1b3::11) by CY8PR11MB7873.namprd11.prod.outlook.com (2603:10b6:930:79::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Wed, 27 Nov 2024 12:41:09 +0000 Received: from LV3PR11MB8602.namprd11.prod.outlook.com ([fe80::5e20:4508:a523:df39]) by LV3PR11MB8602.namprd11.prod.outlook.com ([fe80::5e20:4508:a523:df39%4]) with mapi id 15.20.8207.010; Wed, 27 Nov 2024 12:41:08 +0000 From: Deepthi.Hemraj@windriver.com To: openembedded-core@lists.openembedded.org Cc: Randy.MacLeod@windriver.com, Naveen.Gowda@windriver.com, Sundeep.Kokkonda@windriver.com Subject: [PATCH 1/2] rust-cross-canadian: Fix environment setup script conflicts for multilibs Date: Wed, 27 Nov 2024 04:40:51 -0800 Message-ID: <20241127124052.968438-1-Deepthi.Hemraj@windriver.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To LV3PR11MB8602.namprd11.prod.outlook.com (2603:10b6:408:1b3::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV3PR11MB8602:EE_|CY8PR11MB7873:EE_ X-MS-Office365-Filtering-Correlation-Id: 09ce5929-2252-40b9-5341-08dd0ee0c417 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: olISWDjJcJPXjRIjzUyDpNt1A9NcN3aG9m9PMUORlljmOp1BuvFBBDfv0DnWwfqTvi/uo4DJcTkpYyxdWsV33yKu1Puw6YbxYVWlfjCFFEGANWx2BPjuqchJxSCx9dJ9qATidwytt1Ternt11qRyGogNsyJH66y0A61ZnZKkaS0I0d2+qtObAKsuURt5dLFX/PTLhsZ8WtNTgFkY1jBW6jDS7Xck1hesQ3FysDfIfuxnZgvsQpSjqRelMivQ5/OhghFEtnHx03orH+e8aQoQ8DQNf7+AVK7z7178ahPunDVVuktIqdnUg5R14lzxFLU3uppDD0azVPjebZo2SHrZu5gFknD9NVYPj5pEZMsTLQQs2Ch9JodKiJhC3kOXujI0wcY58iVwEsgOvEJTD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prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dPBrj9nVyE8OE5OWuXVzu6EAmjh3D1sTAnGzv0pL/Djjs8yxV9zzf+JaNurPwVUFtVGO28p0bwxxV4xDtjiupV0ZrBGf4cCL+I8nFI5AeUh8qEPQPQvsp2kUdepT9f25LlzAmZvAf6UhhiTmGBNZzz1I74wDZlNAO08Gp5FtBUgJYBGzfQF+jwvMe9JxypnOy97blZwFQtjlIvLOvq0jP3gczB3994h30b98fxPkOZDl694kYLypRtP2AUqkBx3hiNvv2aCLyK3B1qECKdpv/nuRlgMZKfER0XilxHm1dUcb7rPzSA0eyatZAhc+gsyd7GxuIP6ZRmi8wDjVdLmZbQDmLNBYpOVSImI8F+gzGkxsc54FVSE0/8JyXtYGpX8ojIWPX/5JG6uN2HCJ39q4rHtI+iByg6814hSqMPoPX333Xn6KjRy1gtRwNlQLFvkQ1JZUCz72qRqZp64fBjOUulc4q7QmdG6lLTPcoj2eDG3BJkbuy2EU4lMpyKQPU+gc5er5Yh+RSgKPNW9J29pH64CF8wFLYholCNQ/PQHmxeF6Vr3kJWfYfAR8dllHPjgGGHeKhRxSWNwz8UA39KvBoGp5h7HYG7qRmACNzgTELLN48roLr/SqCTpTKZUPzvq9W7iBxXAXg06eP919GdckQsTNEWau3Ulg02AbelmPD0lHRSttlqr8NNlBj8HR2oru3UUIlPax8g3YFxlIASo1ViH5vFOTb3670rHIxKyPYnyyBOIJEYGshZ4F1/VlTZlxT+ztYFlS/FMtyrINods0B9SSE5JGnh+KVVWiZzpyVijJGZh6OrkkOmxgwE43FFdjqJTrpHFsDcVXuY72cfN4kxKtciPCgX4YJ9EnC1C/bEgZLBnlCn7srzjgeWssRBgWE5v9mslfH/G8UgNaCREUPdsXj7UaHnLgCV1bMFLOiOxmc/07/OqiCUjNuKJO13wdwvH5K26B0ZASCaQOnuAPKYgqkL3T6bQI3dv1zSu3oZqwDvARoQKvAKJMKMlWsT6jcL988se6gkUgcx/6pOPuILNmybpZorWZTAuirU2CnGEjgOcOtCqCwSPKzVTFTj/GUhGcamRZtUcrS17DHdjxmSiepCQfzUgzsQwZWtJSoh/31BuCIQHZ61sW5F3MREcm0GY7kYv1WrmR56KKfVlDTa0H9u2s85xA0aqqk+nurcVyxDo0S/4wHIr+YBlWEwkulOfcOjW6kCQbMOkwgTOFthRuRmhSfz7D7vNmfUPWRfLYCigsYk/09spJf60Gb3yuPIHNOI7IDtGhUSocHMusaqPeyoB+jBnv88l0IEdJ+o0B5EfAiIK2hk5CLpJm7JealXTNiIgjrg7EeLhSFFMcpbX+TJOnD7M6MRilu3Qz7jZ4aMD9KuXYem56cVlDrpmNtedK2m3jBMKEmD+WN+ARnJWVE/MXp8fV1irDJ03dYvnYHM4Zxs/6n7twyJdfFazssVQOVAxqnPLQDdr2PiL+ULRDmiKaoPK8tQQLUa93bLxjzFuqbuFr8KoWcQ6eM7H9JauU7K3DF2GpYols7Tsk4wpeYaPSTpFEC/0iCCEKogV9j7L7H6T1ijZSU1X9oJ6cp4B5faHAhAyvgc9JEWWIkA== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09ce5929-2252-40b9-5341-08dd0ee0c417 X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8602.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2024 12:41:08.3550 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: niEZo25svQK7dGmf9t6KI24fNG5RYg6ezhd8h8ztEg1FLJ0wzXMDHwfkwRkXkBZ0couqZGuXmEeM85RzdoFdUhETqxbaANu3yrL9GwgqRgI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7873 X-Authority-Analysis: v=2.4 cv=c+L5Qg9l c=1 sm=1 tr=0 ts=67471369 cx=c_pps a=ZeveGGZnxkNpWlA7A6AaFA==:117 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=VlfZXiiP6vEA:10 a=bRTqI5nwn0kA:10 a=NEAV23lmAAAA:8 a=7mOBRU54AAAA:8 a=t7CeM3EgAAAA:8 a=wnQMr7rs1oaJLksxR58A:9 a=wa9RWnbW_A1YIeRBVszw:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-ORIG-GUID: Bfx1raWvWAoFCjoTKzFMWC_XtrHYmU7U X-Proofpoint-GUID: Bfx1raWvWAoFCjoTKzFMWC_XtrHYmU7U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-11-27_04,2024-11-27_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 clxscore=1015 priorityscore=1501 adultscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.21.0-2409260000 definitions=main-2411270102 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, 27 Nov 2024 12:41:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207926 From: Deepthi Hemraj YOCTO [#15061] The target independent variables like CARGO_HTTP_MULTIPLEXING and CARGO_HTTP_CAINFO should be handled by the nativesdk-cargo recipe, rather than being managed within rust-cross-canadian. The build section of the Cargo configuration file is also target-independent and hence moved to nativesdk-cargo. The nativesdk-cargo recipe can then gather these entries from the individual target-specific files to generate the final cargo_home/config file. Target-specific configurations are specific to the rust-cross-canadian variant and should remain there. --- meta/recipes-devtools/rust/cargo_1.80.1.bb | 24 +++++++++++++++++++ .../rust/rust-cross-canadian.inc | 17 ++----------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/meta/recipes-devtools/rust/cargo_1.80.1.bb b/meta/recipes-devtools/rust/cargo_1.80.1.bb index 123032cdf7..c98fa4a005 100644 --- a/meta/recipes-devtools/rust/cargo_1.80.1.bb +++ b/meta/recipes-devtools/rust/cargo_1.80.1.bb @@ -50,8 +50,32 @@ do_install:append:class-nativesdk() { # sets to libdir but not base_libdir leading to symbol mismatches depending on the # host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this. create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir} + + ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d + mkdir "${ENV_SETUP_DIR}" + CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" + + RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` + + cat <<- EOF > "${CARGO_ENV_SETUP_SH}" + export CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/${SDKLOADER}" + export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" + mkdir -p "\$CARGO_HOME" + if ! grep -q '^\[build\]' "\$CARGO_HOME/config"; then + touch "\$CARGO_HOME/config" + echo "[build]" >> "\$CARGO_HOME/config" + echo 'linker = "target-rust-ccld"' >> "\$CARGO_HOME/config" + fi + + # Keep the below off as long as HTTP/2 is disabled. + export CARGO_HTTP_MULTIPLEXING=false + export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt" + EOF + } +FILES:${PN} += "${base_prefix}/environment-setup.d" + # Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1) # as shipped by Yocto Dunfell. # According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc index c34b839d15..5de22ad2b0 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc @@ -57,36 +57,23 @@ do_install () { RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` - RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` SDKLOADER=${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'i686', 'ld-linux.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}${@bb.utils.contains('SDK_ARCH', 'ppc64le', 'ld64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'riscv64', 'ld-linux-riscv64-lp64d.so.1', '', d)} cat <<- EOF > "${RUST_ENV_SETUP_SH}" export CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT" - export CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/${SDKLOADER}" export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib" - EOF - - chown -R root.root ${D} - - CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" - cat <<- EOF > "${CARGO_ENV_SETUP_SH}" export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" mkdir -p "\$CARGO_HOME" # Init the default target once, it might be otherwise user modified. if [ ! -f "\$CARGO_HOME/config" ]; then touch "\$CARGO_HOME/config" - echo "[build]" >> "\$CARGO_HOME/config" echo 'target = "'${RUST_TARGET_SYS}'"' >> "\$CARGO_HOME/config" echo '# TARGET_SYS' >> "\$CARGO_HOME/config" echo '[target.'${RUST_TARGET_SYS}']' >> "\$CARGO_HOME/config" - echo 'linker = "target-rust-ccld"' >> "\$CARGO_HOME/config" fi - - # Keep the below off as long as HTTP/2 is disabled. - export CARGO_HTTP_MULTIPLEXING=false - - export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt" EOF + + chown -R root.root ${D} } FILES:${PN} += "${base_prefix}/environment-setup.d" From patchwork Wed Nov 27 12:40:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hemraj, Deepthi" X-Patchwork-Id: 53295 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 2F137D6ACC4 for ; Wed, 27 Nov 2024 12:41:20 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web11.71036.1732711276464921067 for ; Wed, 27 Nov 2024 04:41:16 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=106132e37a=deepthi.hemraj@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AR7rkAl027871 for ; Wed, 27 Nov 2024 12:41:15 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2045.outbound.protection.outlook.com [104.47.74.45]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 433491cjdw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Nov 2024 12:41:15 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DAT/GtLoGGz5ZjX+ee2c2hif+Yj/Vsx2NB4kIseXhH2h0CmshvSu96a3Ks0kCT0a9cOU2OtgA2m98ZCPWDooxm5Ao4P4y3TLP8lrcsps0p/aBgcL71L6hkAwZHS75YXXsU+FV+sRxkWFrkXe/2mrwMkkK76OaKt0dU38NGoqznhsxD4Lg8j2pxY1nIRSjJbvDDEbKkLpSWYyfgtmrb/4uYNzwN/GeKql7VGTrLxySAXGB9Rv7zZxDd/c9cjMdMbKdoB3yAv+sxMnm/R27sDpkLZiqf+1XP3aOwqcq0xTGgYKv4eBG71EalYyjsM5j+iV3sNM63HDPqNbMUOH9wH2gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DcnaEdN1MwEDa/7VJHc8TOMogW/9cifeEOAKiGmKFXQ=; b=BqhQvmi2nI2UWF2Vx95uviNyC52AeIp2Oep8pZX0STB7vBWbB1fTO2Z40I162D+LXL1bu1uZQBky9SGCxktKzTkKUjvxZqaOzOQt6yp2Dgwa0j8hUhXIneUV5cddif8vkZHxYz8qg3ZSbFdzP7W/Rv2z63RFBfqJ3/IP+FWsp2mHy7MybX0DYjqC5i62G8Os7FaxVgvfZmGS3nALqVPxEc2vaN14FVazhCdJqLl4oL3UNlCUiuVGYmylcz4S4LcFAi+eECs03FurvVYuK7mvX1n4gIG6H3qKVUqUcyPhPAyd7/AwM3hu1T4oaFY4fqTZqtCmXkLAMSbdl/h4ZT6v1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from LV3PR11MB8602.namprd11.prod.outlook.com (2603:10b6:408:1b3::11) by CY8PR11MB7873.namprd11.prod.outlook.com (2603:10b6:930:79::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Wed, 27 Nov 2024 12:41:13 +0000 Received: from LV3PR11MB8602.namprd11.prod.outlook.com ([fe80::5e20:4508:a523:df39]) by LV3PR11MB8602.namprd11.prod.outlook.com ([fe80::5e20:4508:a523:df39%4]) with mapi id 15.20.8207.010; Wed, 27 Nov 2024 12:41:13 +0000 From: Deepthi.Hemraj@windriver.com To: openembedded-core@lists.openembedded.org Cc: Randy.MacLeod@windriver.com, Naveen.Gowda@windriver.com, Sundeep.Kokkonda@windriver.com Subject: [PATCH 2/2] rust-cross-canadian: Fix environment setup script conflicts for multilibs Date: Wed, 27 Nov 2024 04:40:52 -0800 Message-ID: <20241127124052.968438-2-Deepthi.Hemraj@windriver.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241127124052.968438-1-Deepthi.Hemraj@windriver.com> References: <20241127124052.968438-1-Deepthi.Hemraj@windriver.com> X-ClientProxiedBy: BY5PR20CA0021.namprd20.prod.outlook.com (2603:10b6:a03:1f4::34) To LV3PR11MB8602.namprd11.prod.outlook.com (2603:10b6:408:1b3::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV3PR11MB8602:EE_|CY8PR11MB7873:EE_ X-MS-Office365-Filtering-Correlation-Id: 965950e8-d977-4735-493f-08dd0ee0c6f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: ZWRAo4kTUg25yFaX2+J+a4mUlEEoEgP2ae3Vw2eaDLicKHXRxdWyb7SOxxjcauG+BnsaunVFoUtnu0mQIRsMV24lB82PUTFvfWOKE2llD3n9Jl4O15axYrX+2GrhYe3au2FE/EQ4AlEvZlomwVDo7qJTM0YSw/Su9dDizZ4ysMBFwtLrvD/7cWypBevVl7SJ5j8Qkq5InbiQVT4lGIEcxToLO+6SaVC0nhLbYBmMQdXVDP0pq/Mh2od0gLGC3m0D9BGZG4LYMH2MyX1EHgjmxeucR6MkbFe93f/KjHaE7gvZ00RFWzYmaQPi3+ky5A2VK0OS27gKhhFB2ee276ohwQw7bwXAuPHeN0FvsvXVn51WfLLPNDPYQaRNKKVqyD6zXFgbZq0JqmATxTBcg2P5fnEQ+PB4idts/fnIkxNTbF3qAZt8Ce51MaOW6S/9S5XcAT+prycgwNdlODMh+67candyuXDq855CYxeb/nstGN/DEMwRuK9ROEcWoMmt71FKgepdATB5Ejc5L0nGK1zIAqT7if7usvCorMZmQCu/j9b24mfRl3ErHVMNuVwm1b8gPDBQYaTWvI9RtuU5YBA0Zy2BwS5+eM/bKai3rPnegRlZDedA6EF92VZ4CsN67ihJ018pRJLf0xoQbtBqoGxJNlA52JTWk28BzofKmc+cElOqe1UKDwefpAEgnJkwbgoIHDziUh3OKdWeX9+1bFrsKUA4ncm46nk6RFQN56xrDsmHo6hBi2CHtHuS2hBWqdsXZVfrdfV0xLN47YlANaofPitNZnnC2hoh8oEXdwrStdoy74H3B+AM89k24kxRI3Ml6soYacUXqDbi9O6vhMaZffxuHnPkEx40yLM2KB8SpiPddvg3Pg4unKD/KgjOqDax8nA2+N7dmG9vROd+ZmwShABZsGOZnw0CZS/v022tPm2i2jwP7LRH2fAqCx/qib8sFdTnktEOviR5i4CHgF1WsBwdrv8EWltCpXPZ9zKhvlVTCZ5/zT3TmGlSmCG+RvBtm7iHyJs0/h6LloejUJ50fOgVQpClZFWxpyclNVEfn0TFrgpX96p9E429SN0DjtWyhJy59aTq++ma3d/NjHQIqPRVVlyuD2FwqK5BOsVVYWblfHI3H4ocdR0U/rEwPpzIdat71Wlti5CuZeRgrIdUqCU1TkMOuUnM6jthzte0PXPfT5kPyLPYTKhm+NAmzemoixINzrNpb4bp9KDKFBkOaU/xCU+eFY/nzP73VzCfFulx1ScXQnwsGbdjjrv6wteHpOMPFnLQtTzOccoFitmae9H0lVn9WCmvKbaGX4PTQAC1skah7aZvDh/MIRGoa6EL297nz0MV1lzOipBpPZarSq5aK01i6X5rNuu2WdzEj4jLr6pqFmNZrOAVwTS6kCvsvPo+b6dz7JXs7HpOwGEhKg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR11MB8602.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bq8ERiX0/O4CK3uSQAGTnhe990+ZY4OaLtWoD1S5y+zW+m1TN2wMFzVxjs2cqIQtxOhYqJfNdeg2pP5Gkfl2pAIY8LfVBR3q/j8BLGiYPYF2Scw37Uq5hRFzpmDxKa4SLWif0mE1fgG09tSCwZNzrQWwHONGJPcgGLZy7idAI1hEpb8+M1HpL9cPBZBTWcyldcN/9JpCn/a1FUB4P/L7b6brRyfmIjKUuSLNJmhOMVhW/MoNeKq3GeoE2wE+QFtLwsQf1UNdytYbzjC7v36zfisGS+mGTbQJ26DBz0mPFvnGutvcqrer1R+aAgpdBKLb3TiQIpJOjYBSXD9qtcC3J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cYPOt94NSrNFvU60Rs7PQedg5S9xyEOOPV5rii4mkA46sFAkHQdGHpXePUm3bTMm/vov6AMjEBjeHQln2B4NE3fs5cFLUa/VTeNo+GU2aFVU8X44FxuNquG+4y50Hnhgu0NCbwFQ/Ip8a5SjvJkSjg/sryxiV9B7VU+eDhUVYEc//KqPGyGEMFfuP/yz2M8RxR7jTDw== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 965950e8-d977-4735-493f-08dd0ee0c6f2 X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8602.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2024 12:41:13.1074 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OdCs0rriuLxIpM03Xv/wNVopoOgyGm9J0sffKf6BiFwO2qORTX+HENO3s3Y0LOL7HvDBX2+Ppd9HhfCY5QICt91wfD5tM0ZatDrO5PRgR7Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7873 X-Authority-Analysis: v=2.4 cv=W4ZqVgWk c=1 sm=1 tr=0 ts=6747136b cx=c_pps a=GbYsmhbcUJoGoLxTsnc7yA==:117 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=VlfZXiiP6vEA:10 a=bRTqI5nwn0kA:10 a=t7CeM3EgAAAA:8 a=v6gg5HFEU58PeVxLRGMA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: yWJ76NnLXVa_5sxep_snKnqEbvhQBzeg X-Proofpoint-ORIG-GUID: yWJ76NnLXVa_5sxep_snKnqEbvhQBzeg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-11-27_04,2024-11-27_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 mlxscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 phishscore=0 spamscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.21.0-2409260000 definitions=main-2411270102 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, 27 Nov 2024 12:41:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207927 From: Deepthi Hemraj YOCTO [#15061] Rust multilib sdks broken because of the conflicts between attempted installs of rust-cross-canadian for multilibs Multilibs trying to install cargo.sh and rust.sh in the same path which resulted in the issue The target dependent variables are retained on the rust-cross-canadian and others are moved to the nativesdk-cargo recipe. By appending ${RUST_TARGET_SYS} to environment script filenames, conflicts between architectures are resolved. Signed-off-by: Deepthi Hemraj --- meta/recipes-devtools/rust/rust-cross-canadian.inc | 6 ++---- meta/recipes-devtools/rust/rust_1.80.1.bb | 13 +++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc index 5de22ad2b0..6c27382b1a 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc @@ -54,18 +54,16 @@ do_install () { ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d mkdir "${ENV_SETUP_DIR}" - RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" + RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/${RUST_TARGET_SYS}_rust.sh" RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | sed 's/-/_/g'` SDKLOADER=${@bb.utils.contains('SDK_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'i686', 'ld-linux.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}${@bb.utils.contains('SDK_ARCH', 'ppc64le', 'ld64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'riscv64', 'ld-linux-riscv64-lp64d.so.1', '', d)} cat <<- EOF > "${RUST_ENV_SETUP_SH}" export CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT" - export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib" export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" mkdir -p "\$CARGO_HOME" - # Init the default target once, it might be otherwise user modified. - if [ ! -f "\$CARGO_HOME/config" ]; then + if ! grep -q '^\[target.${RUST_TARGET_SYS}]' "\$CARGO_HOME/config"; the touch "\$CARGO_HOME/config" echo 'target = "'${RUST_TARGET_SYS}'"' >> "\$CARGO_HOME/config" echo '# TARGET_SYS' >> "\$CARGO_HOME/config" diff --git a/meta/recipes-devtools/rust/rust_1.80.1.bb b/meta/recipes-devtools/rust/rust_1.80.1.bb index eae1f28bb8..544f2ac8a0 100644 --- a/meta/recipes-devtools/rust/rust_1.80.1.bb +++ b/meta/recipes-devtools/rust/rust_1.80.1.bb @@ -271,8 +271,21 @@ rust_do_install:class-nativesdk() { rm ${D}${libdir}/rustlib/uninstall.sh rm ${D}${libdir}/rustlib/install.log rm ${D}${libdir}/rustlib/manifest* + + ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d + mkdir "${ENV_SETUP_DIR}" + RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" + + cat <<- EOF > "${RUST_ENV_SETUP_SH}" + export RUST_TARGET_PATH="\$RUST_TARGET_PATH:\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib" + EOF + + chown -R root.root ${D} + } +FILES:${PN} += "${base_prefix}/environment-setup.d" + EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" rust_do_install:class-target() { export PSEUDO_UNLOAD=1