From: Robin Jarry <rjarry@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>,
Ben Magistro <koncept1@gmail.com>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH] build: pass cflags in subproject
Date: Fri, 8 Mar 2024 12:58:40 +0100 [thread overview]
Message-ID: <20240308115839.320793-2-rjarry@redhat.com> (raw)
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
next reply other threads:[~2024-03-08 11:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 11:58 Robin Jarry [this message]
2024-03-08 14:24 ` David Marchand
2024-03-15 11:47 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240308115839.320793-2-rjarry@redhat.com \
--to=rjarry@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=koncept1@gmail.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).