pinebookpro-uboot: fix build w/ gcc10

Add -fcommon to CFLAGS for host and target.
This commit is contained in:
Jürgen Buchmüller 2020-09-12 15:11:04 +02:00
parent 96273ffd2b
commit 3eb785b4b5
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- pbp-uboot/Makefileg 2020-09-12 15:05:30.139856893 +0200
+++ pbp-uboot/Makefile 2020-09-12 15:06:45.963853869 +0200
@@ -273,7 +273,7 @@
HOSTCC = cc
HOSTCXX = c++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fcommon \
$(if $(CONFIG_TOOLS_DEBUG),-g)
HOSTCXXFLAGS = -O2
@@ -413,7 +413,7 @@
KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
- -Wno-format-security \
+ -Wno-format-security -fcommon \
-fno-builtin -ffreestanding $(CSTD_FLAG)
KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing
KBUILD_AFLAGS := -D__ASSEMBLY__

View File

@ -31,6 +31,7 @@ do_configure() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
cd pbp-uboot
patch -Np1 -i ${FILESDIR}/fcommon-Makefile.patch
make ${makejobs} pinebook_pro-rk3399_defconfig
echo 'CONFIG_IDENT_STRING=" Voidlinux"' >> .config
}