Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kbuild-fixes-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- Fix bugs in checkkconfigsymbols.py

- Fix missing sys import in gen_compile_commands.py

- Fix missing FORCE warning for ARCH=sh builds

- Fix -Wignored-optimization-argument warnings for Clang builds

- Turn -Wignored-optimization-argument into an error in order to stop
building instead of sprinkling warnings

* tag 'kbuild-fixes-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: Add -Werror=ignored-optimization-argument to CLANG_FLAGS
x86/build: Do not add -falign flags unconditionally for clang
kbuild: Fix comment typo in scripts/Makefile.modpost
sh: Add missing FORCE prerequisites in Makefile
gen_compile_commands: fix missing 'sys' package
checkkconfigsymbols.py: Remove skipping of help lines in parse_kconfig_file
checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit

+27 -20
+8 -8
arch/sh/boot/Makefile
··· 80 80 $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE 81 81 $(call if_changed,lzo) 82 82 83 - $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 83 + $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE 84 84 $(call if_changed,uimage,bzip2) 85 85 86 - $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz 86 + $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE 87 87 $(call if_changed,uimage,gzip) 88 88 89 - $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma 89 + $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE 90 90 $(call if_changed,uimage,lzma) 91 91 92 - $(obj)/uImage.xz: $(obj)/vmlinux.bin.xz 92 + $(obj)/uImage.xz: $(obj)/vmlinux.bin.xz FORCE 93 93 $(call if_changed,uimage,xz) 94 94 95 - $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo 95 + $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORCE 96 96 $(call if_changed,uimage,lzo) 97 97 98 - $(obj)/uImage.bin: $(obj)/vmlinux.bin 98 + $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE 99 99 $(call if_changed,uimage,none) 100 100 101 101 OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec 102 - $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux 102 + $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux FORCE 103 103 $(call if_changed,objcopy) 104 104 105 105 OBJCOPYFLAGS_uImage.srec := -I binary -O srec 106 - $(obj)/uImage.srec: $(obj)/uImage 106 + $(obj)/uImage.srec: $(obj)/uImage FORCE 107 107 $(call if_changed,objcopy) 108 108 109 109 $(obj)/uImage: $(obj)/uImage.$(suffix-y)
+9 -3
arch/x86/Makefile_32.cpu
··· 4 4 5 5 tune = $(call cc-option,-mtune=$(1),$(2)) 6 6 7 + ifdef CONFIG_CC_IS_CLANG 8 + align := -falign-functions=0 $(call cc-option,-falign-jumps=0) $(call cc-option,-falign-loops=0) 9 + else 10 + align := -falign-functions=0 -falign-jumps=0 -falign-loops=0 11 + endif 12 + 7 13 cflags-$(CONFIG_M486SX) += -march=i486 8 14 cflags-$(CONFIG_M486) += -march=i486 9 15 cflags-$(CONFIG_M586) += -march=i586 ··· 25 19 # They make zero difference whatsosever to performance at this time. 26 20 cflags-$(CONFIG_MK7) += -march=athlon 27 21 cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon) 28 - cflags-$(CONFIG_MCRUSOE) += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 29 - cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0 22 + cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align) 23 + cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align) 30 24 cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586) 31 25 cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586) 32 - cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0 26 + cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align) 33 27 cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686) 34 28 cflags-$(CONFIG_MVIAC7) += -march=i686 35 29 cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
+5
scripts/Makefile.clang
··· 29 29 else 30 30 CLANG_FLAGS += -fintegrated-as 31 31 endif 32 + # By default, clang only warns when it encounters an unknown warning flag or 33 + # certain optimization flags it knows it has not implemented. 34 + # Make it behave more like gcc by erroring when these flags are encountered 35 + # so they can be implemented or wrapped in cc-option. 32 36 CLANG_FLAGS += -Werror=unknown-warning-option 37 + CLANG_FLAGS += -Werror=ignored-optimization-argument 33 38 KBUILD_CFLAGS += $(CLANG_FLAGS) 34 39 KBUILD_AFLAGS += $(CLANG_FLAGS) 35 40 export CLANG_FLAGS
+1 -1
scripts/Makefile.modpost
··· 13 13 # Stage 2 is handled by this file and does the following 14 14 # 1) Find all modules listed in modules.order 15 15 # 2) modpost is then used to 16 - # 3) create one <module>.mod.c file pr. module 16 + # 3) create one <module>.mod.c file per module 17 17 # 4) create one Module.symvers file with CRC for all exported symbols 18 18 19 19 # Step 3 is used to place certain information in the module's ELF
+3 -8
scripts/checkkconfigsymbols.py
··· 34 34 REGEX_KCONFIG_DEF = re.compile(DEF) 35 35 REGEX_KCONFIG_EXPR = re.compile(EXPR) 36 36 REGEX_KCONFIG_STMT = re.compile(STMT) 37 - REGEX_KCONFIG_HELP = re.compile(r"^\s+help\s*$") 38 37 REGEX_FILTER_SYMBOLS = re.compile(r"[A-Za-z0-9]$") 39 38 REGEX_NUMERIC = re.compile(r"0[xX][0-9a-fA-F]+|[0-9]+") 40 39 REGEX_QUOTES = re.compile("(\"(.*?)\")") ··· 101 102 "continue.") 102 103 103 104 if args.commit: 105 + if args.commit.startswith('HEAD'): 106 + sys.exit("The --commit option can't use the HEAD ref") 107 + 104 108 args.find = False 105 109 106 110 if args.ignore: ··· 434 432 lines = [] 435 433 defined = [] 436 434 references = [] 437 - skip = False 438 435 439 436 if not os.path.exists(kfile): 440 437 return defined, references ··· 449 448 if REGEX_KCONFIG_DEF.match(line): 450 449 symbol_def = REGEX_KCONFIG_DEF.findall(line) 451 450 defined.append(symbol_def[0]) 452 - skip = False 453 - elif REGEX_KCONFIG_HELP.match(line): 454 - skip = True 455 - elif skip: 456 - # ignore content of help messages 457 - pass 458 451 elif REGEX_KCONFIG_STMT.match(line): 459 452 line = REGEX_QUOTES.sub("", line) 460 453 symbols = get_symbols_in_line(line)
+1
scripts/clang-tools/gen_compile_commands.py
··· 13 13 import os 14 14 import re 15 15 import subprocess 16 + import sys 16 17 17 18 _DEFAULT_OUTPUT = 'compile_commands.json' 18 19 _DEFAULT_LOG_LEVEL = 'WARNING'