kernel/1238-redhat-kernel-spec-template-disable-objtool-werror-for-gcov-.patch
Andrew Lukoshko b9d46fff46 Recreate RHEL 6.12.0-211.18.1 from CS10/upstream backports
Add the RHEL 211.17.1..211.18.1 backports (1162-1244) from centos-stream-10 and
upstream, on top of 211.16.1. Includes the lpfc 14.4.0.x revert batch and the
RHEL-only lpfc_nlp_get UAF guard. Bump to 211.18.1.
2026-06-07 00:04:03 +00:00

37 lines
1.0 KiB
Diff

From 1689ee487def887a6e105f5bd858545cbafa8ba5 Mon Sep 17 00:00:00 2001
From: Oleksii Baranov <olebaran@redhat.com>
Date: Tue, 2 Jun 2026 10:12:10 +0200
Subject: [PATCH] redhat/kernel.spec.template: disable OBJTOOL_WERROR for gcov
builds
JIRA: INTERNAL
Upstream Status: RHEL only
There is a known issue with the gcov builds related to vmlinux.o: error:
objtool: pvh_start_xen+0x64: relocation to !ENDBR: pvh_start_xen+0x0.
Disabling the WERROR to make that error a warning and pass the build.
Signed-off-by: Oleksii Baranov <olebaran@redhat.com>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index 9f6983c1a6dc..306afba015a4 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2118,6 +2118,13 @@ do
done
rm -f $i.tmp
done
+%if %{with_gcov}
+%{log_msg "Disabling CONFIG_OBJTOOL_WERROR for gcov build"}
+for i in %{all_configs}
+do
+ sed -i "s|CONFIG_OBJTOOL_WERROR=y|# CONFIG_OBJTOOL_WERROR is not set|g" $i
+done
+%endif
%endif
%if %{signkernel}%{signmodules}
--
2.50.1 (Apple Git-155)