mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: Makefile.inc: Explicitly set GNU11 as C language standard
Different compiler versions use a different C language standard by
default.
GCC 4.9 uses GNU89 by default [1], while GCC 5.x uses GNU11 [2].
The discussion on the mailing list in thread *[RFC] Setting C99 by
default* [3] resulted in the preference of C11, which results in build
errors.
So explicitly set it to GNU11, which is also what the current coreboot
toolchain with GCC 5.3 is using.
[1] https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/C-Dialect-Options.html
[2] https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/Standards.html
[3] https://www.coreboot.org/pipermail/coreboot/2016-November/082541.html
BUG=none
BRANCH=none
TEST=none
Change-Id: I01226c6a9d0b20c70579b45754f898815abb803d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: acbb70b810
Original-Change-Id: If1569618f8044925ff72dcf3543480b34d4f90d6
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/17636
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-on: https://chromium-review.googlesource.com/430677
This commit is contained in:
parent
9b98443125
commit
d8a6280bc6
1 changed files with 1 additions and 1 deletions
|
@ -357,7 +357,7 @@ CPPFLAGS_common += -I$(VBOOT_SOURCE)/firmware/include
|
|||
CPPFLAGS_common += -include $(src)/include/kconfig.h
|
||||
CPPFLAGS_common += -I3rdparty
|
||||
|
||||
CFLAGS_common += -pipe -g -nostdinc
|
||||
CFLAGS_common += -pipe -g -nostdinc -std=gnu11
|
||||
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
|
||||
CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
|
||||
CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time
|
||||
|
|
Loading…
Add table
Reference in a new issue