* [PATCH] build: fix invalid characters in toolchain definitions
@ 2023-02-07 15:22 Bruce Richardson
2023-02-08 15:33 ` Wiles, Keith
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bruce Richardson @ 2023-02-07 15:22 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, stable, Keith Wiles
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 <keith.wiles@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: fix invalid characters in toolchain definitions
2023-02-07 15:22 [PATCH] build: fix invalid characters in toolchain definitions Bruce Richardson
@ 2023-02-08 15:33 ` Wiles, Keith
2023-02-08 17:11 ` Bruce Richardson
2023-02-08 18:08 ` Tyler Retzlaff
2 siblings, 0 replies; 5+ messages in thread
From: Wiles, Keith @ 2023-02-08 15:33 UTC (permalink / raw)
To: Richardson, Bruce, dev; +Cc: stable
________________________________________
From: Richardson, Bruce <bruce.richardson@intel.com>
Sent: Tuesday, February 7, 2023 9:22 AM
To: dev@dpdk.org
Cc: Richardson, Bruce; stable@dpdk.org; Wiles, Keith
Subject: [PATCH] build: fix invalid characters in toolchain definitions
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 <keith.wiles@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
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
Acked-by: Keith Wiles <keith.wiles@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: fix invalid characters in toolchain definitions
2023-02-07 15:22 [PATCH] build: fix invalid characters in toolchain definitions Bruce Richardson
2023-02-08 15:33 ` Wiles, Keith
@ 2023-02-08 17:11 ` Bruce Richardson
2023-02-08 18:08 ` Tyler Retzlaff
2 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2023-02-08 17:11 UTC (permalink / raw)
To: dev; +Cc: stable, Keith Wiles
On Tue, Feb 07, 2023 at 03:22:00PM +0000, Bruce Richardson wrote:
> 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 <keith.wiles@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Resending Keith's ack, since patchwork doesn't seem to have picked it up
from Keith's email.
Acked-by: Keith Wiles <keith.wiles@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: fix invalid characters in toolchain definitions
2023-02-07 15:22 [PATCH] build: fix invalid characters in toolchain definitions Bruce Richardson
2023-02-08 15:33 ` Wiles, Keith
2023-02-08 17:11 ` Bruce Richardson
@ 2023-02-08 18:08 ` Tyler Retzlaff
2023-02-20 0:20 ` Thomas Monjalon
2 siblings, 1 reply; 5+ messages in thread
From: Tyler Retzlaff @ 2023-02-08 18:08 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, stable, Keith Wiles
On Tue, Feb 07, 2023 at 03:22:00PM +0000, Bruce Richardson wrote:
> 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 <keith.wiles@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: fix invalid characters in toolchain definitions
2023-02-08 18:08 ` Tyler Retzlaff
@ 2023-02-20 0:20 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2023-02-20 0:20 UTC (permalink / raw)
To: Bruce Richardson; +Cc: stable, Keith Wiles, Tyler Retzlaff, dev
08/02/2023 19:08, Tyler Retzlaff:
> On Tue, Feb 07, 2023 at 03:22:00PM +0000, Bruce Richardson wrote:
> > 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 <keith.wiles@intel.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-20 0:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 15:22 [PATCH] build: fix invalid characters in toolchain definitions Bruce Richardson
2023-02-08 15:33 ` Wiles, Keith
2023-02-08 17:11 ` Bruce Richardson
2023-02-08 18:08 ` Tyler Retzlaff
2023-02-20 0:20 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).