[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230523105410.wuoaft3kuw7lv7x5@lion.mk-sys.cz>
Date: Tue, 23 May 2023 12:54:10 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc: netdev@...r.kernel.org,
Sudheer Mogilappagari <sudheer.mogilappagari@...el.com>
Subject: Re: [PATCH ethtool v2, 1/1] netlink/rss: move variable declaration
out of the for loop
On Tue, May 23, 2023 at 09:28:19AM +0200, Dario Binacchi wrote:
> On Tue, May 23, 2023 at 7:06 AM Michal Kubecek <mkubecek@...e.cz> wrote:
> > Anyway, with kernel explicitly declaring C11 as the standard to use
> > since 5.18, it would IMHO make more sense to do the same in ethtool so
> > that developers do not need to keep in mind that they cannot use
> > language features they are used to from kernel. What do you think?
>
> I agree with you.
> Anyway, to fix this issue
> https://patchwork.ozlabs.org/project/buildroot/patch/20230520211246.3950131-1-dario.binacchi@amarulasolutions.com/
> can I send patch updating configure.ac as suggested by Yann E. Morin ?
>
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,6 +12,10 @@ AC_PROG_CC
> AC_PROG_GCC_TRADITIONAL
> AM_PROG_CC_C_O
> PKG_PROG_PKG_CONFIG
> +AC_PROG_CC_C99
> +AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
> + AC_MSG_ERROR([no C99 compiler found, $PACKAGE requires a C99 compiler.])
> +])
I like this approach much more than the previous patch. But how about
using C11 instead? My point is that kernel is already using -std=c11
(or, more precisely, -std=gnu11) for build for about a year and we
can expect significant overlap between kernel and ethtool developers.
Therefore choosing C99 would inevitably result in similar issues in the
future (people using features they are used to from kernel and breaking
the build on older systems not having C11 as default).
As far as I can see, GCC should support -std=c11 since version 4.7, that
does not seem to be too restricting dependency to me.
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists