From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v2] build: remove obsolete compiler checks
Date: Tue, 19 Aug 2025 12:10:25 +0100 [thread overview]
Message-ID: <aKRboWGOkmZpp7zV@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8xObjjfq5zFce_kT_ZhsPhiXzixXEdT+G-Mi8OV77sssw@mail.gmail.com>
On Tue, Aug 19, 2025 at 10:10:21AM +0200, David Marchand wrote:
> Hello Bruce,
>
> On Fri, Jul 25, 2025 at 6:07 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
> > index d3caa3a3b4..a9ff87e863 100644
> > --- a/drivers/net/virtio/meson.build
> > +++ b/drivers/net/virtio/meson.build
> > @@ -31,7 +31,7 @@ if arch_subdir == 'x86'
> > sources_avx512 += files('virtio_rxtx_packed.c')
> > if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
> > cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA'
> > - elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
> > + elif (toolchain == 'clang')
> > cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA'
> > endif
> > endif
>
> [snip]
>
> > diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
> > index 9c6325aa0e..a74d0cff7c 100644
> > --- a/lib/vhost/meson.build
> > +++ b/lib/vhost/meson.build
> > @@ -8,9 +8,9 @@ endif
> > if has_libnuma
> > dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
> > endif
> > -if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
> > +if (toolchain == 'gcc')
> > cflags += '-DVHOST_GCC_UNROLL_PRAGMA'
> > -elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))
> > +elif (toolchain == 'clang')
> > cflags += '-DVHOST_CLANG_UNROLL_PRAGMA'
> > endif
> > dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY', cc.has_header('linux/userfaultfd.h'))
>
> Sorry, I did not notice in the v1, but lib/vhost and
> drivers/net/virtio have the same construct, yet only lib/vhost gets
> updated on the gcc version check in this patch.
> Is this intentional?
>
> Since GCC 8.0+ is recommended, I would keep the version check in both
> vhost and net/virtio.
>
Checking quickly with Godbolt, the pragma seems to be recognised by GCC 8.1
in the same way as with GCC 8.3. Therefore removing the version check looks
the correct option to me.
However, a better cleanup is to remove these defines from the meson.build
file completely, and instead just check for GCC and clang directly in the
header file.
/Bruce
next prev parent reply other threads:[~2025-08-19 11:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 12:14 [PATCH] " Bruce Richardson
2025-07-18 12:21 ` David Marchand
2025-07-18 12:34 ` Bruce Richardson
2025-07-18 12:45 ` David Marchand
2025-07-18 13:05 ` Bruce Richardson
2025-07-18 13:36 ` David Marchand
2025-07-25 16:06 ` [PATCH v2] " Bruce Richardson
2025-07-28 18:18 ` Stephen Hemminger
2025-08-19 8:10 ` David Marchand
2025-08-19 9:04 ` Bruce Richardson
2025-08-19 11:10 ` Bruce Richardson [this message]
2025-08-19 11:25 ` [PATCH v3 1/2] " Bruce Richardson
2025-08-19 11:25 ` [PATCH v3 2/2] virtio: simplify use of pragmas 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=aKRboWGOkmZpp7zV@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.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).