From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D848C43864; Mon, 8 Jan 2024 12:19:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 662B640263; Mon, 8 Jan 2024 12:19:01 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id DD51740261 for ; Mon, 8 Jan 2024 12:18:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704712740; x=1736248740; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=HFjY7ap3C0yuV0KEIgjELfU4fLK0aR3ALk3WVHfmQaM=; b=lRrBRqpcIYhXwO60RMfY3qwi/qH9LSrYt1ywtoT9RxgHSVklvTxnqUAh Rt7BiXarVdQ0ZhTv1TDrK1/+RP00Xi4G8O4HmvcDtqaF9wIcwNL3J4Uqk J7YNw7PjLmUP/go6Up9SNn2gPMRB2q/P9RVJ/BREbfdZbGJ/oLoWZlOEJ tuBFRbppYGyJVl/pp/YNH1HKXp0XfxwRXJNEoVoPOjL7z6laDHdFoTbLG q+QWAnAG/I4JiLXlwJNH4q2NT1MhAbDRzEuvHL6a56Im2dQRCsXgszKXT OJGjwcKlKWPWa6uJws8pp2oQLt1JnqrNbS8cMf1wAcmwyO42BfaIyBVPt g==; X-IronPort-AV: E=McAfee;i="6600,9927,10946"; a="396734732" X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="396734732" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2024 03:18:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="15891302" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 Jan 2024 03:18:58 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 8 Jan 2024 03:18:57 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 8 Jan 2024 03:18:57 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 8 Jan 2024 03:18:57 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 8 Jan 2024 03:18:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VL5VybRyBenDsiUN+uKWJur33NlPesJfhJAm2IPQy0t0ORvFYE/WtRc7R7pfTTJpV8EJrYin8mh38E2Tok8Jwmcl1uLyo6CpPbUyAKXM2y9bWEzpbysMeaPG62qm42yDyViRcIniOmQ72xsnmrlhAUXTbyL8qajXh3Cwib75AfGSnnEwy0Ib+g3d/BLplG+zHHB0i/Wf1hLEW6WCj8rzRKnzeWo5C1JRKaMHb5bC+o5DiRWhdkASYPu1NV2PiMvedZqyVxIayFijcYH+AIahCgFRS4gIGwo67990wZtnF79JmRZpe9Dz/y1F+sf5bJIEYRONLLytxlmaFXFeWTlxMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=SmSZulbWtGx/NDctPOY0yuvceHRd47c8HsZyrN0r3cY=; b=OeJaJW8/FlIPceweq2AMY5D7DBt0DNmLGusEp+FjizIaJmaVEvqGL7wlvdJQHPoVdFCsSrDkOYCIyHCJhaCexehhcxv8rzCEJ9nku4FDcS+9Y8/+mGwkzN9GLa+GFMFzNnMJaAMDCoKRmB04s/9SumS/sxfuZsMpd4ZHQd1EjBzJJU48Bd0Jmfb1hCOv2RgciHFc5fD89/1BcHfh8bqssRXdCvlmNFpB3TZq9OPLP0PE1cHwmDBexZoMnjYxx+Yvo+0QIrtjE8UZf0f5W/SBJReSQnleqZJzeBZ45uea8QyiPbqa13pGe7CFYmXn/+IXb0G1+p+ueFcCMil2iERiRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by IA0PR11MB7332.namprd11.prod.outlook.com (2603:10b6:208:434::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Mon, 8 Jan 2024 11:18:55 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49%7]) with mapi id 15.20.7159.020; Mon, 8 Jan 2024 11:18:55 +0000 Date: Mon, 8 Jan 2024 11:18:50 +0000 From: Bruce Richardson To: Tyler Retzlaff CC: Subject: Re: [PATCH v2] build: set rte toolchain macros from predefined macros Message-ID: References: <1704238041-25304-1-git-send-email-roretzla@linux.microsoft.com> <1704240675-3964-1-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1704240675-3964-1-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: DB9PR05CA0014.eurprd05.prod.outlook.com (2603:10a6:10:1da::19) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA0PR11MB7332:EE_ X-MS-Office365-Filtering-Correlation-Id: d8f3b45a-f145-491a-a3cb-08dc103b9a1d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yy6tdcKAvkE2skhkP1wCPUiRa0F43qAuJnWwjINauX4BMF4QDDnQRiJlSYRLr/OcEVBFFbAE+ymWPtF1H5C8l/P3p5xDhluJgQgfx0c7RNqkwbwt+dXvcRCvxD7GWFFL006WnvVnbOvlaUVwgeHoGSv8KffIiav55Et/O78XrmjoeKf+XLFlvO4mcO1wvzLdHzxiWc4FoJiGDSl2BLm8AOffcC4Hfu7sOc3aqHGElCqrpUTYqz/usAIZXvFFguMR70W323CeXcJKAmBMrjy6tsOaaWcU3Aqe7u1OK8hKoMas/5dIlZJRAMyvXX0VDTJg85hrC1eXgky4POyd8dItIR+3yKp9sZo2XwtMDJI1+p/5NQJAlZGTsdIkROBqbA2+bHZTmUfw+yhVSpSLXmW41Zn4NaxTNwzEtYFA/v9hjW3rtG0VPmWjZnX6rSHiGif4WCn9UygyZu84gJ8O02v9adc7Y5Do+kB83Phb/QfFSRXi87ctvAbzv1H7IcjfrkDI556KAkhCb0yBCUzCnlvXuoaJfm9zG2AiVtxohpGG3AdK+hOOT97SmzKo12bXVjuPMI4wpFC3ienxCIbIJebH+0aG0CxLxB1vuG8fInU1lik= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(346002)(396003)(39860400002)(376002)(136003)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(2906002)(38100700002)(5660300002)(82960400001)(86362001)(41300700001)(316002)(8676002)(8936002)(6512007)(6486002)(66556008)(66946007)(66476007)(6916009)(26005)(478600001)(6506007)(83380400001)(6666004)(4326008)(44832011)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?l5PJiUfEF1hZ7t6sL0bWIHbdlaYIDsgYUJ82cSJ7n8DTOfu5aYx2YlRi5Etu?= =?us-ascii?Q?XlaXSNR520rj7PkAOGaBTGLBFWovvm0MbRYMgUm+Ehm/V3CGMFUQ9FtyBfh0?= =?us-ascii?Q?HA1qaxm5/wtbFWtEQIdgVc3E61GdQSiufEaZJs3nyWF+7fgZenjhBWhtiyv7?= =?us-ascii?Q?0BJFmsfgX+X76EWg348Nc41O3Ik9Iwzaj+z6dDfZzJCQi+BIUyDGBtzj0eTH?= =?us-ascii?Q?ZKN5393jGSVs8oa6kW/YZzX9CmuvIXxeNrmFVynqT5NPYuS+pxpj7FkxNYky?= =?us-ascii?Q?dX/rwKNEDgbHkARoaZitYZPsjZ9xZOtOkdvwoiXTLm4GpEt+ja09h942DAea?= =?us-ascii?Q?RF6afGLJqZYwkUk+y94yUITxQ10PspsSSjH53J9NOZMtzsDF/Jm2/B3rmSym?= =?us-ascii?Q?h8ufii5aDTubOdjr587EDMX+wf+iFrgieAxIf1pFdQvC9fTtLdz90roOBExl?= =?us-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8dbj4XM5my9bJ?= =?us-ascii?Q?uZPj1pocf9T7AxL3nVEDKDK84+EgZoGROPg9Ewz/U3g6CxsT6D8J/K+KHx7t?= =?us-ascii?Q?iRcWr/gsxbZ5QOn+mRLzfLdb94gZejoeev6odf7G3yb1w+/DSL+z5ECh+HZ4?= =?us-ascii?Q?1VnfAoJaWrudt9LjU+o7/m3ZXRcS/mSn23xeZq/NAGvYGqRMgEIWPX15rPwR?= =?us-ascii?Q?nsADvls3yPmQF6PzI5UyFwsn7a5MBffVVOeOflPRA9ny3IN38qHpKXQp+yE1?= =?us-ascii?Q?ug=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d8f3b45a-f145-491a-a3cb-08dc103b9a1d X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2024 11:18:55.6777 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7PcqgRVh1kxcGbJPNVGWVk3l8lEd5BGU1mzOnRKlShCY9yGDlQO/VvyhWVc2T1BVuUL2JbExrcXWyvty6ucvEPe/vTxniR2b0T1BAsyDhEA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7332 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jan 02, 2024 at 04:11:15PM -0800, Tyler Retzlaff wrote: > Stop writing RTE_TOOLCHAIN_XXX macros to rte_build_config.h. When an > application builds it doesn't necessarily use the same toolchain that > DPDK was built with. > > Instead evaluate toolchain predefined macros and define > RTE_TOOLCHAIN_XXX macros as appropriate each time rte_config.h is > preprocessed. > > Signed-off-by: Tyler Retzlaff I don't see an issue with doing this. Acked-by: Bruce Richardson > --- > > v2: > * use defined(macro) to correctly test for predefined macros > > config/meson.build | 2 -- > config/rte_config.h | 11 +++++++++++ > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index a9ccd56..0c3550e 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -180,8 +180,6 @@ if not is_ms_compiler > endif > > toolchain = cc.get_id() > -dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) > -dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper().underscorify(), 1) > > dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8) > dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4) > diff --git a/config/rte_config.h b/config/rte_config.h > index da265d7..d743a5c 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -14,6 +14,17 @@ > > #include > > +#if defined(__clang__) > +#define RTE_TOOLCHAIN "clang" > +#define RTE_TOOLCHAIN_CLANG 1 > +#elif defined(__GNUC__) > +#define RTE_TOOLCHAIN "gcc" > +#define RTE_TOOLCHAIN_GCC 1 > +#elif defined(_MSC_VER) > +#define RTE_TOOLCHAIN "msvc" > +#define RTE_TOOLCHAIN_MSVC 1 > +#endif > + > /* legacy defines */ > #ifdef RTE_EXEC_ENV_LINUX > #define RTE_EXEC_ENV_LINUXAPP 1 > -- > 1.8.3.1 >