From 9a4aee9f8d58e3d267c1c09f82036126b6b8fa08 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Thu, 17 Oct 2019 16:42:39 -0400 Subject: [PATCH] Add support for KCFLAGS In preparation for some upcoming work, add support for passing KCFLAGS via a macro that's currently undefined. --- kernel.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel.spec b/kernel.spec index cceb77f1c..2d2fce6a4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1178,13 +1178,15 @@ BuildKernel() { Arch=`head -1 .config | cut -b 3-` echo USING ARCH=$Arch + KCFLAGS="%{?kcflags}" + make %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" ARCH=$Arch olddefconfig # This ensures build-ids are unique to allow parallel debuginfo perl -p -i -e "s/^CONFIG_BUILD_SALT.*/CONFIG_BUILD_SALT=\"%{KVERREL}\"/" .config - %{make} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" ARCH=$Arch %{?_smp_mflags} WITH_GCOV="%{with_gcov}" $MakeTarget %{?sparse_mflags} %{?kernel_mflags} + %{make} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" ARCH=$Arch %{?_smp_mflags} KCFLAGS="$KCFLAGS" WITH_GCOV="%{with_gcov}" $MakeTarget %{?sparse_mflags} %{?kernel_mflags} if [ $DoModules -eq 1 ]; then - %{make} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" ARCH=$Arch %{?_smp_mflags} WITH_GCOV="%{with_gcov}" modules %{?sparse_mflags} || exit 1 + %{make} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" ARCH=$Arch %{?_smp_mflags} KCFLAGS="$KCFLAGS" WITH_GCOV="%{with_gcov}" modules %{?sparse_mflags} || exit 1 fi mkdir -p $RPM_BUILD_ROOT/%{image_install_path}