package/expedite: fix build issue with C89
PATCH 1/1 package/expedite: fix build issue with C89
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.
Fixes:
http://autobuild.buildroot.net/results/ed8/ed840755e8e486e48eab8c13a8bb5e9a448199ce
--- package/expedite/expedite.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/expedite/expedite.mk +5 -0
@@ -15,6 +15,11 @@ EXPEDITE_DEPENDENCIES = host-efl host-pkgconf efl # There is no configure script in the git tree. EXPEDITE_AUTORECONF = YES +# 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" + ifeq ($(BR2_PACKAGE_EFL_X_XLIB),y) EXPEDITE_CONF_OPTS += --with-x=$(STAGING_DIR) \ --x-includes=$(STAGING_DIR)/usr/include \
Signature · 1 line
2.9.3
PATCH 1/1 package/expedite: fix build issue with C89
Hello,
package/expedite/expedite.mk EXPEDITE_DEPENDENCIES = host-efl host-pkgconf efl · line 21
Quoted 4 lines · Romain Naour
package/expedite/expedite.mk +4
-0+# 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 package/expedite: fix build issue with C89
Hi Thomas,
Le 22/04/2017 ? 14:42, Thomas Petazzoni a ?crit :
Quoted 15 lines
Hello,
package/expedite/expedite.mk EXPEDITE_DEPENDENCIES = host-efl host-pkgconf efl · line 21
Quoted 4 lines · Romain Naour
package/expedite/expedite.mk +4
-0+# 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...
Quoted 3 lines
Or maybe it's the configure.ac
AC_PROG_CCthat does this by default? Anyway, it's worth checking and doing something upstreamable rather than working around in the .mk file.
The build system doesn't override the default C language version, it just use the one used by default by the compiler.
The definition of variables inside the initialization part of for() loops was added by the latest commit without adding c99 or gnu99 in the cflags.
I used a gcc5 based toolchain while I tested this version of expedite, that's why I didn't had any issue.
Another easy solution is to not use definition of variables inside the initialization part of for() loops.
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas