[Buildroot] [PATCH] package/expedite: fix build issue with C89

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Apr 22 12:42:36 UTC 2017


Hello,

On Fri, 21 Apr 2017 23:31:04 +0200, Romain Naour wrote:

> +# The code use for loop initial declarations which are only allowed in
> +# C99 mode. Use the default compiler version (gnu99) used by gcc 5+ to
> +# workaround some build issues with C99.
> +EXPEDITE_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu99"

What is the full command line used by expedite to build its C files?
Gcc 5.x uses -std=c11 by default, and C11 apparently accepts definition
of variables inside the initialization part of for() loops. So it seems
like expedite is overriding the default -std= GCC option with its
own...

Or maybe it's the configure.ac AC_PROG_CC that does this by default?
Anyway, it's worth checking and doing something upstreamable rather
than working around in the .mk file.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the buildroot mailing list