From patchwork Sat Mar 29 18:08:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Hochstein X-Patchwork-Id: 60216 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 D963DC36014 for ; Sat, 29 Mar 2025 18:09:17 +0000 (UTC) Received: from MRWPR03CU001.outbound.protection.outlook.com (MRWPR03CU001.outbound.protection.outlook.com [40.107.130.3]) by mx.groups.io with SMTP id smtpd.web10.15946.1743271751020567932 for ; Sat, 29 Mar 2025 11:09:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@NXP1.onmicrosoft.com header.s=selector1-NXP1-onmicrosoft-com header.b=yAoV5iCd; spf=pass (domain: oss.nxp.com, ip: 40.107.130.3, mailfrom: tom.hochstein@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=egP8z7Y2tDhUVorvhI78cjukvCHUMRFq55zrWasTHw7ji0gSuPzNld+56I3LdyKOhilsGt9LdzNMoYWeC3gFlNw6HJnbgdVG+rPci42ENxxJ+RD2pdq882oY7yukf1m2mzddqEeoJCFsOd/PuK47uPO36el4Teq2HwqUCe2OCQNzdGyXw5lVa2NNMiZkOFDv08IYUpMnTjs4Rw38I3UyeB6hVoYD0OHwzED+yTDGAESq7wpZ7Gg3Rp6jSiu9hSN5CQlxOu5OQSdyGfSyUjpaYOgFzsX1yww4MvJXqBVVOkDK+TungAoT5+lLCUnFRIMcf0DY3p7KX66oMAzDsPnYPQ== 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=Mc9rrSXfPpMfcWVDxZpVzzUoF3Tgh0SR1tW89AfE1rE=; b=jxlspsJBttkQ8N+dhghT09v/7TtKQITct2iHofew4GS02cKJmWUa2ChGC/bBYEjz5XL/wo9/n/tUsWOAMaFY/p78J6r2Y5Y5Ks2HOEoyDimRsJuLN8/KJ9P/xVGFMt26WerNW759E7yu6t6eptvbEmL4llFjgMtyEvNEQggqckPeg4LJ1ctS0xObB5rZ5KcvW5uyGkN8BKJsgHpqOOfYKdKvKzQkW05XsvjIYkbf4PY1bOtb2a6O9r74IJjN41F0xRm3gWrWX3VVBTcgi76bcpqlfX6qNpbqyHnhqq4lQOvWniieD7Batvt92n8EQbDB6cRiDCAFUFjM/iVL0sDQYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mc9rrSXfPpMfcWVDxZpVzzUoF3Tgh0SR1tW89AfE1rE=; b=yAoV5iCdqo+MXYSpuRBRzMtzg4wYwD3JAzZjzvqDW4uu3V5zxGVccAwTChSj8F6Eu9sM6Plxd9fEXNsf2Fuhq9YMLHcmN5SridzPShqopOuzuPRWy87HLu7+J1sWaDw23LrlvmPVwBdBin38DMaXrZbZO4f1kjryZbulur17bXA1ZfH9FGZeS/G3PNXAAVmpKn09kHtsOrooMYa2O1DaSDFRd/HcTLU27aiZ0tq0MwHnRtPRCRUyrb4azBJJVB6H4mxAL8M+zGLK4GOjuuRce9zslmvNOHg8z0l7v3Cx5pBHw7u4nSRqR4ZvNjgwlEZEauoC3TaGAGI7weqqJvgpVQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) by DU0PR04MB9394.eurprd04.prod.outlook.com (2603:10a6:10:359::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Sat, 29 Mar 2025 18:09:07 +0000 Received: from PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::51ae:5f12:9744:1abc]) by PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::51ae:5f12:9744:1abc%4]) with mapi id 15.20.8534.048; Sat, 29 Mar 2025 18:09:07 +0000 From: Tom Hochstein To: openembedded-core@lists.openembedded.org CC: Tom Hochstein Subject: [PATCH v3 1/4] toolchain-scripts: Export meson settings for SDK builds Date: Sat, 29 Mar 2025 13:08:50 -0500 Message-ID: <20250329180853.1057381-1-tom.hochstein@oss.nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SJ0PR03CA0131.namprd03.prod.outlook.com (2603:10b6:a03:33c::16) To PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9448:EE_|DU0PR04MB9394:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f453473-2ea5-4d3a-588e-08dd6eeccbe9 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: IL36hY70yrcfdif6vk9oI1h5uZECXmnRx1toKtA12jZBYG/dGSLNzEaZw+kCX1C3YMzpq1lTRuZRynDq4jN8QuX/4Q6B2AJWUDhSs5fUO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ozn+6xDQa1PjQs9wxTmzNxSoQYu9E4z6lAQYOC7fMa4IL5lND/6ApD0djwlVsMgtTwaNUKCCfUHrYnAre2dXXZLGf+pPaZGNpgaqP7m++qkNIP+I4WJovWVqWjPc1g0Cfmfbfla+Enx3m7AA2MUk4yS8yfp7aXYvtoKk/WimMhQ7dg8vZsIUzG256/rLrKCLPqkCIvfFQLXHfd5W08HeMOL43hiYzuYIixTLT4qjcakyjUe7toWcw6jEpf2s/g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9448.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: f6QJcoRgZIRne+2vPS8mBy+3ADxdFqPNVNfC6W0lK8NKqLsHqCZUdcifR4TuQSHbBVxN73HGh7J3XNscQbTabqWXG22BVU6nCnydltok1kPEo1xG6T8WKY7v4G523c/YPbn1fw2QbH8qpp150Hglt6mJD5Ckm5Cf67GbPRFF7f0+H7vZQHu4ZG9xb58QpC07v93gk0r2doikeKW9yqjcLD5Vhi0qPfW30LOznK2iFRiNtt+SVuwQvluuOiO6mR2DlMLf5V0LrhX6WT2JLnauE8m/G6Zfapc+nUysp2GiTGtkA7xihSy8lw65ogBauWOb+8fMFpFQ67l6dVZCsETnelxO4ep4T+5d2Hy00tJFXHw8E/G4EnFjIoBeZtFB5GDRhcATK0DcPupwUreyLyKBFS3un8cpQIV6CchI2DuFuTj7LUivMCYfqiqWaVMG5UJaFOMp50bulsFU34g33b86hnKppU4dwxLFrhZu4k4VJvCJkKXUaP5fCxbuz/uCGoceHRxZzdyAyVDM6YmzeeZ7NXM+WIowX8NqEOOl/R3cr0qCCNsyA2n46d/Xzd3WM16sI9DWE6zoJn9T3Am7xl8PYAfe6fy/areOM7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be9 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2025 18:09:07.0750 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UcNXVglatowrBY0JsZ/W28KtIzQyK3jTw43C+dX6m0+RgVG3xYgurv6u6NbtOIq/lslGj6J/eoqQTeKyddp4sw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9394 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 ; Sat, 29 Mar 2025 18:09:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/213889 Create a new set of exports for the Meson `host_machine` cross settings. This allows the target cross file to be created correctly from meson.cross.template and aligns with meson.bbclass. Note, one might think that HOST_OS and HOST_ARCH would be appropriate as inputs here, aligning nicely with the Meson naming. That turns out to be incorrect since the script is generated in a nativesdk build with HOST_OS and HOST_ARCH set for the "build machine", not the "host machine", using the Meson terminology. See https://mesonbuild.com/Cross-compilation.html. Signed-off-by: Tom Hochstein --- meta/classes-recipe/toolchain-scripts.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass index b59a295abc..e54685e965 100644 --- a/meta/classes-recipe/toolchain-scripts.bbclass +++ b/meta/classes-recipe/toolchain-scripts.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -inherit toolchain-scripts-base siteinfo kernel-arch +inherit toolchain-scripts-base siteinfo kernel-arch meson-routines # We want to be able to change the value of MULTIMACH_TARGET_SYS, because it # doesn't always match our expectations... but we default to the stock value @@ -72,6 +72,10 @@ toolchain_create_sdk_env_script () { echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script echo 'export OECORE_TARGET_BITS="${@siteinfo_with_prefix(d, 'bit-')}"' >>$script echo 'export OECORE_TARGET_ENDIAN="${@siteinfo_with_prefix(d, 'endian-')}"' >>$script + echo 'export OECORE_MESON_HOST_SYSTEM="${@meson_operating_system('TARGET_OS', d)}"' >>$script + echo 'export OECORE_MESON_HOST_CPU_FAMILY="${@meson_cpu_family('TARGET_ARCH', d)}"' >>$script + echo 'export OECORE_MESON_HOST_CPU="${TARGET_ARCH}"' >>$script + echo 'export OECORE_MESON_HOST_ENDIAN="${@meson_endian('TARGET', d)}"' >>$script echo 'unset command_not_found_handle' >> $script