redhat: workaround CKI cross compilation for scripts
redhat: workaround CKI cross compilation for scripts
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2101805 Upstream Status: RHEL only
Build process compiles scripts that are needed by host to (cross-)compile kernel. These are built only for host arch and packaged in kernel-devel, which creates a problem when somebody wants to build modules on target arch.
Support for cross-compiling scripts have been proposed upstream, but is currently not integrated: https://patchwork.kernel.org/project/linux-kbuild/patch/1376046432-12588-1-git-send-email-broonie@kernel.org/ and requires not only cross-gcc but also some user-space libraries (at least cross glibc).
Other option is a workaround, that compiles scripts on target after kernel-devel is installed. Code-wise it is a lot smaller change, and impacts only CKI builds, while brew builds remain unaffected.
CKI plans to move to native builds for RHEL-10 in next ~12 months, so this would be temporary change for RHEL-9.
Signed-off-by: Jan Stancek jstancek@redhat.com