From f7cb9988e7fda007b9183c5d63a01cc471302883 Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Wed, 16 May 2018 16:46:20 -0500 Subject: [PATCH] linux: fedora: fix build. Allow kernel builds in fedora 28. Ignore new warnings from gcc 8. Fixes: #30 Signed-off-by: Jose Carlos Venegas Munoz --- kernel/kata-linux-container.spec-template | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/kata-linux-container.spec-template b/kernel/kata-linux-container.spec-template index e1d3103318..a4cf8ba56b 100644 --- a/kernel/kata-linux-container.spec-template +++ b/kernel/kata-linux-container.spec-template @@ -77,6 +77,12 @@ BuildKernel() { make -s mrproper cp config .config + %if 0%{?fedora} + #Fedora uses gcc 8, build is failing due to warnings. + export CFLAGS="-Wno-error=restrict" + export EXTRA_CFLAGS="-Wno-format-truncation -Wno-cast-function-type -Wno-error=restrict -Wno-error" + %endif + make -s ARCH=$Arch oldconfig > /dev/null make -s CONFIG_DEBUG_SECTION_MISMATCH=y %{?_smp_mflags} ARCH=$Arch %{?sparse_mflags} || exit 1 }