]> code.ossystems Code Review - openembedded-core.git/commitdiff
u-boot: fix extern inline build errors for gcc 5
authorKevin Hao <kexin.hao@windriver.com>
Fri, 31 Jul 2015 05:21:25 +0000 (13:21 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 9 Aug 2015 23:37:09 +0000 (16:37 -0700)
The gcc 5 change its default standard from gnu89 to gnu11. These two
standards do have different semantics for inline functions. And the
gcc 5 will emit the following errors on the "extern inline" functions:
    arch/powerpc/cpu/mpc8xxx/fsl_lbc.o: In function `ld_le16':
    ./arch/powerpc/include/asm/byteorder.h:12: multiple definition of `ld_le16'
    arch/powerpc/cpu/mpc8xxx/fdt.o:./arch/powerpc/include/asm/byteorder.h:12: first defined here

Fix these build errors by using "-fgnu89-inline" to enforce the gnu89
inline semantics as suggested in [1].

[1] https://gcc.gnu.org/gcc-5/porting_to.html

(From OE-Core rev: a1c83bb5556837d31d934b9af130cdbac19d5e97)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
meta/recipes-bsp/u-boot/u-boot_2015.01.bb

index 6feac3107d68326ecf1e6392f0d1e83291443a71..3a21224edda042be75eddff7914d48f1ebc47ad1 100644 (file)
@@ -7,3 +7,5 @@ DEPENDS += "dtc-native"
 SRCREV = "92fa7f53f1f3f03296f8ffb14bdf1baefab83368"
 
 PV = "v2015.01+git${SRCPV}"
+
+EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline"