DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, david.marchand@redhat.com,
	mb@smartsharesystems.com, roretzla@linux.microsoft.com,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [RFC PATCH 1/1] build: increase minimum C standard for DPDK builds
Date: Thu, 12 Jan 2023 11:35:56 +0000	[thread overview]
Message-ID: <20230112113556.47485-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20230112113556.47485-1-bruce.richardson@intel.com>

Set the default C language standard to be used for DPDK builds to C99.
This requires no actual code changes to build successfully.

To ensure compatibility is kept for external apps using DPDK headers, we
explicitly set the build parameters for the chkincs binary to the old
minimum standard of "gnu89". [NOTE: DPDK code does not compile and has
previously not compiled for pure c89 standard, so that stricter
requirement need not be checked.] By adding this additional check, we
can separately manage C standards used internally in DPDK builds and
that required in the build flags for external apps using DPDK.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/chkincs/meson.build | 1 +
 meson.build                    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build
index 378c2f19ef..322ac775ce 100644
--- a/buildtools/chkincs/meson.build
+++ b/buildtools/chkincs/meson.build
@@ -30,6 +30,7 @@ executable('chkincs', sources,
         c_args: cflags,
         include_directories: includes,
         dependencies: deps,
+        override_options: 'c_std=gnu89',
         install: false)
 
 # run tests for c++ builds also
diff --git a/meson.build b/meson.build
index f91d652bc5..9a2963cc16 100644
--- a/meson.build
+++ b/meson.build
@@ -9,6 +9,7 @@ project('DPDK', 'C',
         license: 'BSD',
         default_options: [
             'buildtype=release',
+            'c_std=c99',
             'default_library=static',
             'warning_level=2',
         ],
-- 
2.37.2


  reply	other threads:[~2023-01-12 11:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 11:35 [RFC PATCH 0/1] Specify C-standard requirement " Bruce Richardson
2023-01-12 11:35 ` Bruce Richardson [this message]
2023-01-12 12:42   ` [RFC PATCH 1/1] build: increase minimum C standard " Morten Brørup
2023-01-12 12:47     ` Bruce Richardson
2023-01-12 15:06       ` Morten Brørup
2023-01-12 17:04   ` Tyler Retzlaff
2023-02-03 14:09 ` [RFC PATCH 0/1] Specify C-standard requirement " Ben Magistro
2023-02-03 15:09   ` Bruce Richardson
2023-02-03 16:45     ` Ben Magistro
2023-02-03 18:00       ` Bruce Richardson
2023-02-10 14:52         ` Ben Magistro
2023-02-10 23:39           ` Tyler Retzlaff
2023-02-22 18:53 ` Tyler Retzlaff
2023-02-23  9:44   ` Bruce Richardson

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=20230112113556.47485-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=thomas@monjalon.net \
    /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).