diff --git a/coreboot-utils.changes b/coreboot-utils.changes index 200f193..c086f00 100644 --- a/coreboot-utils.changes +++ b/coreboot-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 16 12:00:39 UTC 2017 - alarrosa@suse.com + +- Add do-explicit-fallthrough.patch to fix a build failure with gcc7 + with an implicit fallthrough over switch cases (only on TW) +- Add -fPIC to no-pie.patch and remove -fno-pic to build with gcc7 + ------------------------------------------------------------------- Fri Mar 31 21:22:59 UTC 2017 - meissner@suse.com diff --git a/coreboot-utils.spec b/coreboot-utils.spec index 49a908b..caa257f 100644 --- a/coreboot-utils.spec +++ b/coreboot-utils.spec @@ -26,6 +26,7 @@ Release: 0 Source0: http://www.coreboot.org/releases/coreboot-%{version}.tar.xz Patch1: no-pie.patch Patch2: k8resdump.diff +Patch3: do-explicit-fallthrough.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ BuildRequires: pciutils-devel @@ -40,8 +41,13 @@ used to develop and configure systems with coreboot. %prep %setup -q -n coreboot-%{version} +%if 0%{?suse_version} > 1320 %patch1 -p1 +%endif %patch2 -p1 +%if 0%{?suse_version} > 1320 +%patch3 -p1 +%endif %build make %{?_smp_mflags} CFLAGS="%{optflags}" -C util/ectool diff --git a/do-explicit-fallthrough.patch b/do-explicit-fallthrough.patch new file mode 100644 index 0000000..af76b08 --- /dev/null +++ b/do-explicit-fallthrough.patch @@ -0,0 +1,13 @@ +Index: coreboot-4.5/util/cbfstool/lz4/lib/lz4frame.c +=================================================================== +--- coreboot-4.5.orig/util/cbfstool/lz4/lib/lz4frame.c ++++ coreboot-4.5/util/cbfstool/lz4/lib/lz4frame.c +@@ -1091,7 +1091,7 @@ size_t LZ4F_decompress(LZ4F_decompressio + dctxPtr->tmpInTarget = minFHSize; /* minimum to attempt decode */ + dctxPtr->dStage = dstage_storeHeader; + } +- ++ __attribute__ ((fallthrough)); + case dstage_storeHeader: + { + size_t sizeToCopy = dctxPtr->tmpInTarget - dctxPtr->tmpInSize; diff --git a/no-pie.patch b/no-pie.patch index 4c74197..0b26b23 100644 --- a/no-pie.patch +++ b/no-pie.patch @@ -8,8 +8,8 @@ Index: coreboot-4.5/util/msrtool/Makefile.in PREFIX = @PREFIX@ -CFLAGS = @CFLAGS@ -fno-pic -LDFLAGS = @LDFLAGS@ -+CFLAGS = @CFLAGS@ -fno-pic -fno-PIE -+LDFLAGS = @LDFLAGS@ -no-pie ++CFLAGS = @CFLAGS@ -fPIC -fno-PIE ++LDFLAGS = @LDFLAGS@ -fPIC -no-pie TARGETS = geodegx2.o geodelx.o cs5536.o k8.o intel_pentium3_early.o intel_pentium3.o intel_pentium4_early.o intel_pentium4_later.o intel_core1.o intel_core2_early.o intel_core2_later.o intel_nehalem.o intel_atom.o SYSTEMS = linux.o darwin.o freebsd.o