From 3eb785b4b5fcc609fea062d57a2f639dbb32f0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 12 Sep 2020 15:11:04 +0200 Subject: [PATCH] pinebookpro-uboot: fix build w/ gcc10 Add -fcommon to CFLAGS for host and target. --- .../files/fcommon-Makefile.patch | 20 +++++++++++++++++++ srcpkgs/pinebookpro-uboot/template | 1 + 2 files changed, 21 insertions(+) create mode 100644 srcpkgs/pinebookpro-uboot/files/fcommon-Makefile.patch diff --git a/srcpkgs/pinebookpro-uboot/files/fcommon-Makefile.patch b/srcpkgs/pinebookpro-uboot/files/fcommon-Makefile.patch new file mode 100644 index 00000000000..d303e90352a --- /dev/null +++ b/srcpkgs/pinebookpro-uboot/files/fcommon-Makefile.patch @@ -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__ diff --git a/srcpkgs/pinebookpro-uboot/template b/srcpkgs/pinebookpro-uboot/template index 7df07bb9a71..4aff7de9e65 100644 --- a/srcpkgs/pinebookpro-uboot/template +++ b/srcpkgs/pinebookpro-uboot/template @@ -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 }