From: Jan Stancek <jstancek(a)redhat.com>
redhat: allow dbgonly cross builds
with_dbgonly currently disables cross builds, which leads to errors
for cross compiled debug builds since target CFLAGS are passed to make
building host progs:
+ /usr/bin/make <snip> -mcpu=power9 -mtune=power9 ARCH=powerpc olddefconfig
cc1: error: bad value ‘power9’ for ‘-mtune=’ switch
cc1: note: valid arguments to ‘-mtune=’ switch are: <snip>
make[1]: *** [scripts/Makefile.host:110: scripts/basic/fixdep] Error 1
make: *** [Makefile:640: scripts_basic] Error 2
There's no reason why -debug variants shouldn't be cross-compiled,
so don't (re)define with_cross for dbgonly builds.
Signed-off-by: Jan Stancek <jstancek(a)redhat.com>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -428,8 +428,6 @@ Summary: The Linux kernel
%define with_bpftool 0
%define with_kernel_abi_stablelists 0
%define with_selftests 0
-%define with_cross 0
-%define with_cross_headers 0
%define with_ipaclones 0
%endif
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2552