Skip to content

Commit 45b6580

Browse files
committed
redhat: make ENABLE_WERROR enable also OBJTOOL_WERROR
JIRA: https://issues.redhat.com/browse/RHEL-85302 Upstream Status: RHEL only We don't want to enable CONFIG_OBJTOOL_WERROR for OOT / third-party module builds by default, so tie its enablement to CONFIG_WERROR which has the ENABLE_WERROR Makefile variable toggle. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
1 parent 4c08df5 commit 45b6580

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

redhat/configs/build_configs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ function merge_configs()
112112

113113
if [ -n "$ENABLE_WERROR" ]; then
114114
sed -i "s|# CONFIG_WERROR is not set|CONFIG_WERROR=y|g" "$name"
115+
sed -i "s|# CONFIG_OBJTOOL_WERROR is not set|CONFIG_OBJTOOL_WERROR=y|g" "$name"
115116
fi
116117

117118
rm -f config-merged."$count" config-merging."$count"

scripts/Makefile.lib

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ objtool-args-$(CONFIG_HAVE_STATIC_CALL_INLINE) += --static-call
258258
objtool-args-$(CONFIG_HAVE_UACCESS_VALIDATION) += --uaccess
259259
objtool-args-$(CONFIG_GCOV_KERNEL) += --no-unreachable
260260
objtool-args-$(CONFIG_PREFIX_SYMBOLS) += --prefix=$(CONFIG_FUNCTION_PADDING_BYTES)
261+
# RHEL-only: don't enforce OBJTOOL_WERROR for out of tree modules
262+
ifeq ($(KBUILD_EXTMOD),)
261263
objtool-args-$(CONFIG_OBJTOOL_WERROR) += --Werror --backtrace
264+
endif
262265

263266
objtool-args = $(objtool-args-y) \
264267
$(if $(delay-objtool), --link) \

0 commit comments

Comments
 (0)