Merge tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix module versioning broken on some architectures - Make dummy-tools enable CONFIG_PPC_LONG_DOUBLE_128 - Remove -Wformat-zero-length, which has no warning instance - Fix the order between drivers and libs in modules.order - Fix false-positive warnings in clang-analyzer * tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check kbuild: fix the modules order between drivers and libs scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__ modpost: fix module versioning when a symbol lacks valid CRC
This commit is contained in:
@@ -1113,13 +1113,11 @@ vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
|
||||
$(patsubst %/,%,$(filter %/, $(core-) \
|
||||
$(drivers-) $(libs-))))
|
||||
|
||||
subdir-modorder := $(addsuffix modules.order,$(filter %/, \
|
||||
$(core-y) $(core-m) $(libs-y) $(libs-m) \
|
||||
$(drivers-y) $(drivers-m)))
|
||||
|
||||
build-dirs := $(vmlinux-dirs)
|
||||
clean-dirs := $(vmlinux-alldirs)
|
||||
|
||||
subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
|
||||
|
||||
# Externally visible symbols (used by link-vmlinux.sh)
|
||||
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
|
||||
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))
|
||||
|
||||
@@ -49,7 +49,6 @@ ifdef CONFIG_CC_IS_CLANG
|
||||
KBUILD_CFLAGS += -Wno-initializer-overrides
|
||||
KBUILD_CFLAGS += -Wno-format
|
||||
KBUILD_CFLAGS += -Wno-sign-compare
|
||||
KBUILD_CFLAGS += -Wno-format-zero-length
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
|
||||
KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
|
||||
|
||||
@@ -51,6 +51,7 @@ def run_analysis(entry):
|
||||
checks += "linuxkernel-*"
|
||||
else:
|
||||
checks += "clang-analyzer-*"
|
||||
checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
|
||||
p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
|
||||
@@ -59,7 +59,7 @@ fi
|
||||
if arg_contain -E "$@"; then
|
||||
# For scripts/cc-version.sh; This emulates GCC 20.0.0
|
||||
if arg_contain - "$@"; then
|
||||
sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}'
|
||||
sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}; s/__LONG_DOUBLE_128__/1/ p'
|
||||
exit 0
|
||||
else
|
||||
echo "no input files" >&2
|
||||
|
||||
@@ -2021,13 +2021,11 @@ static void add_exported_symbols(struct buffer *buf, struct module *mod)
|
||||
/* record CRCs for exported symbols */
|
||||
buf_printf(buf, "\n");
|
||||
list_for_each_entry(sym, &mod->exported_symbols, list) {
|
||||
if (!sym->crc_valid) {
|
||||
if (!sym->crc_valid)
|
||||
warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n"
|
||||
"Is \"%s\" prototyped in <asm/asm-prototypes.h>?\n",
|
||||
sym->name, mod->name, mod->is_vmlinux ? "" : ".ko",
|
||||
sym->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
buf_printf(buf, "SYMBOL_CRC(%s, 0x%08x, \"%s\");\n",
|
||||
sym->name, sym->crc, sym->is_gpl_only ? "_gpl" : "");
|
||||
|
||||
Reference in New Issue
Block a user