summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2019-10-17 16:42:39 -0400
committerLaura Abbott <labbott@redhat.com>2019-10-22 08:43:37 -0400
commit9a4aee9f8d58e3d267c1c09f82036126b6b8fa08 (patch)
tree6953ba85cb9b9c1924e7cc983fc9fef2b161b029 /kernel.spec
parenta17ef5964dfa9932dc81c41f9642ccfa5a136d91 (diff)
downloadkernel-9a4aee9f8d58e3d267c1c09f82036126b6b8fa08.tar.gz
kernel-9a4aee9f8d58e3d267c1c09f82036126b6b8fa08.tar.xz
kernel-9a4aee9f8d58e3d267c1c09f82036126b6b8fa08.zip
Add support for KCFLAGS
In preparation for some upcoming work, add support for passing KCFLAGS via a macro that's currently undefined.
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec6
1 files 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}