Skip to content

Commit 58c03e6

Browse files
iavyury-deltsov
authored andcommitted
Remove -Wno-error=unknown-warning-option from clang KCFLAGS.
This flag was breaking kernel's cc-option detection, causing GCC-specific warnings (-Wpacked-not-aligned, -Wstringop-truncation, -Wmaybe-uninitialized) to be incorrectly added to btrfs/drm/coresight builds when using clang.
1 parent b2d7188 commit 58c03e6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/functions/compilation/kernel-make.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ function run_kernel_make_internal() {
4040
if [[ "${KERNEL_COMPILER}" == "clang" ]]; then
4141
llvm_flag="LLVM=1"
4242
cc_name="CC"
43-
extra_warnings="-Wno-error=unused-command-line-argument -Wno-error=unknown-warning-option" # downgrade errors to warnings
43+
# Only suppress unused-command-line-argument errors
44+
# Do NOT add -Wno-error=unknown-warning-option here - it breaks cc-option detection
45+
# in kernel Makefiles (btrfs, drm, coresight) causing GCC-specific flags to be
46+
# incorrectly added when building with clang
47+
extra_warnings="-Wno-error=unused-command-line-argument"
4448
else
4549
cc_name="CROSS_COMPILE"
4650
extra_warnings=""

0 commit comments

Comments
 (0)