Skip to content

Commit 82c0ccc

Browse files
committed
redhat: don't enforce WERROR for 3rd-party OOT kmods
JIRA: https://issues.redhat.com/browse/RHEL-85334 Upstream Status: RHEL only RHEL OOT kmods can opt-in for WERROR by passing RHEL_EXTMOD=1|y to make. Signed-off-by: Jan Stancek <jstancek@redhat.com>
1 parent f8d7a3e commit 82c0ccc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/Makefile.extrawarn

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ ifneq ($(CONFIG_FRAME_WARN),0)
2424
KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN)
2525
endif
2626

27+
# don't enforce WERROR for 3rd party OOT kmods
28+
ENABLE_WERROR_FOR_RHEL := $(or $(if $(KBUILD_EXTMOD),,1),$(RHEL_EXTMOD))
29+
ifneq ($(ENABLE_WERROR_FOR_RHEL),)
2730
KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror
31+
endif
32+
2833
KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y)
2934
KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
3035

0 commit comments

Comments
 (0)