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.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- fix -gz=zlib compiler option test for CONFIG_DEBUG_INFO_COMPRESSED

- improve cc-option in scripts/Kbuild.include to clean up temp files

- improve cc-option in scripts/Kconfig.include for more reliable
compile option test

- do not copy modules.builtin by 'make install' because it would break
existing systems

- use 'userprogs' syntax for watch_queue sample

* tag 'kbuild-fixes-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
samples: watch_queue: build sample program for target architecture
Revert "Makefile: install modules.builtin even if CONFIG_MODULES=n"
scripts: Fix typo in headers_install.sh
kconfig: unify cc-option and as-option
kbuild: improve cc-option to clean up all temporary files
Makefile: Improve compressed debug info support detection

+18 -34
+4 -12
Makefile
··· 828 828 829 829 ifdef CONFIG_DEBUG_INFO_COMPRESSED 830 830 DEBUG_CFLAGS += -gz=zlib 831 - KBUILD_AFLAGS += -Wa,--compress-debug-sections=zlib 831 + KBUILD_AFLAGS += -gz=zlib 832 832 KBUILD_LDFLAGS += --compress-debug-sections=zlib 833 833 endif 834 834 ··· 1336 1336 # --------------------------------------------------------------------------- 1337 1337 # Modules 1338 1338 1339 - # install modules.builtin regardless of CONFIG_MODULES 1340 - PHONY += _builtin_inst_ 1341 - _builtin_inst_: 1342 - @mkdir -p $(MODLIB)/ 1343 - @cp -f modules.builtin $(MODLIB)/ 1344 - @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/ 1345 - 1346 - PHONY += install 1347 - install: _builtin_inst_ 1348 - 1349 1339 ifdef CONFIG_MODULES 1350 1340 1351 1341 # By default, build modules as well ··· 1379 1389 modules_install: _modinst_ _modinst_post 1380 1390 1381 1391 PHONY += _modinst_ 1382 - _modinst_: _builtin_inst_ 1392 + _modinst_: 1383 1393 @rm -rf $(MODLIB)/kernel 1384 1394 @rm -f $(MODLIB)/source 1385 1395 @mkdir -p $(MODLIB)/kernel ··· 1389 1399 ln -s $(CURDIR) $(MODLIB)/build ; \ 1390 1400 fi 1391 1401 @sed 's:^:kernel/:' modules.order > $(MODLIB)/modules.order 1402 + @cp -f modules.builtin $(MODLIB)/ 1403 + @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/ 1392 1404 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst 1393 1405 1394 1406 # This depmod is only for convenience to give the initial
+1 -1
arch/arm64/Kconfig
··· 1564 1564 def_bool $(cc-option,-msign-return-address=all) 1565 1565 1566 1566 config AS_HAS_PAC 1567 - def_bool $(as-option,-Wa$(comma)-march=armv8.3-a) 1567 + def_bool $(cc-option,-Wa$(comma)-march=armv8.3-a) 1568 1568 1569 1569 config AS_HAS_CFI_NEGATE_RA_STATE 1570 1570 def_bool $(as-instr,.cfi_startproc\n.cfi_negate_ra_state\n.cfi_endproc\n)
-1
lib/Kconfig.debug
··· 229 229 bool "Compressed debugging information" 230 230 depends on DEBUG_INFO 231 231 depends on $(cc-option,-gz=zlib) 232 - depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib) 233 232 depends on $(ld-option,--compress-debug-sections=zlib) 234 233 help 235 234 Compress the debug information using zlib. Requires GCC 5.0+ or Clang
+1 -1
samples/Kconfig
··· 211 211 212 212 config SAMPLE_WATCH_QUEUE 213 213 bool "Build example /dev/watch_queue notification consumer" 214 - depends on HEADERS_INSTALL 214 + depends on CC_CAN_LINK && HEADERS_INSTALL 215 215 help 216 216 Build example userspace program to use the new mount_notify(), 217 217 sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.
+4 -6
samples/watch_queue/Makefile
··· 1 - # List of programs to build 2 - hostprogs := watch_test 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + userprogs := watch_test 3 + always-y := $(userprogs) 3 4 4 - # Tell kbuild to always build the programs 5 - always-y := $(hostprogs) 6 - 7 - HOSTCFLAGS_watch_test.o += -I$(objtree)/usr/include 5 + userccflags += -I usr/include
+6 -5
scripts/Kbuild.include
··· 86 86 $(if $(shell command -v -- $(c)gcc 2>/dev/null), $(c)))) 87 87 88 88 # output directory for tests below 89 - TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) 89 + TMPOUT = $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_$$$$ 90 90 91 91 # try-run 92 92 # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) 93 93 # Exit code chooses option. "$$TMP" serves as a temporary file and is 94 94 # automatically cleaned up. 95 95 try-run = $(shell set -e; \ 96 - TMP="$(TMPOUT).$$$$.tmp"; \ 97 - TMPO="$(TMPOUT).$$$$.o"; \ 96 + TMP=$(TMPOUT)/tmp; \ 97 + TMPO=$(TMPOUT)/tmp.o; \ 98 + mkdir -p $(TMPOUT); \ 99 + trap "rm -rf $(TMPOUT)" EXIT; \ 98 100 if ($(1)) >/dev/null 2>&1; \ 99 101 then echo "$(2)"; \ 100 102 else echo "$(3)"; \ 101 - fi; \ 102 - rm -f "$$TMP" "$$TMPO") 103 + fi) 103 104 104 105 # as-option 105 106 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
+1 -7
scripts/Kconfig.include
··· 25 25 26 26 # $(cc-option,<flag>) 27 27 # Return y if the compiler supports <flag>, n otherwise 28 - cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -S -x c /dev/null -o /dev/null) 28 + cc-option = $(success,mkdir .tmp_$$$$; trap "rm -rf .tmp_$$$$" EXIT; $(CC) -Werror $(CLANG_FLAGS) $(1) -c -x c /dev/null -o .tmp_$$$$/tmp.o) 29 29 30 30 # $(ld-option,<flag>) 31 31 # Return y if the linker supports <flag>, n otherwise 32 32 ld-option = $(success,$(LD) -v $(1)) 33 - 34 - # $(as-option,<flag>) 35 - # /dev/zero is used as output instead of /dev/null as some assembler cribs when 36 - # both input and output are same. Also both of them have same write behaviour so 37 - # can be easily substituted. 38 - as-option = $(success, $(CC) $(CLANG_FLAGS) $(1) -c -x assembler /dev/null -o /dev/zero) 39 33 40 34 # $(as-instr,<instr>) 41 35 # Return y if the assembler supports <instr>, n otherwise
+1 -1
scripts/headers_install.sh
··· 11 11 echo "asm/inline/volatile keywords." 12 12 echo 13 13 echo "INFILE: header file to operate on" 14 - echo "OUTFILE: output file which the processed header is writen to" 14 + echo "OUTFILE: output file which the processed header is written to" 15 15 16 16 exit 1 17 17 fi