* [Buildroot] [PATCH] package/expedite: fix build issue with C89
@ 2017-04-21 21:31 Romain Naour
2017-04-22 12:42 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Romain Naour @ 2017-04-21 21:31 UTC (permalink / raw)
To: buildroot
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
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
package/expedite/expedite.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/expedite/expedite.mk b/package/expedite/expedite.mk
index d49e87a..9aa6a4a 100644
--- a/package/expedite/expedite.mk
+++ b/package/expedite/expedite.mk
@@ -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 \
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/expedite: fix build issue with C89
2017-04-21 21:31 [Buildroot] [PATCH] package/expedite: fix build issue with C89 Romain Naour
@ 2017-04-22 12:42 ` Thomas Petazzoni
2017-04-29 10:41 ` Romain Naour
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2017-04-22 12:42 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/expedite: fix build issue with C89
2017-04-22 12:42 ` Thomas Petazzoni
@ 2017-04-29 10:41 ` Romain Naour
0 siblings, 0 replies; 3+ messages in thread
From: Romain Naour @ 2017-04-29 10:41 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Le 22/04/2017 ? 14:42, Thomas Petazzoni a ?crit :
> 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.
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
>
> Best regards,
>
> Thomas
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-29 10:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 21:31 [Buildroot] [PATCH] package/expedite: fix build issue with C89 Romain Naour
2017-04-22 12:42 ` Thomas Petazzoni
2017-04-29 10:41 ` Romain Naour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox