diff options
author | Ting Liu <ting.liu@freescale.com> | 2015-07-28 19:15:51 +0800 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2015-07-29 10:48:21 -0300 |
commit | 1f4c127ea20ba8a967092235e65816b0f0a9bf71 (patch) | |
tree | 0ad0d2bcc2b1b7fec372b30ba7c53c3efb1ae6d3 | |
parent | 1149eaae3564abee2a18a8b3481135d7de80b78b (diff) | |
download | meta-freescale-1f4c127ea20ba8a967092235e65816b0f0a9bf71.tar.gz |
u-boot-qoriq: add -fgnu89-inline option for gcc5
Fix the below build issues:
CC drivers/crypto/fsl/sec.o
LD arch/powerpc/cpu/mpc8xxx/built-in.o
arch/powerpc/cpu/mpc8xxx/fdt.o: In function `ld_le16':
../arch/powerpc/include/asm/byteorder.h:12: multiple definition of `ld_le16'
The problem is the change of the default C standard from gnu89 to gnu11
which changes the semantics of 'inline'. The issue is described in the
Porting guide at https://gcc.gnu.org/gcc-5/porting_to.html. Adding the
'-fgnu89-inline' option fixes the issue.
Signed-off-by: Ting Liu <ting.liu@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r-- | recipes-bsp/u-boot/files/add-fgnu89-inline-option-for-gcc5.patch | 39 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/add-fgnu89-inline-option-for-gcc5.patch b/recipes-bsp/u-boot/files/add-fgnu89-inline-option-for-gcc5.patch new file mode 100644 index 00000000..cfe1c07a --- /dev/null +++ b/recipes-bsp/u-boot/files/add-fgnu89-inline-option-for-gcc5.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From 4d4fcfc41288134b48b72ac69702f68741d7631f Mon Sep 17 00:00:00 2001 | ||
4 | From: Ting Liu <ting.liu@freescale.com> | ||
5 | Date: Tue, 28 Jul 2015 16:29:26 +0800 | ||
6 | Subject: [PATCH] add -fgnu89-inline option for gcc5 | ||
7 | |||
8 | Fix the below build issues: | ||
9 | CC drivers/crypto/fsl/sec.o | ||
10 | LD arch/powerpc/cpu/mpc8xxx/built-in.o | ||
11 | arch/powerpc/cpu/mpc8xxx/fdt.o: In function `ld_le16': | ||
12 | ../arch/powerpc/include/asm/byteorder.h:12: multiple definition of `ld_le16' | ||
13 | |||
14 | The problem is the change of the default C standard from gnu89 to gnu11 | ||
15 | which changes the semantics of 'inline'. The issue is described in the | ||
16 | Porting guide at https://gcc.gnu.org/gcc-5/porting_to.html. Adding the | ||
17 | '-fgnu89-inline' option fixes the issue. | ||
18 | |||
19 | Signed-off-by: Ting Liu <ting.liu@freescale.com> | ||
20 | --- | ||
21 | Makefile | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/Makefile b/Makefile | ||
25 | index 9995e00..00497cc 100644 | ||
26 | --- a/Makefile | ||
27 | +++ b/Makefile | ||
28 | @@ -349,7 +349,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | ||
29 | |||
30 | KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__ | ||
31 | |||
32 | -KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ | ||
33 | +KBUILD_CFLAGS := -fgnu89-inline -Wall -Wstrict-prototypes \ | ||
34 | -Wno-format-security \ | ||
35 | -fno-builtin -ffreestanding | ||
36 | KBUILD_AFLAGS := -D__ASSEMBLY__ | ||
37 | -- | ||
38 | 1.9.2 | ||
39 | |||
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb index 9932a942..eebd979e 100644 --- a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb +++ b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb | |||
@@ -20,6 +20,7 @@ inherit deploy | |||
20 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \ | 20 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \ |
21 | file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch \ | 21 | file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch \ |
22 | file://gcc5.patch \ | 22 | file://gcc5.patch \ |
23 | file://add-fgnu89-inline-option-for-gcc5.patch \ | ||
23 | " | 24 | " |
24 | SRCREV = "6ba8eedbcdc4b063f59a63e6288b938af739e8ad" | 25 | SRCREV = "6ba8eedbcdc4b063f59a63e6288b938af739e8ad" |
25 | 26 | ||