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 3AB7F41C30 for ; Tue, 7 Feb 2023 16:22:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3103B42D3F; Tue, 7 Feb 2023 16:22:23 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 87B81410D1; Tue, 7 Feb 2023 16:22:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675783338; x=1707319338; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/jjotMnDrxh1fYgBqZFwIVTHYSBy/xhR44t14RCMYoM=; b=eBqXiRJmrIDzeFiL9DBkJnCwZCG/ccBi4Ap6z+dmG9fQU2qaq+2Bifc6 BkiyRUxDhCHXJqrtz1/cFfRqzIGu4Nt4FGtgkc3bNrUUyy8RohGVWsVFS Ae4ndPBVObegzFWi4VAnulVEZiIAVXVnffBf/zz2LFnXnHORn20NDM+A/ Q391ai4vNai/hX+7IAnf/g6HQ+8Jh96HRnYNjrmfOC/TsBQ9qyksDclCp r0Jpfmp8PL8Pw4zzTrJQHdTaEJ3Y24BszsG1+TjPx8YnG0sAYA4aH9rQ8 Cgbz2xFInEzMe6PQd5Wq5btyyHBKrpjbPWBESYBdcfMaPj6J7KxHgSNvK A==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="330824673" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="330824673" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2023 07:22:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="840794274" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="840794274" Received: from silpixa00401385.ir.intel.com ([10.237.214.21]) by orsmga005.jf.intel.com with ESMTP; 07 Feb 2023 07:22:12 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Keith Wiles Subject: [PATCH] build: fix invalid characters in toolchain definitions Date: Tue, 7 Feb 2023 15:22:00 +0000 Message-Id: <20230207152200.122227-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org When using "icx" (Intel(R) oneAPI DPC++/C++ Compiler) to build DPDK, meson reports the toolchain as "intel-llvm"[1]. This value is used directly to define the RTE_TOOLCHAIN macros, which means that we end up with the invalid macro name "RTE_TOOLCHAIN_INTEL-LLVM", and getting the compiler warning: ./rte_build_config.h:422:28: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions] This can be fixed, and the macro generation made more robust generally, by adding "underscorify()" on the string. This replaces the "-", and any other invalid characters, with "_" [2]. [1] https://mesonbuild.com/Reference-tables.html#compiler-ids [2] https://mesonbuild.com/Reference-manual_elementary_str.html#strunderscorify Fixes: afd18fa21b5e ("build: set toolchain info during meson configure") Cc: stable@dpdk.org Reported-by: Keith Wiles Signed-off-by: Bruce Richardson --- config/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 26f3168bc9..fc3ac99a32 100644 --- a/config/meson.build +++ b/config/meson.build @@ -139,7 +139,7 @@ endif toolchain = cc.get_id() dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) -dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1) +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) -- 2.37.2