From: Prarit Bhargava <prarit(a)redhat.com>
redhat/Makefile.variables: Add ENABLE_WERROR
kernel-ark requires CONFIG_WERROR be disabled due to the rate of change in
the upstream toolchain. This differs from RHEL where they need
CONFIG_WERROR=y. Instead of trying to remember to set CONFIG_WERROR=y
when RHEL is snapshotted from kernel-ark, add a Makefile.variable that
overrides CONFIG_WERROR to 'y'.
Add ENABLE_WERROR which will override CONFIG_WERROR to 'y' for all
architectures.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -50,6 +50,9 @@ DIST_BRANCH ?= "os-build"
# OS version (fedora, centos, or rhel).
DISTRO ?=
+# This overrides CONFIG_WERROR to 'y' for all arches. RHEL requires this
variable to be set.
+ENABLE_WERROR ?=
+
# This is the executable for 'git' commands. It is used by the redhat/self-test
# tests to provide testing information on git hashes (see redhat/self-test/egit.sh)
GIT ?= git
diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh
index blahblah..blahblah 100755
--- a/redhat/configs/build_configs.sh
+++ b/redhat/configs/build_configs.sh
@@ -110,6 +110,11 @@ function merge_configs()
esac
sort config-merging."$count" >> "$name"
+
+ if [ -n "$ENABLE_WERROR" ]; then
+ sed -i "1,$$s|# CONFIG_WERROR is not set|CONFIG_WERROR=y|g"
"$name"
+ fi
+
rm -f config-merged."$count" config-merging."$count"
echo "Building $name complete"
}
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2240