DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] build: pass cflags in subproject
@ 2024-03-08 11:58 Robin Jarry
  2024-03-08 14:24 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Jarry @ 2024-03-08 11:58 UTC (permalink / raw)
  To: dev; +Cc: stable, Stephen Hemminger, Ben Magistro, Bruce Richardson

When DPDK is used as a subproject, include the required compile
arguments so that the parent project is also built with the appropriate
cflags (most importantly -march). Use the same cflags as pkg-config.

Fixes: f93a605f2d6e ("build: add definitions for use as Meson subproject")
Cc: stable@dpdk.org

Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
 buildtools/subproject/meson.build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/buildtools/subproject/meson.build b/buildtools/subproject/meson.build
index 322e01c02969..203c5d36c6e9 100644
--- a/buildtools/subproject/meson.build
+++ b/buildtools/subproject/meson.build
@@ -2,10 +2,15 @@
 # Copyright(c) 2022 Intel Corporation
 
 message('DPDK subproject linking: ' + get_option('default_library'))
+subproject_cflags = ['-include', 'rte_config.h'] + machine_args
+if is_freebsd
+    subproject_cflags += ['-D__BSD_VISIBLE']
+endif
 if get_option('default_library') == 'static'
     dpdk_dep = declare_dependency(
             version: meson.project_version(),
             dependencies: dpdk_static_lib_deps,
+            compile_args: subproject_cflags,
             # static library deps in DPDK build don't include "link_with" parameters,
             # so explicitly link-in both libs and drivers
             link_whole: dpdk_static_libraries + dpdk_drivers,
@@ -13,6 +18,7 @@ if get_option('default_library') == 'static'
 else
     dpdk_dep = declare_dependency(
             version: meson.project_version(),
+            compile_args: subproject_cflags,
             # shared library deps include all necessary linking parameters
             dependencies: dpdk_shared_lib_deps)
 endif
-- 
2.44.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] build: pass cflags in subproject
  2024-03-08 11:58 [PATCH] build: pass cflags in subproject Robin Jarry
@ 2024-03-08 14:24 ` David Marchand
  2024-03-15 11:47   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2024-03-08 14:24 UTC (permalink / raw)
  To: Robin Jarry
  Cc: dev, stable, Stephen Hemminger, Ben Magistro, Bruce Richardson

On Fri, Mar 8, 2024 at 12:59 PM Robin Jarry <rjarry@redhat.com> wrote:
>
> When DPDK is used as a subproject, include the required compile
> arguments so that the parent project is also built with the appropriate
> cflags (most importantly -march). Use the same cflags as pkg-config.
>
> Fixes: f93a605f2d6e ("build: add definitions for use as Meson subproject")
> Cc: stable@dpdk.org
>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] build: pass cflags in subproject
  2024-03-08 14:24 ` David Marchand
@ 2024-03-15 11:47   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2024-03-15 11:47 UTC (permalink / raw)
  To: Robin Jarry
  Cc: stable, dev, Stephen Hemminger, Ben Magistro, Bruce Richardson,
	David Marchand

08/03/2024 15:24, David Marchand:
> On Fri, Mar 8, 2024 at 12:59 PM Robin Jarry <rjarry@redhat.com> wrote:
> >
> > When DPDK is used as a subproject, include the required compile
> > arguments so that the parent project is also built with the appropriate
> > cflags (most importantly -march). Use the same cflags as pkg-config.
> >
> > Fixes: f93a605f2d6e ("build: add definitions for use as Meson subproject")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Robin Jarry <rjarry@redhat.com>
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-15 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 11:58 [PATCH] build: pass cflags in subproject Robin Jarry
2024-03-08 14:24 ` David Marchand
2024-03-15 11:47   ` 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).