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 <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz 2018-05-16 16:46:20 -05:00
parent 0cb0eb4dda
commit f7cb9988e7

View File

@ -77,6 +77,12 @@ BuildKernel() {
make -s mrproper make -s mrproper
cp config .config 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 ARCH=$Arch oldconfig > /dev/null
make -s CONFIG_DEBUG_SECTION_MISMATCH=y %{?_smp_mflags} ARCH=$Arch %{?sparse_mflags} || exit 1 make -s CONFIG_DEBUG_SECTION_MISMATCH=y %{?_smp_mflags} ARCH=$Arch %{?sparse_mflags} || exit 1
} }