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

Pull Kbuild updates from Masahiro Yamada:

- Avoid 'constexpr', which is a keyword in C23

- Allow 'dtbs_check' and 'dt_compatible_check' run independently of
'dt_binding_check'

- Fix weak references to avoid GOT entries in position-independent code
generation

- Convert the last use of 'optional' property in arch/sh/Kconfig

- Remove support for the 'optional' property in Kconfig

- Remove support for Clang's ThinLTO caching, which does not work with
the .incbin directive

- Change the semantics of $(src) so it always points to the source
directory, which fixes Makefile inconsistencies between upstream and
downstream

- Fix 'make tar-pkg' for RISC-V to produce a consistent package

- Provide reasonable default coverage for objtool, sanitizers, and
profilers

- Remove redundant OBJECT_FILES_NON_STANDARD, KASAN_SANITIZE, etc.

- Remove the last use of tristate choice in drivers/rapidio/Kconfig

- Various cleanups and fixes in Kconfig

* tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (46 commits)
kconfig: use sym_get_choice_menu() in sym_check_prop()
rapidio: remove choice for enumeration
kconfig: lxdialog: remove initialization with A_NORMAL
kconfig: m/nconf: merge two item_add_str() calls
kconfig: m/nconf: remove dead code to display value of bool choice
kconfig: m/nconf: remove dead code to display children of choice members
kconfig: gconf: show checkbox for choice correctly
kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinal
Makefile: remove redundant tool coverage variables
kbuild: provide reasonable defaults for tool coverage
modules: Drop the .export_symbol section from the final modules
kconfig: use menu_list_for_each_sym() in sym_check_choice_deps()
kconfig: use sym_get_choice_menu() in conf_write_defconfig()
kconfig: add sym_get_choice_menu() helper
kconfig: turn defaults and additional prompt for choice members into error
kconfig: turn missing prompt for choice members into error
kconfig: turn conf_choice() into void function
kconfig: use linked list in sym_set_changed()
kconfig: gconf: use MENU_CHANGED instead of SYMBOL_CHANGED
kconfig: gconf: remove debug code
...

+611 -946
+4 -4
Documentation/Makefile
··· 80 80 # * dest folder relative to $(BUILDDIR) and 81 81 # * cache folder relative to $(BUILDDIR)/.doctrees 82 82 # $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man 83 - # $5 reST source folder relative to $(srctree)/$(src), 83 + # $5 reST source folder relative to $(src), 84 84 # e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media 85 85 86 86 quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) 87 87 cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \ 88 88 PYTHONDONTWRITEBYTECODE=1 \ 89 - BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ 89 + BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(src)/$5/$(SPHINX_CONF)) \ 90 90 $(PYTHON3) $(srctree)/scripts/jobserver-exec \ 91 91 $(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \ 92 92 $(SPHINXBUILD) \ 93 93 -b $2 \ 94 - -c $(abspath $(srctree)/$(src)) \ 94 + -c $(abspath $(src)) \ 95 95 -d $(abspath $(BUILDDIR)/.doctrees/$3) \ 96 96 -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \ 97 97 $(ALLSPHINXOPTS) \ 98 - $(abspath $(srctree)/$(src)/$5) \ 98 + $(abspath $(src)/$5) \ 99 99 $(abspath $(BUILDDIR)/$3/$4) && \ 100 100 if [ "x$(DOCS_CSS)" != "x" ]; then \ 101 101 cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \
+21 -15
Documentation/devicetree/bindings/Makefile
··· 25 25 $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE 26 26 $(call if_changed,extract_ex) 27 27 28 - find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ 28 + find_all_cmd = find $(src) \( -name '*.yaml' ! \ 29 29 -name 'processed-schema*' \) 30 30 31 31 find_cmd = $(find_all_cmd) | \ 32 32 sed 's|^$(srctree)/||' | \ 33 33 grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \ 34 34 sed 's|^|$(srctree)/|' 35 - CHK_DT_DOCS := $(shell $(find_cmd)) 35 + CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, $(shell $(find_cmd))) 36 36 37 37 quiet_cmd_yamllint = LINT $(src) 38 38 cmd_yamllint = ($(find_cmd) | \ 39 39 xargs -n200 -P$$(nproc) \ 40 - $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint >&2) || true 40 + $(DT_SCHEMA_LINT) -f parsable -c $(src)/.yamllint >&2) \ 41 + && touch $@ || true 41 42 42 - quiet_cmd_chk_bindings = CHKDT $@ 43 + quiet_cmd_chk_bindings = CHKDT $(src) 43 44 cmd_chk_bindings = ($(find_cmd) | \ 44 - xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)) || true 45 + xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \ 46 + && touch $@ || true 45 47 46 48 quiet_cmd_mk_schema = SCHEMA $@ 47 49 cmd_mk_schema = f=$$(mktemp) ; \ 48 50 $(find_all_cmd) > $$f ; \ 49 51 $(DT_MK_SCHEMA) -j $(DT_MK_SCHEMA_FLAGS) @$$f > $@ ; \ 50 52 rm -f $$f 51 - 52 - define rule_chkdt 53 - $(if $(DT_SCHEMA_LINT),$(call cmd,yamllint),) 54 - $(call cmd,chk_bindings) 55 - $(call cmd,mk_schema) 56 - endef 57 53 58 54 DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd))) 59 55 ··· 60 64 -Wno-unique_unit_address \ 61 65 -Wunique_unit_address_if_enabled 62 66 63 - $(obj)/processed-schema.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE 64 - $(call if_changed_rule,chkdt) 67 + $(obj)/processed-schema.json: $(DT_DOCS) check_dtschema_version FORCE 68 + $(call if_changed,mk_schema) 69 + 70 + targets += .dt-binding.checked .yamllint.checked 71 + $(obj)/.yamllint.checked: $(DT_DOCS) $(src)/.yamllint FORCE 72 + $(if $(DT_SCHEMA_LINT),$(call if_changed,yamllint),) 73 + 74 + $(obj)/.dt-binding.checked: $(DT_DOCS) FORCE 75 + $(call if_changed,chk_bindings) 65 76 66 77 always-y += processed-schema.json 67 - always-$(CHECK_DT_BINDING) += $(patsubst $(srctree)/$(src)/%.yaml,%.example.dts, $(CHK_DT_DOCS)) 68 - always-$(CHECK_DT_BINDING) += $(patsubst $(srctree)/$(src)/%.yaml,%.example.dtb, $(CHK_DT_DOCS)) 78 + targets += $(patsubst $(obj)/%,%, $(CHK_DT_EXAMPLES)) 79 + targets += $(patsubst $(obj)/%.dtb,%.dts, $(CHK_DT_EXAMPLES)) 69 80 70 81 # Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of 71 82 # build artifacts here before they are processed by scripts/Makefile.clean ··· 81 78 82 79 dt_compatible_check: $(obj)/processed-schema.json 83 80 $(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $< 81 + 82 + PHONY += dt_binding_check 83 + dt_binding_check: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked $(CHK_DT_EXAMPLES)
-3
Documentation/kbuild/kconfig-language.rst
··· 410 410 hardware exists and only a single driver can be compiled/loaded into 411 411 the kernel, but all drivers can be compiled as modules. 412 412 413 - A choice accepts another option "optional", which allows to set the 414 - choice to 'n' and no entry needs to be selected. 415 - 416 413 comment:: 417 414 418 415 "comment" <prompt>
+6 -6
Documentation/kbuild/makefiles.rst
··· 346 346 Example:: 347 347 348 348 #arch/cris/boot/compressed/Makefile 349 - ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds 349 + ldflags-y += -T $(src)/decompress_$(arch-y).lds 350 350 351 351 subdir-ccflags-y, subdir-asflags-y 352 352 The two flags listed above are similar to ccflags-y and asflags-y. ··· 426 426 Two variables are used when defining custom rules: 427 427 428 428 $(src) 429 - $(src) is a relative path which points to the directory 430 - where the Makefile is located. Always use $(src) when 429 + $(src) is the directory where the Makefile is located. Always use $(src) when 431 430 referring to files located in the src tree. 432 431 433 432 $(obj) 434 - $(obj) is a relative path which points to the directory 435 - where the target is saved. Always use $(obj) when 436 - referring to generated files. 433 + $(obj) is the directory where the target is saved. Always use $(obj) when 434 + referring to generated files. Use $(obj) for pattern rules that need to work 435 + for both generated files and real sources (VPATH will help to find the 436 + prerequisites not only in the object tree but also in the source tree). 437 437 438 438 Example:: 439 439
+27 -17
Makefile
··· 263 263 endif 264 264 265 265 objtree := . 266 + 267 + VPATH := 268 + 269 + ifeq ($(KBUILD_EXTMOD),) 270 + ifdef building_out_of_srctree 266 271 VPATH := $(srctree) 272 + endif 273 + endif 267 274 268 275 export building_out_of_srctree srctree objtree VPATH 269 276 ··· 949 942 ifdef CONFIG_LTO_CLANG 950 943 ifdef CONFIG_LTO_CLANG_THIN 951 944 CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit 952 - KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod_prefix).thinlto-cache 953 945 else 954 946 CC_FLAGS_LTO := -flto 955 947 endif ··· 1254 1248 echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL) 1255 1249 endef 1256 1250 1257 - $(version_h): PATCHLEVEL := $(or $(PATCHLEVEL), 0) 1258 - $(version_h): SUBLEVEL := $(or $(SUBLEVEL), 0) 1251 + $(version_h): private PATCHLEVEL := $(or $(PATCHLEVEL), 0) 1252 + $(version_h): private SUBLEVEL := $(or $(SUBLEVEL), 0) 1259 1253 $(version_h): FORCE 1260 1254 $(call filechk,version.h) 1261 1255 ··· 1409 1403 endif 1410 1404 1411 1405 ifneq ($(CHECK_DTBS),) 1412 - dtbs_prepare: dt_binding_check 1406 + dtbs_prepare: dt_binding_schemas 1413 1407 endif 1414 1408 1415 1409 dtbs_check: dtbs ··· 1428 1422 $(Q)$(MAKE) $(build)=scripts/dtc 1429 1423 1430 1424 ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),) 1431 - export CHECK_DT_BINDING=y 1425 + export CHECK_DTBS=y 1432 1426 endif 1433 1427 1434 - PHONY += dt_binding_check 1435 - dt_binding_check: scripts_dtc 1428 + PHONY += dt_binding_check dt_binding_schemas 1429 + dt_binding_check: dt_binding_schemas scripts_dtc 1430 + $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@ 1431 + 1432 + dt_binding_schemas: 1436 1433 $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings 1437 1434 1438 1435 PHONY += dt_compatible_check 1439 - dt_compatible_check: dt_binding_check 1436 + dt_compatible_check: dt_binding_schemas 1440 1437 $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@ 1441 1438 1442 1439 # --------------------------------------------------------------------------- ··· 1486 1477 # Directories & files removed with 'make clean' 1487 1478 CLEAN_FILES += vmlinux.symvers modules-only.symvers \ 1488 1479 modules.builtin modules.builtin.modinfo modules.nsdeps \ 1489 - compile_commands.json .thinlto-cache rust/test \ 1480 + compile_commands.json rust/test \ 1490 1481 rust-project.json .vmlinux.objs .vmlinux.export.c 1491 1482 1492 1483 # Directories & files removed with 'make mrproper' ··· 1503 1494 1504 1495 # clean - Delete most, but leave enough to build external modules 1505 1496 # 1506 - clean: rm-files := $(CLEAN_FILES) 1497 + clean: private rm-files := $(CLEAN_FILES) 1507 1498 1508 1499 PHONY += archclean vmlinuxclean 1509 1500 ··· 1515 1506 1516 1507 # mrproper - Delete all generated files, including .config 1517 1508 # 1518 - mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) 1509 + mrproper: private rm-files := $(MRPROPER_FILES) 1519 1510 mrproper-dirs := $(addprefix _mrproper_,scripts) 1520 1511 1521 1512 PHONY += $(mrproper-dirs) mrproper ··· 1635 1626 @echo '' 1636 1627 @$(if $(dtstree), \ 1637 1628 echo 'Devicetree:'; \ 1638 - echo '* dtbs - Build device tree blobs for enabled boards'; \ 1639 - echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \ 1640 - echo ' dt_binding_check - Validate device tree binding documents'; \ 1641 - echo ' dtbs_check - Validate device tree source files';\ 1629 + echo '* dtbs - Build device tree blobs for enabled boards'; \ 1630 + echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \ 1631 + echo ' dt_binding_check - Validate device tree binding documents and examples'; \ 1632 + echo ' dt_binding_schema - Build processed device tree binding schemas'; \ 1633 + echo ' dtbs_check - Validate device tree source files';\ 1642 1634 echo '') 1643 1635 1644 1636 @echo 'Userspace tools targets:' ··· 1792 1782 PHONY += compile_commands.json 1793 1783 1794 1784 clean-dirs := $(KBUILD_EXTMOD) 1795 - clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \ 1796 - $(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache 1785 + clean: private rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \ 1786 + $(KBUILD_EXTMOD)/compile_commands.json 1797 1787 1798 1788 PHONY += prepare 1799 1789 # now expand this into a simple variable to reduce the cost of shell evaluations
+1 -2
arch/arc/boot/dts/Makefile
··· 10 10 dtb-y := $(builtindtb-y).dtb 11 11 12 12 # for CONFIG_OF_ALL_DTBS test 13 - dtstree := $(srctree)/$(src) 14 - dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 13 + dtb- := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts)) 15 14 16 15 # board-specific dtc flags 17 16 DTC_FLAGS_hsdk += --pad 20
+1 -1
arch/arm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 obj-$(CONFIG_FPE_NWFPE) += nwfpe/ 3 3 # Put arch/arm/fastfpe/ to use this. 4 - obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/fastfpe/)) 4 + obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(src)/%,%,$(wildcard $(src)/fastfpe/)) 5 5 obj-$(CONFIG_VFP) += vfp/ 6 6 obj-$(CONFIG_XEN) += xen/ 7 7 obj-$(CONFIG_VDSO) += vdso/
+1 -2
arch/arm/boot/Makefile
··· 25 25 26 26 ifeq ($(CONFIG_XIP_KERNEL),y) 27 27 28 - cmd_deflate_xip_data = $(CONFIG_SHELL) -c \ 29 - '$(srctree)/$(src)/deflate_xip_data.sh $< $@' 28 + cmd_deflate_xip_data = $(CONFIG_SHELL) -c '$(src)/deflate_xip_data.sh $< $@' 30 29 31 30 ifeq ($(CONFIG_XIP_DEFLATED_DATA),y) 32 31 quiet_cmd_mkxip = XIPZ $@
-1
arch/arm/boot/bootp/Makefile
··· 5 5 # This file is included by the global makefile so that you can add your own 6 6 # architecture-specific flags and dependencies. 7 7 # 8 - GCOV_PROFILE := n 9 8 10 9 ifdef PHYS_OFFSET 11 10 add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) )
-7
arch/arm/boot/compressed/Makefile
··· 22 22 OBJS += hyp-stub.o 23 23 endif 24 24 25 - GCOV_PROFILE := n 26 - KASAN_SANITIZE := n 27 - 28 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 29 - KCOV_INSTRUMENT := n 30 - UBSAN_SANITIZE := n 31 - 32 25 # 33 26 # Architecture dependencies 34 27 #
+1 -1
arch/arm/mach-s3c/Makefile
··· 2 2 # 3 3 # Copyright 2009 Simtec Electronics 4 4 5 - include $(srctree)/$(src)/Makefile.s3c64xx 5 + include $(src)/Makefile.s3c64xx 6 6 7 7 # Objects we always build independent of SoC choice 8 8
+1 -1
arch/arm/plat-orion/Makefile
··· 2 2 # 3 3 # Makefile for the linux kernel. 4 4 # 5 - ccflags-y := -I$(srctree)/$(src)/include 5 + ccflags-y := -I$(src)/include 6 6 7 7 orion-gpio-$(CONFIG_GPIOLIB) += gpio.o 8 8 obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
+1 -1
arch/arm/tools/Makefile
··· 9 9 kapi := $(gen)/asm 10 10 uapi := $(gen)/uapi/asm 11 11 syshdr := $(srctree)/scripts/syscallhdr.sh 12 - sysnr := $(srctree)/$(src)/syscallnr.sh 12 + sysnr := $(src)/syscallnr.sh 13 13 systbl := $(srctree)/scripts/syscalltbl.sh 14 14 syscall := $(src)/syscall.tbl 15 15
-9
arch/arm/vdso/Makefile
··· 33 33 CFLAGS_vgettimeofday.o = -O2 -include $(c-gettimeofday-y) 34 34 endif 35 35 36 - # Disable gcov profiling for VDSO code 37 - GCOV_PROFILE := n 38 - UBSAN_SANITIZE := n 39 - 40 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 41 - KCOV_INSTRUMENT := n 42 - 43 - KASAN_SANITIZE := n 44 - 45 36 # Force dependency 46 37 $(obj)/vdso.o : $(obj)/vdso.so 47 38
-6
arch/arm64/kernel/pi/Makefile
··· 19 19 # disable LTO 20 20 KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) 21 21 22 - GCOV_PROFILE := n 23 - KASAN_SANITIZE := n 24 - KCSAN_SANITIZE := n 25 - UBSAN_SANITIZE := n 26 - KCOV_INSTRUMENT := n 27 - 28 22 hostprogs := relacheck 29 23 30 24 quiet_cmd_piobjcopy = $(quiet_cmd_objcopy)
+1 -9
arch/arm64/kernel/vdso/Makefile
··· 40 40 $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) \ 41 41 $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) \ 42 42 -Wmissing-prototypes -Wmissing-declarations 43 - KASAN_SANITIZE := n 44 - KCSAN_SANITIZE := n 45 - UBSAN_SANITIZE := n 46 - OBJECT_FILES_NON_STANDARD := y 47 - KCOV_INSTRUMENT := n 48 43 49 44 CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -fasynchronous-unwind-tables 50 45 51 46 ifneq ($(c-gettimeofday-y),) 52 47 CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) 53 48 endif 54 - 55 - # Disable gcov profiling for VDSO code 56 - GCOV_PROFILE := n 57 49 58 50 targets += vdso.lds 59 51 CPPFLAGS_vdso.lds += -P -C -U$(ARCH) ··· 60 68 $(call if_changed,objcopy) 61 69 62 70 # Generate VDSO offsets using helper script 63 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 71 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 64 72 quiet_cmd_vdsosym = VDSOSYM $@ 65 73 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 66 74
+1 -1
arch/arm64/kernel/vdso32/Makefile
··· 136 136 $(call if_changed,vdsomunge) 137 137 138 138 # Link rule for the .so file, .lds has to be first 139 - $(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE 139 + $(obj)/vdso.so.raw: $(obj)/vdso.lds $(obj-vdso) FORCE 140 140 $(call if_changed,vdsold_and_vdso_check) 141 141 142 142 # Compilation rules for the vDSO sources
+2 -2
arch/arm64/kvm/Makefile
··· 3 3 # Makefile for Kernel-based Virtual Machine module 4 4 # 5 5 6 - ccflags-y += -I $(srctree)/$(src) 6 + ccflags-y += -I $(src) 7 7 8 8 include $(srctree)/virt/kvm/Makefile.kvm 9 9 ··· 31 31 $(call filechk,offsets,__HYP_CONSTANTS_H__) 32 32 endef 33 33 34 - CFLAGS_hyp-constants.o = -I $(srctree)/$(src)/hyp/include 34 + CFLAGS_hyp-constants.o = -I $(src)/hyp/include 35 35 $(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE 36 36 $(call if_changed_dep,cc_s_c) 37 37
+1 -1
arch/arm64/kvm/hyp/Makefile
··· 3 3 # Makefile for Kernel-based Virtual Machine module, HYP part 4 4 # 5 5 6 - incdir := $(srctree)/$(src)/include 6 + incdir := $(src)/include 7 7 subdir-asflags-y := -I$(incdir) 8 8 subdir-ccflags-y := -I$(incdir) 9 9
-13
arch/arm64/kvm/hyp/nvhe/Makefile
··· 97 97 # causes a build failure. Remove profile optimization flags. 98 98 KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%, $(KBUILD_CFLAGS)) 99 99 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables 100 - 101 - # KVM nVHE code is run at a different exception code with a different map, so 102 - # compiler instrumentation that inserts callbacks or checks into the code may 103 - # cause crashes. Just disable it. 104 - GCOV_PROFILE := n 105 - KASAN_SANITIZE := n 106 - KCSAN_SANITIZE := n 107 - UBSAN_SANITIZE := n 108 - KCOV_INSTRUMENT := n 109 - 110 - # Skip objtool checking for this directory because nVHE code is compiled with 111 - # non-standard build rules. 112 - OBJECT_FILES_NON_STANDARD := y
+1 -3
arch/csky/boot/dts/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - dtstree := $(srctree)/$(src) 3 - 4 - dtb-y := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 2 + dtb-y := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+2 -6
arch/csky/kernel/vdso/Makefile
··· 23 23 obj-y += vdso.o vdso-syms.o 24 24 CPPFLAGS_vdso.lds += -P -C -U$(ARCH) 25 25 26 - # Disable gcov profiling for VDSO code 27 - GCOV_PROFILE := n 28 - KCOV_INSTRUMENT := n 29 - 30 26 # Force dependency 31 27 $(obj)/vdso.o: $(obj)/vdso.so 32 28 33 29 SYSCFLAGS_vdso.so.dbg = $(c_flags) 34 - $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE 30 + $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE 35 31 $(call if_changed,vdsold) 36 32 SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ 37 33 -Wl,--build-id=sha1 -Wl,--hash-style=both ··· 53 57 # Extracts symbol offsets from the VDSO, converting them into an assembly file 54 58 # that contains the same symbols at the same offsets. 55 59 quiet_cmd_so2s = SO2S $@ 56 - cmd_so2s = $(NM) -D $< | $(srctree)/$(src)/so2s.sh > $@ 60 + cmd_so2s = $(NM) -D $< | $(src)/so2s.sh > $@
+1 -1
arch/loongarch/kvm/Makefile
··· 3 3 # Makefile for LoongArch KVM support 4 4 # 5 5 6 - ccflags-y += -I $(srctree)/$(src) 6 + ccflags-y += -I $(src) 7 7 8 8 include $(srctree)/virt/kvm/Makefile.kvm 9 9
+1 -8
arch/loongarch/vdso/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # Objects to go into the VDSO. 3 3 4 - KASAN_SANITIZE := n 5 - UBSAN_SANITIZE := n 6 - KCOV_INSTRUMENT := n 7 - OBJECT_FILES_NON_STANDARD := y 8 - 9 4 # Include the generic Makefile to check the built vdso. 10 5 include $(srctree)/lib/vdso/Makefile 11 6 ··· 34 39 $(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \ 35 40 --hash-style=sysv --build-id -T 36 41 37 - GCOV_PROFILE := n 38 - 39 42 # 40 43 # Shared build commands. 41 44 # ··· 45 52 cmd_vdsoas_o_S = $(CC) $(a_flags) -c -o $@ $< 46 53 47 54 # Generate VDSO offsets using helper script 48 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 55 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 49 56 quiet_cmd_vdsosym = VDSOSYM $@ 50 57 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 51 58
-6
arch/mips/boot/compressed/Makefile
··· 34 34 -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ 35 35 -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) 36 36 37 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 38 - KCOV_INSTRUMENT := n 39 - GCOV_PROFILE := n 40 - UBSAN_SANITIZE := n 41 - KCSAN_SANITIZE := n 42 - 43 37 # decompressor objects (linked with vmlinuz) 44 38 vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o 45 39
+1 -1
arch/mips/kernel/syscalls/Makefile
··· 5 5 $(shell mkdir -p $(uapi) $(kapi)) 6 6 7 7 syshdr := $(srctree)/scripts/syscallhdr.sh 8 - sysnr := $(srctree)/$(src)/syscallnr.sh 8 + sysnr := $(src)/syscallnr.sh 9 9 systbl := $(srctree)/scripts/syscalltbl.sh 10 10 11 11 quiet_cmd_syshdr = SYSHDR $@
+2 -9
arch/mips/vdso/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # Objects to go into the VDSO. 3 3 4 - # Sanitizer runtimes are unavailable and cannot be linked here. 5 - KCSAN_SANITIZE := n 6 - 7 4 # Include the generic Makefile to check the built vdso. 8 5 include $(srctree)/lib/vdso/Makefile 9 6 ··· 40 43 # config-n32-o32-env.c prepares the environment to build a 32bit vDSO 41 44 # library on a 64bit kernel. 42 45 # Note: Needs to be included before than the generic library. 43 - CFLAGS_vgettimeofday-o32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 44 - CFLAGS_vgettimeofday-n32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 46 + CFLAGS_vgettimeofday-o32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 47 + CFLAGS_vgettimeofday-n32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) 45 48 endif 46 49 47 50 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) ··· 56 59 -G 0 --eh-frame-hdr --hash-style=sysv --build-id=sha1 -T 57 60 58 61 CFLAGS_REMOVE_vdso.o = $(CC_FLAGS_FTRACE) 59 - 60 - GCOV_PROFILE := n 61 - UBSAN_SANITIZE := n 62 - KCOV_INSTRUMENT := n 63 62 64 63 # Check that we don't have PIC 'jalr t9' calls left 65 64 quiet_cmd_vdso_mips_check = VDSOCHK $@
+1 -2
arch/nios2/boot/dts/Makefile
··· 2 2 3 3 obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE)) 4 4 5 - dtstree := $(srctree)/$(src) 6 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 5 + dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
-4
arch/parisc/boot/compressed/Makefile
··· 5 5 # create a compressed self-extracting vmlinux image from the original vmlinux 6 6 # 7 7 8 - KCOV_INSTRUMENT := n 9 - GCOV_PROFILE := n 10 - UBSAN_SANITIZE := n 11 - 12 8 OBJECTS := head.o real2.o firmware.o misc.o piggy.o 13 9 targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 14 10 targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
+2 -7
arch/parisc/kernel/vdso32/Makefile
··· 26 26 27 27 # Force dependency (incbin is bad) 28 28 # link rule for the .so file, .lds has to be first 29 - $(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(obj-cvdso32) $(VDSO_LIBGCC) FORCE 29 + $(obj)/vdso32.so: $(obj)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE 30 30 $(call if_changed,vdso32ld) 31 31 32 32 # assembly rules for the .S files 33 33 $(obj-vdso32): %.o: %.S FORCE 34 34 $(call if_changed_dep,vdso32as) 35 35 36 - $(obj-cvdso32): %.o: %.c FORCE 37 - $(call if_changed_dep,vdso32cc) 38 - 39 36 # actual build commands 40 37 quiet_cmd_vdso32ld = VDSO32L $@ 41 38 cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@ 42 39 quiet_cmd_vdso32as = VDSO32A $@ 43 40 cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< 44 - quiet_cmd_vdso32cc = VDSO32C $@ 45 - cmd_vdso32cc = $(CROSS32CC) $(c_flags) -c -fPIC -mno-fast-indirect-calls -o $@ $< 46 41 47 42 # Generate VDSO offsets using helper script 48 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 43 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 49 44 quiet_cmd_vdsosym = VDSOSYM $@ 50 45 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 51 46
+2 -2
arch/parisc/kernel/vdso64/Makefile
··· 26 26 27 27 # Force dependency (incbin is bad) 28 28 # link rule for the .so file, .lds has to be first 29 - $(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE 29 + $(obj)/vdso64.so: $(obj)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE 30 30 $(call if_changed,vdso64ld) 31 31 32 32 # assembly rules for the .S files ··· 40 40 cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< 41 41 42 42 # Generate VDSO offsets using helper script 43 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 43 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 44 44 quiet_cmd_vdsosym = VDSOSYM $@ 45 45 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 46 46
+3 -3
arch/powerpc/boot/Makefile
··· 218 218 $(obj)/empty.c: 219 219 $(Q)touch $@ 220 220 221 - $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S 221 + $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(src)/%.S 222 222 $(Q)cp $< $@ 223 223 224 224 clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \ ··· 252 252 extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 253 253 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds 254 254 255 - dtstree := $(srctree)/$(src)/dts 255 + dtstree := $(src)/dts 256 256 257 - wrapper :=$(srctree)/$(src)/wrapper 257 + wrapper := $(src)/wrapper 258 258 wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ 259 259 $(wrapper) FORCE 260 260
+1 -2
arch/powerpc/boot/dts/Makefile
··· 2 2 3 3 subdir-y += fsl 4 4 5 - dtstree := $(srctree)/$(src) 6 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 5 + dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+1 -2
arch/powerpc/boot/dts/fsl/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - dtstree := $(srctree)/$(src) 4 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 3 + dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+4 -12
arch/powerpc/kernel/vdso/Makefile
··· 47 47 targets += $(obj-vdso64) vdso64.so.dbg vgettimeofday-64.o 48 48 obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) 49 49 50 - GCOV_PROFILE := n 51 - KCOV_INSTRUMENT := n 52 - UBSAN_SANITIZE := n 53 - KASAN_SANITIZE := n 54 - KCSAN_SANITIZE := n 55 - 56 50 ccflags-y := -fno-common -fno-builtin 57 51 ldflags-y := -Wl,--hash-style=both -nostdlib -shared -z noexecstack $(CLANG_FLAGS) 58 52 ldflags-$(CONFIG_LD_IS_LLD) += $(call cc-option,--ld-path=$(LD),-fuse-ld=lld) ··· 68 74 CPPFLAGS_vdso64.lds += -P -C 69 75 70 76 # link rule for the .so file, .lds has to be first 71 - $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o FORCE 77 + $(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o FORCE 72 78 $(call if_changed,vdso32ld_and_check) 73 - $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE 79 + $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE 74 80 $(call if_changed,vdso64ld_and_check) 75 81 76 82 # assembly rules for the .S files ··· 84 90 $(call if_changed_dep,cc_o_c) 85 91 86 92 # Generate VDSO offsets using helper script 87 - gen-vdso32sym := $(srctree)/$(src)/gen_vdso32_offsets.sh 93 + gen-vdso32sym := $(src)/gen_vdso32_offsets.sh 88 94 quiet_cmd_vdso32sym = VDSO32SYM $@ 89 95 cmd_vdso32sym = $(NM) $< | $(gen-vdso32sym) | LC_ALL=C sort > $@ 90 - gen-vdso64sym := $(srctree)/$(src)/gen_vdso64_offsets.sh 96 + gen-vdso64sym := $(src)/gen_vdso64_offsets.sh 91 97 quiet_cmd_vdso64sym = VDSO64SYM $@ 92 98 cmd_vdso64sym = $(NM) $< | $(gen-vdso64sym) | LC_ALL=C sort > $@ 93 99 ··· 108 114 cmd_vdso64ld_and_check = $(VDSOCC) $(ldflags-y) $(LD64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^); $(cmd_vdso_check) 109 115 quiet_cmd_vdso64as = VDSO64A $@ 110 116 cmd_vdso64as = $(VDSOCC) $(a_flags) $(AS64FLAGS) -c -o $@ $< 111 - 112 - OBJECT_FILES_NON_STANDARD := y
-3
arch/powerpc/purgatory/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - KASAN_SANITIZE := n 4 - KCSAN_SANITIZE := n 5 - 6 3 targets += trampoline_$(BITS).o purgatory.ro 7 4 8 5 # When profile-guided optimization is enabled, llvm emits two different
-2
arch/riscv/boot/Makefile
··· 14 14 # Based on the ia64 and arm64 boot/Makefile. 15 15 # 16 16 17 - KCOV_INSTRUMENT := n 18 - 19 17 OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 20 18 OBJCOPYFLAGS_loader.bin :=-O binary 21 19 OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
+1 -7
arch/riscv/kernel/compat_vdso/Makefile
··· 34 34 obj-y += compat_vdso.o 35 35 CPPFLAGS_compat_vdso.lds += -P -C -DCOMPAT_VDSO -U$(ARCH) 36 36 37 - # Disable profiling and instrumentation for VDSO code 38 - GCOV_PROFILE := n 39 - KCOV_INSTRUMENT := n 40 - KASAN_SANITIZE := n 41 - UBSAN_SANITIZE := n 42 - 43 37 # Force dependency 44 38 $(obj)/compat_vdso.o: $(obj)/compat_vdso.so 45 39 ··· 52 58 $(call if_changed,objcopy) 53 59 54 60 # Generate VDSO offsets using helper script 55 - gen-compat_vdsosym := $(srctree)/$(src)/gen_compat_vdso_offsets.sh 61 + gen-compat_vdsosym := $(src)/gen_compat_vdso_offsets.sh 56 62 quiet_cmd_compat_vdsosym = VDSOSYM $@ 57 63 cmd_compat_vdsosym = $(NM) $< | $(gen-compat_vdsosym) | LC_ALL=C sort > $@ 58 64
-6
arch/riscv/kernel/pi/Makefile
··· 17 17 CFLAGS_cmdline_early.o += -D__NO_FORTIFY 18 18 CFLAGS_lib-fdt_ro.o += -D__NO_FORTIFY 19 19 20 - GCOV_PROFILE := n 21 - KASAN_SANITIZE := n 22 - KCSAN_SANITIZE := n 23 - UBSAN_SANITIZE := n 24 - KCOV_INSTRUMENT := n 25 - 26 20 $(obj)/%.pi.o: OBJCOPYFLAGS := --prefix-symbols=__pi_ \ 27 21 --remove-section=.note.gnu.property \ 28 22 --prefix-alloc-sections=.init.pi
+1 -7
arch/riscv/kernel/vdso/Makefile
··· 39 39 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) 40 40 CFLAGS_REMOVE_hwprobe.o = $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) 41 41 42 - # Disable profiling and instrumentation for VDSO code 43 - GCOV_PROFILE := n 44 - KCOV_INSTRUMENT := n 45 - KASAN_SANITIZE := n 46 - UBSAN_SANITIZE := n 47 - 48 42 # Force dependency 49 43 $(obj)/vdso.o: $(obj)/vdso.so 50 44 ··· 54 60 $(call if_changed,objcopy) 55 61 56 62 # Generate VDSO offsets using helper script 57 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 63 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 58 64 quiet_cmd_vdsosym = VDSOSYM $@ 59 65 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 60 66
+1 -1
arch/riscv/kvm/Makefile
··· 3 3 # Makefile for RISC-V KVM support 4 4 # 5 5 6 - ccflags-y += -I $(srctree)/$(src) 6 + ccflags-y += -I $(src) 7 7 8 8 include $(srctree)/virt/kvm/Makefile.kvm 9 9
-8
arch/riscv/purgatory/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - OBJECT_FILES_NON_STANDARD := y 3 2 4 3 purgatory-y := purgatory.o sha256.o entry.o string.o ctype.o memcpy.o memset.o 5 4 purgatory-y += strcmp.o strlen.o strncmp.o ··· 45 46 LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS) 46 47 LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS) 47 48 targets += purgatory.ro purgatory.chk 48 - 49 - # Sanitizer, etc. runtimes are unavailable and cannot be linked here. 50 - GCOV_PROFILE := n 51 - KASAN_SANITIZE := n 52 - UBSAN_SANITIZE := n 53 - KCSAN_SANITIZE := n 54 - KCOV_INSTRUMENT := n 55 49 56 50 # These are adjustments to the compiler flags used for objects that 57 51 # make up the standalone purgatory.ro
+2 -2
arch/s390/kernel/syscalls/Makefile
··· 4 4 kapi := $(gen)/asm 5 5 uapi := $(gen)/uapi/asm 6 6 7 - syscall := $(srctree)/$(src)/syscall.tbl 8 - systbl := $(srctree)/$(src)/syscalltbl 7 + syscall := $(src)/syscall.tbl 8 + systbl := $(src)/syscalltbl 9 9 10 10 gen-y := $(kapi)/syscall_table.h 11 11 kapi-hdrs-y := $(kapi)/unistd_nr.h
+2 -10
arch/s390/kernel/vdso32/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # List of files in the vdso 3 3 4 - KCOV_INSTRUMENT := n 5 - 6 4 # Include the generic Makefile to check the built vdso. 7 5 include $(srctree)/lib/vdso/Makefile 8 6 obj-vdso32 = vdso_user_wrapper-32.o note-32.o ··· 30 32 targets += vdso32.lds 31 33 CPPFLAGS_vdso32.lds += -P -C -U$(ARCH) 32 34 33 - # Disable gcov profiling, ubsan and kasan for VDSO code 34 - GCOV_PROFILE := n 35 - UBSAN_SANITIZE := n 36 - KASAN_SANITIZE := n 37 - KCSAN_SANITIZE := n 38 - 39 35 # Force dependency (incbin is bad) 40 36 $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so 41 37 42 38 quiet_cmd_vdso_and_check = VDSO $@ 43 39 cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check) 44 40 45 - $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE 41 + $(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) FORCE 46 42 $(call if_changed,vdso_and_check) 47 43 48 44 # strip rule for the .so file ··· 54 62 cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $< 55 63 56 64 # Generate VDSO offsets using helper script 57 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 65 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 58 66 quiet_cmd_vdsosym = VDSOSYM $@ 59 67 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 60 68
+2 -10
arch/s390/kernel/vdso64/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # List of files in the vdso 3 3 4 - KCOV_INSTRUMENT := n 5 - 6 4 # Include the generic Makefile to check the built vdso. 7 5 include $(srctree)/lib/vdso/Makefile 8 6 obj-vdso64 = vdso_user_wrapper.o note.o ··· 35 37 targets += vdso64.lds 36 38 CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) 37 39 38 - # Disable gcov profiling, ubsan and kasan for VDSO code 39 - GCOV_PROFILE := n 40 - UBSAN_SANITIZE := n 41 - KASAN_SANITIZE := n 42 - KCSAN_SANITIZE := n 43 - 44 40 # Force dependency (incbin is bad) 45 41 $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so 46 42 ··· 42 50 cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check) 43 51 44 52 # link rule for the .so file, .lds has to be first 45 - $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj-cvdso64) FORCE 53 + $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj-cvdso64) FORCE 46 54 $(call if_changed,vdso_and_check) 47 55 48 56 # strip rule for the .so file ··· 64 72 cmd_vdso64cc = $(CC) $(c_flags) -c -o $@ $< 65 73 66 74 # Generate VDSO offsets using helper script 67 - gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh 75 + gen-vdsosym := $(src)/gen_vdso_offsets.sh 68 76 quiet_cmd_vdsosym = VDSOSYM $@ 69 77 cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ 70 78
-8
arch/s390/purgatory/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - OBJECT_FILES_NON_STANDARD := y 4 - 5 3 purgatory-y := head.o purgatory.o string.o sha256.o mem.o 6 4 7 5 targets += $(purgatory-y) purgatory.lds purgatory purgatory.chk purgatory.ro ··· 12 14 13 15 $(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE 14 16 $(call if_changed_rule,as_o_S) 15 - 16 - KCOV_INSTRUMENT := n 17 - GCOV_PROFILE := n 18 - UBSAN_SANITIZE := n 19 - KASAN_SANITIZE := n 20 - KCSAN_SANITIZE := n 21 17 22 18 KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes 23 19 KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
+5 -1
arch/sh/Kconfig
··· 710 710 711 711 choice 712 712 prompt "Kernel command line" 713 - optional 714 713 default CMDLINE_OVERWRITE 715 714 help 716 715 Setting this option allows the kernel command line arguments ··· 726 727 help 727 728 Given string will be concatenated with arguments passed in 728 729 by a bootloader. 730 + 731 + config CMDLINE_FROM_BOOTLOADER 732 + bool "Use bootloader kernel arguments" 733 + help 734 + Uses the command-line options passed by the boot loader. 729 735 730 736 endchoice 731 737
-3
arch/sh/boot/compressed/Makefile
··· 11 11 targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ 12 12 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo $(OBJECTS) 13 13 14 - GCOV_PROFILE := n 15 - UBSAN_SANITIZE := n 16 - 17 14 # 18 15 # IMAGE_OFFSET is the load offset of the compression loader 19 16 #
+1
arch/sh/configs/apsh4a3a_defconfig
··· 15 15 CONFIG_FLATMEM_MANUAL=y 16 16 CONFIG_SH_STORE_QUEUES=y 17 17 CONFIG_SH_APSH4A3A=y 18 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 18 19 CONFIG_HIGH_RES_TIMERS=y 19 20 CONFIG_KEXEC=y 20 21 CONFIG_PREEMPT=y
+1
arch/sh/configs/apsh4ad0a_defconfig
··· 42 42 CONFIG_PREEMPT=y 43 43 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 44 44 CONFIG_BINFMT_MISC=y 45 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 45 46 CONFIG_PM=y 46 47 CONFIG_PM_DEBUG=y 47 48 CONFIG_PM=y
+1
arch/sh/configs/edosk7705_defconfig
··· 19 19 CONFIG_CPU_SUBTYPE_SH7705=y 20 20 CONFIG_SH_EDOSK7705=y 21 21 CONFIG_SH_PCLK_FREQ=31250000 22 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 22 23 # CONFIG_PREVENT_FIRMWARE_BUILD is not set 23 24 # CONFIG_INPUT is not set 24 25 # CONFIG_SERIO is not set
+1
arch/sh/configs/hp6xx_defconfig
··· 15 15 CONFIG_HD64461_ENABLER=y 16 16 CONFIG_PCCARD=y 17 17 CONFIG_PM=y 18 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 18 19 CONFIG_APM_EMULATION=y 19 20 # CONFIG_STANDALONE is not set 20 21 CONFIG_BLK_DEV_SD=y
+1
arch/sh/configs/landisk_defconfig
··· 15 15 CONFIG_PCI=y 16 16 CONFIG_PCCARD=y 17 17 CONFIG_YENTA=y 18 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 18 19 CONFIG_NET=y 19 20 CONFIG_PACKET=y 20 21 CONFIG_UNIX=y
+1
arch/sh/configs/magicpanelr2_defconfig
··· 22 22 CONFIG_SH_DMA=y 23 23 CONFIG_SH_DMA_API=y 24 24 CONFIG_HEARTBEAT=y 25 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 25 26 CONFIG_NET=y 26 27 CONFIG_PACKET=y 27 28 CONFIG_UNIX=y
+1
arch/sh/configs/rsk7264_defconfig
··· 21 21 CONFIG_FLATMEM_MANUAL=y 22 22 CONFIG_CPU_BIG_ENDIAN=y 23 23 CONFIG_SH_RSK=y 24 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 24 25 # CONFIG_SH_TIMER_MTU2 is not set 25 26 CONFIG_BINFMT_FLAT=y 26 27 CONFIG_NET=y
+1
arch/sh/configs/rsk7269_defconfig
··· 10 10 CONFIG_FLATMEM_MANUAL=y 11 11 CONFIG_CPU_BIG_ENDIAN=y 12 12 CONFIG_SH_RSK=y 13 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 13 14 # CONFIG_SH_TIMER_MTU2 is not set 14 15 CONFIG_SH_PCLK_FREQ=66700000 15 16 CONFIG_BINFMT_FLAT=y
+1
arch/sh/configs/se7619_defconfig
··· 14 14 CONFIG_CPU_BIG_ENDIAN=y 15 15 CONFIG_SH_7619_SOLUTION_ENGINE=y 16 16 CONFIG_HZ_100=y 17 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 17 18 CONFIG_BINFMT_FLAT=y 18 19 CONFIG_BINFMT_ZFLAT=y 19 20 # CONFIG_STANDALONE is not set
+1
arch/sh/configs/se7705_defconfig
··· 13 13 # CONFIG_SH_ADC is not set 14 14 CONFIG_SH_SOLUTION_ENGINE=y 15 15 CONFIG_HEARTBEAT=y 16 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 16 17 CONFIG_PREEMPT=y 17 18 CONFIG_NET=y 18 19 CONFIG_PACKET=y
+1
arch/sh/configs/se7722_defconfig
··· 17 17 CONFIG_NO_HZ=y 18 18 CONFIG_HIGH_RES_TIMERS=y 19 19 CONFIG_HEARTBEAT=y 20 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 20 21 CONFIG_KEXEC=y 21 22 CONFIG_PREEMPT=y 22 23 CONFIG_NET=y
+1
arch/sh/configs/se7750_defconfig
··· 15 15 CONFIG_SH_SOLUTION_ENGINE=y 16 16 CONFIG_SH_PCLK_FREQ=33333333 17 17 CONFIG_HEARTBEAT=y 18 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 18 19 CONFIG_NET=y 19 20 CONFIG_PACKET=y 20 21 CONFIG_UNIX=y
+1
arch/sh/configs/secureedge5410_defconfig
··· 10 10 CONFIG_SH_DMA=y 11 11 CONFIG_SH_DMA_API=y 12 12 CONFIG_PCI=y 13 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 13 14 CONFIG_NET=y 14 15 CONFIG_INET=y 15 16 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+1
arch/sh/configs/sh7710voipgw_defconfig
··· 15 15 CONFIG_FLATMEM_MANUAL=y 16 16 # CONFIG_SH_ADC is not set 17 17 CONFIG_SH_PCLK_FREQ=32768000 18 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 18 19 CONFIG_NET=y 19 20 CONFIG_PACKET=y 20 21 CONFIG_UNIX=y
+1
arch/sh/configs/sh7724_generic_defconfig
··· 12 12 CONFIG_SH_CPU_FREQ=y 13 13 CONFIG_KEXEC=y 14 14 CONFIG_KEXEC_JUMP=y 15 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 15 16 CONFIG_HIBERNATION=y 16 17 CONFIG_CPU_IDLE=y 17 18 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+1
arch/sh/configs/sh7770_generic_defconfig
··· 14 14 CONFIG_KEXEC=y 15 15 CONFIG_KEXEC_JUMP=y 16 16 CONFIG_PM=y 17 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 17 18 CONFIG_HIBERNATION=y 18 19 CONFIG_CPU_IDLE=y 19 20 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
+1
arch/sh/configs/sh7785lcr_32bit_defconfig
··· 32 32 CONFIG_INTC_USERIMASK=y 33 33 CONFIG_PCI=y 34 34 CONFIG_PCI_DEBUG=y 35 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 35 36 CONFIG_PM=y 36 37 CONFIG_CPU_IDLE=y 37 38 CONFIG_NET=y
+1
arch/sh/configs/sh7785lcr_defconfig
··· 17 17 CONFIG_KEXEC=y 18 18 CONFIG_PREEMPT=y 19 19 CONFIG_PCI=y 20 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 20 21 CONFIG_NET=y 21 22 CONFIG_PACKET=y 22 23 CONFIG_UNIX=y
+1
arch/sh/configs/urquell_defconfig
··· 34 34 CONFIG_PCIEASPM_DEBUG=y 35 35 CONFIG_PCI_DEBUG=y 36 36 CONFIG_BINFMT_MISC=y 37 + CONFIG_CMDLINE_FROM_BOOTLOADER=y 37 38 CONFIG_PM=y 38 39 CONFIG_CPU_IDLE=y 39 40 CONFIG_NET=y
+2 -2
arch/sh/kernel/vsyscall/Makefile
··· 19 19 SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) 20 20 21 21 $(obj)/vsyscall-trapa.so: \ 22 - $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE 22 + $(obj)/vsyscall-%.so: $(obj)/vsyscall.lds $(obj)/vsyscall-%.o FORCE 23 23 $(call if_changed,syscall) 24 24 25 25 # We also create a special relocatable object that should mirror the symbol 26 26 # table and layout of the linked DSO. With ld -R we can then refer to 27 27 # these symbols in the kernel code rather than hand-coded addresses. 28 28 SYSCFLAGS_vsyscall-dummy.o = -r 29 - $(obj)/vsyscall-dummy.o: $(src)/vsyscall.lds \ 29 + $(obj)/vsyscall-dummy.o: $(obj)/vsyscall.lds \ 30 30 $(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE 31 31 $(call if_changed,syscall) 32 32
+1 -3
arch/sparc/vdso/Makefile
··· 2 2 # 3 3 # Building vDSO images for sparc. 4 4 # 5 - UBSAN_SANITIZE := n 6 5 7 6 # files to link into the vdso 8 7 vobjs-y := vdso-note.o vclock_gettime.o ··· 102 103 cmd_vdso = $(LD) -nostdlib -o $@ \ 103 104 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 104 105 -T $(filter %.lds,$^) $(filter %.o,$^) && \ 105 - sh $(srctree)/$(src)/checkundef.sh '$(OBJDUMP)' '$@' 106 + sh $(src)/checkundef.sh '$(OBJDUMP)' '$@' 106 107 107 108 VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic 108 - GCOV_PROFILE := n
+1 -1
arch/um/kernel/Makefile
··· 47 47 $(call if_changed,quote2) 48 48 49 49 quiet_cmd_mkcapflags = MKCAP $@ 50 - cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/../../x86/kernel/cpu/mkcapflags.sh $@ $^ 50 + cmd_mkcapflags = $(CONFIG_SHELL) $(src)/../../x86/kernel/cpu/mkcapflags.sh $@ $^ 51 51 52 52 cpufeature = $(src)/../../x86/include/asm/cpufeatures.h 53 53 vmxfeature = $(src)/../../x86/include/asm/vmxfeatures.h
+1 -16
arch/x86/boot/Makefile
··· 9 9 # Changed by many, many contributors over the years. 10 10 # 11 11 12 - # Sanitizer runtimes are unavailable and cannot be linked for early boot code. 13 - KASAN_SANITIZE := n 14 - KCSAN_SANITIZE := n 15 - KMSAN_SANITIZE := n 16 - OBJECT_FILES_NON_STANDARD := y 17 - 18 - # Kernel does not boot with kcov instrumentation here. 19 - # One of the problems observed was insertion of __sanitizer_cov_trace_pc() 20 - # callback into middle of per-cpu data enabling code. Thus the callback observed 21 - # inconsistent state and crashed. We are interested mostly in syscall coverage, 22 - # so boot code is not interesting anyway. 23 - KCOV_INSTRUMENT := n 24 - 25 12 # If you want to preset the SVGA mode, uncomment the next line and 26 13 # set SVGA_MODE to whatever number you want. 27 14 # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode. ··· 56 69 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 57 70 KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) 58 71 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 59 - GCOV_PROFILE := n 60 - UBSAN_SANITIZE := n 61 72 62 73 $(obj)/bzImage: asflags-y := $(SVGA_MODE) 63 74 ··· 114 129 # genimage.sh requires bash, but it also has a bunch of other 115 130 # external dependencies. 116 131 quiet_cmd_genimage = GENIMAGE $3 117 - cmd_genimage = $(BASH) $(srctree)/$(src)/genimage.sh $2 $3 $(obj)/bzImage \ 132 + cmd_genimage = $(BASH) $(src)/genimage.sh $2 $3 $(obj)/bzImage \ 118 133 $(obj)/mtools.conf '$(FDARGS)' $(FDINITRD) 119 134 120 135 PHONY += bzdisk fdimage fdimage144 fdimage288 hdimage isoimage
-11
arch/x86/boot/compressed/Makefile
··· 17 17 # (see scripts/Makefile.lib size_append) 18 18 # compressed vmlinux.bin.all + u32 size of vmlinux.bin.all 19 19 20 - # Sanitizer runtimes are unavailable and cannot be linked for early boot code. 21 - KASAN_SANITIZE := n 22 - KCSAN_SANITIZE := n 23 - KMSAN_SANITIZE := n 24 - OBJECT_FILES_NON_STANDARD := y 25 - 26 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 27 - KCOV_INSTRUMENT := n 28 - 29 20 targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ 30 21 vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 vmlinux.bin.zst 31 22 ··· 50 59 CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/ 51 60 52 61 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 53 - GCOV_PROFILE := n 54 - UBSAN_SANITIZE :=n 55 62 56 63 KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) 57 64 KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info)
+1 -27
arch/x86/entry/vdso/Makefile
··· 6 6 # Include the generic Makefile to check the built vDSO: 7 7 include $(srctree)/lib/vdso/Makefile 8 8 9 - # Sanitizer runtimes are unavailable and cannot be linked here. 10 - KASAN_SANITIZE := n 11 - KMSAN_SANITIZE_vclock_gettime.o := n 12 - KMSAN_SANITIZE_vdso32/vclock_gettime.o := n 13 - KMSAN_SANITIZE_vgetcpu.o := n 14 - KMSAN_SANITIZE_vdso32/vgetcpu.o := n 15 - 16 - UBSAN_SANITIZE := n 17 - KCSAN_SANITIZE := n 18 - OBJECT_FILES_NON_STANDARD := y 19 - 20 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 21 - KCOV_INSTRUMENT := n 22 - 23 9 # Files to link into the vDSO: 24 10 vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o 25 11 vobjs32-y := vdso32/note.o vdso32/system_call.o vdso32/sigreturn.o ··· 14 28 15 29 # Files to link into the kernel: 16 30 obj-y += vma.o extable.o 17 - KASAN_SANITIZE_vma.o := y 18 - UBSAN_SANITIZE_vma.o := y 19 - KCSAN_SANITIZE_vma.o := y 20 - 21 - OBJECT_FILES_NON_STANDARD_vma.o := n 22 - OBJECT_FILES_NON_STANDARD_extable.o := n 23 31 24 32 # vDSO images to build: 25 33 obj-$(CONFIG_X86_64) += vdso-image-64.o 26 34 obj-$(CONFIG_X86_X32_ABI) += vdso-image-x32.o 27 35 obj-$(CONFIG_COMPAT_32) += vdso-image-32.o vdso32-setup.o 28 - 29 - OBJECT_FILES_NON_STANDARD_vdso-image-32.o := n 30 - OBJECT_FILES_NON_STANDARD_vdso-image-x32.o := n 31 - OBJECT_FILES_NON_STANDARD_vdso-image-64.o := n 32 - OBJECT_FILES_NON_STANDARD_vdso32-setup.o := n 33 36 34 37 vobjs := $(addprefix $(obj)/, $(vobjs-y)) 35 38 vobjs32 := $(addprefix $(obj)/, $(vobjs32-y)) ··· 151 176 cmd_vdso = $(LD) -o $@ \ 152 177 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 153 178 -T $(filter %.lds,$^) $(filter %.o,$^) && \ 154 - sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' 179 + sh $(src)/checkundef.sh '$(NM)' '$@' 155 180 156 181 VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 \ 157 182 $(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack 158 - GCOV_PROFILE := n 159 183 160 184 quiet_cmd_vdso_and_check = VDSO $@ 161 185 cmd_vdso_and_check = $(cmd_vdso); $(cmd_vdso_check)
+1 -1
arch/x86/kernel/Makefile
··· 40 40 KCOV_INSTRUMENT_head$(BITS).o := n 41 41 KCOV_INSTRUMENT_sev.o := n 42 42 43 - CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace 43 + CFLAGS_irq.o := -I $(src)/../include/asm/trace 44 44 45 45 obj-y += head_$(BITS).o 46 46 obj-y += head$(BITS).o
+1 -1
arch/x86/kernel/cpu/Makefile
··· 60 60 obj-$(CONFIG_DEBUG_FS) += debugfs.o 61 61 62 62 quiet_cmd_mkcapflags = MKCAP $@ 63 - cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^ 63 + cmd_mkcapflags = $(CONFIG_SHELL) $(src)/mkcapflags.sh $@ $^ 64 64 65 65 cpufeature = $(src)/../../include/asm/cpufeatures.h 66 66 vmxfeature = $(src)/../../include/asm/vmxfeatures.h
+1 -1
arch/x86/mm/Makefile
··· 34 34 CFLAGS_physaddr.o := -fno-stack-protector 35 35 CFLAGS_mem_encrypt_identity.o := -fno-stack-protector 36 36 37 - CFLAGS_fault.o := -I $(srctree)/$(src)/../include/asm/trace 37 + CFLAGS_fault.o := -I $(src)/../include/asm/trace 38 38 39 39 obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o 40 40
-9
arch/x86/purgatory/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - OBJECT_FILES_NON_STANDARD := y 3 2 4 3 purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string.o 5 4 ··· 28 29 LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS) 29 30 LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS) 30 31 targets += purgatory.ro purgatory.chk 31 - 32 - # Sanitizer, etc. runtimes are unavailable and cannot be linked here. 33 - GCOV_PROFILE := n 34 - KASAN_SANITIZE := n 35 - UBSAN_SANITIZE := n 36 - KCSAN_SANITIZE := n 37 - KMSAN_SANITIZE := n 38 - KCOV_INSTRUMENT := n 39 32 40 33 # These are adjustments to the compiler flags used for objects that 41 34 # make up the standalone purgatory.ro
-11
arch/x86/realmode/rm/Makefile
··· 7 7 # 8 8 # 9 9 10 - # Sanitizer runtimes are unavailable and cannot be linked here. 11 - KASAN_SANITIZE := n 12 - KCSAN_SANITIZE := n 13 - KMSAN_SANITIZE := n 14 - OBJECT_FILES_NON_STANDARD := y 15 - 16 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 17 - KCOV_INSTRUMENT := n 18 - 19 10 always-y := realmode.bin realmode.relocs 20 11 21 12 wakeup-objs := wakeup_asm.o wakemain.o video-mode.o ··· 67 76 -I$(srctree)/arch/x86/boot 68 77 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 69 78 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 70 - GCOV_PROFILE := n 71 - UBSAN_SANITIZE := n
+1 -8
arch/x86/um/vdso/Makefile
··· 3 3 # Building vDSO images for x86. 4 4 # 5 5 6 - # do not instrument on vdso because KASAN is not compatible with user mode 7 - KASAN_SANITIZE := n 8 - 9 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 10 - KCOV_INSTRUMENT := n 11 - 12 6 VDSO64-y := y 13 7 14 8 vdso-install-$(VDSO64-y) += vdso.so ··· 57 63 cmd_vdso = $(CC) -nostdlib -o $@ \ 58 64 $(CC_FLAGS_LTO) $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 59 65 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ 60 - sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' 66 + sh $(src)/checkundef.sh '$(NM)' '$@' 61 67 62 68 VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack 63 - GCOV_PROFILE := n
+1 -2
arch/xtensa/boot/dts/Makefile
··· 10 10 obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE)) 11 11 12 12 # for CONFIG_OF_ALL_DTBS test 13 - dtstree := $(srctree)/$(src) 14 - dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts)) 13 + dtb- := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+2 -2
certs/Makefile
··· 13 13 quiet_cmd_check_and_copy_blacklist_hash_list = GEN $@ 14 14 cmd_check_and_copy_blacklist_hash_list = \ 15 15 $(if $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST), \ 16 - $(AWK) -f $(srctree)/$(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \ 16 + $(AWK) -f $(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \ 17 17 { cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST); echo $(comma) NULL; } > $@, \ 18 18 echo NULL > $@) 19 19 ··· 55 55 targets += signing_key.pem 56 56 57 57 quiet_cmd_copy_x509_config = COPY $@ 58 - cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@ 58 + cmd_copy_x509_config = cat $(src)/default_x509.genkey > $@ 59 59 60 60 # You can provide your own config file. If not present, copy the default one. 61 61 $(obj)/x509.genkey:
-5
drivers/Makefile
··· 6 6 # Rewritten to use lists instead of if-statements. 7 7 # 8 8 9 - # Some driver Makefiles miss $(srctree)/ for include directive. 10 - ifdef building_out_of_srctree 11 - MAKEFLAGS += --include-dir=$(srctree) 12 - endif 13 - 14 9 obj-y += cache/ 15 10 obj-y += irqchip/ 16 11 obj-y += bus/
+1 -1
drivers/crypto/intel/qat/qat_420xx/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_420XX) += qat_420xx.o 4 4 qat_420xx-objs := adf_drv.o adf_420xx_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_4xxx/Makefile
··· 1 1 # SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_4XXX) += qat_4xxx.o 4 4 qat_4xxx-objs := adf_drv.o adf_4xxx_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c3xxx/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXX) += qat_c3xxx.o 4 4 qat_c3xxx-objs := adf_drv.o adf_c3xxx_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c3xxxvf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXXVF) += qat_c3xxxvf.o 4 4 qat_c3xxxvf-objs := adf_drv.o adf_c3xxxvf_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c62x/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C62X) += qat_c62x.o 4 4 qat_c62x-objs := adf_drv.o adf_c62x_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_c62xvf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_C62XVF) += qat_c62xvf.o 4 4 qat_c62xvf-objs := adf_drv.o adf_c62xvf_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_dh895xcc/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCC) += qat_dh895xcc.o 4 4 qat_dh895xcc-objs := adf_drv.o adf_dh895xcc_hw_data.o
+1 -1
drivers/crypto/intel/qat/qat_dh895xccvf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../qat_common 2 + ccflags-y := -I $(src)/../qat_common 3 3 obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCCVF) += qat_dh895xccvf.o 4 4 qat_dh895xccvf-objs := adf_drv.o adf_dh895xccvf_hw_data.o
-11
drivers/firmware/efi/libstub/Makefile
··· 56 56 # disable LTO 57 57 KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) 58 58 59 - GCOV_PROFILE := n 60 - # Sanitizer runtimes are unavailable and cannot be linked here. 61 - KASAN_SANITIZE := n 62 - KCSAN_SANITIZE := n 63 - KMSAN_SANITIZE := n 64 - UBSAN_SANITIZE := n 65 - OBJECT_FILES_NON_STANDARD := y 66 - 67 - # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 68 - KCOV_INSTRUMENT := n 69 - 70 59 lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \ 71 60 file.o mem.o random.o randomalloc.o pci.o \ 72 61 skip_spaces.o lib-cmdline.o lib-ctype.o \
+1 -1
drivers/gpu/drm/amd/amdgpu/Makefile
··· 23 23 # Makefile for the drm device driver. This driver provides support for the 24 24 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 25 25 26 - FULL_AMD_PATH=$(srctree)/$(src)/.. 26 + FULL_AMD_PATH=$(src)/.. 27 27 DISPLAY_FOLDER_NAME=display 28 28 FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME) 29 29
+2 -2
drivers/gpu/drm/arm/display/komeda/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 3 ccflags-y := \ 4 - -I $(srctree)/$(src)/../include \ 5 - -I $(srctree)/$(src) 4 + -I $(src)/../include \ 5 + -I $(src) 6 6 7 7 komeda-y := \ 8 8 komeda_drv.o \
+2 -2
drivers/gpu/drm/i915/Makefile
··· 36 36 # drivers. Define I915 when building i915. 37 37 subdir-ccflags-y += -DI915 38 38 39 - subdir-ccflags-y += -I$(srctree)/$(src) 39 + subdir-ccflags-y += -I$(src) 40 40 41 41 # Please keep these build lists sorted! 42 42 ··· 430 430 431 431 always-$(CONFIG_DRM_I915_WERROR) += \ 432 432 $(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \ 433 - $(shell cd $(srctree)/$(src) && find * -name '*.h'))) 433 + $(shell cd $(src) && find * -name '*.h'))) 434 434 435 435 quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) 436 436 cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; \
+1 -1
drivers/gpu/drm/imagination/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only OR MIT 2 2 # Copyright (c) 2023 Imagination Technologies Ltd. 3 3 4 - subdir-ccflags-y := -I$(srctree)/$(src) 4 + subdir-ccflags-y := -I$(src) 5 5 6 6 powervr-y := \ 7 7 pvr_ccb.o \
+6 -6
drivers/gpu/drm/msm/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ccflags-y := -I $(srctree)/$(src) 2 + ccflags-y := -I $(src) 3 3 ccflags-y += -I $(obj)/generated 4 - ccflags-y += -I $(srctree)/$(src)/disp/dpu1 5 - ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi 6 - ccflags-$(CONFIG_DRM_MSM_DP) += -I $(srctree)/$(src)/dp 4 + ccflags-y += -I $(src)/disp/dpu1 5 + ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(src)/dsi 6 + ccflags-$(CONFIG_DRM_MSM_DP) += -I $(src)/dp 7 7 8 8 adreno-y := \ 9 9 adreno/adreno_device.o \ ··· 163 163 endif 164 164 165 165 quiet_cmd_headergen = GENHDR $@ 166 - cmd_headergen = mkdir -p $(obj)/generated && $(PYTHON3) $(srctree)/$(src)/registers/gen_header.py \ 167 - $(headergen-opts) --rnn $(srctree)/$(src)/registers --xml $< c-defines > $@ 166 + cmd_headergen = mkdir -p $(obj)/generated && $(PYTHON3) $(src)/registers/gen_header.py \ 167 + $(headergen-opts) --rnn $(src)/registers --xml $< c-defines > $@ 168 168 169 169 $(obj)/generated/%.xml.h: $(src)/registers/adreno/%.xml \ 170 170 $(src)/registers/adreno/adreno_common.xml \
+4 -6
drivers/gpu/drm/nouveau/Kbuild
··· 1 - NOUVEAU_PATH ?= $(srctree) 2 - 3 1 # SPDX-License-Identifier: MIT 4 - ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include 5 - ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include/nvkm 6 - ccflags-y += -I $(NOUVEAU_PATH)/$(src)/nvkm 7 - ccflags-y += -I $(NOUVEAU_PATH)/$(src) 2 + ccflags-y += -I $(src)/include 3 + ccflags-y += -I $(src)/include/nvkm 4 + ccflags-y += -I $(src)/nvkm 5 + ccflags-y += -I $(src) 8 6 9 7 # NVKM - HW resource manager 10 8 #- code also used by various userspace tools/tests
+5 -5
drivers/gpu/drm/xe/Makefile
··· 32 32 # Enable -Werror in CI and development 33 33 subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror 34 34 35 - subdir-ccflags-y += -I$(obj) -I$(srctree)/$(src) 35 + subdir-ccflags-y += -I$(obj) -I$(src) 36 36 37 37 # generated sources 38 38 hostprogs := xe_gen_wa_oob ··· 43 43 cmd_wa_oob = mkdir -p $(@D); $^ $(generated_oob) 44 44 45 45 $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \ 46 - $(srctree)/$(src)/xe_wa_oob.rules 46 + $(src)/xe_wa_oob.rules 47 47 $(call cmd,wa_oob) 48 48 49 49 uses_generated_oob := \ ··· 176 176 177 177 # i915 Display compat #defines and #includes 178 178 subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ 179 - -I$(srctree)/$(src)/display/ext \ 180 - -I$(srctree)/$(src)/compat-i915-headers \ 179 + -I$(src)/display/ext \ 180 + -I$(src)/compat-i915-headers \ 181 181 -I$(srctree)/drivers/gpu/drm/i915/display/ \ 182 182 -Ddrm_i915_gem_object=xe_bo \ 183 183 -Ddrm_i915_private=xe_device ··· 319 319 endif 320 320 321 321 always-$(CONFIG_DRM_XE_WERROR) += \ 322 - $(patsubst %.h,%.hdrtest, $(shell cd $(srctree)/$(src) && find * -name '*.h' $(hdrtest_find_args))) 322 + $(patsubst %.h,%.hdrtest, $(shell cd $(src) && find * -name '*.h' $(hdrtest_find_args))) 323 323 324 324 quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) 325 325 cmd_hdrtest = $(CC) -DHDRTEST $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@
+1 -1
drivers/hid/amd-sfh-hid/Makefile
··· 13 13 amd_sfh-objs += sfh1_1/amd_sfh_interface.o 14 14 amd_sfh-objs += sfh1_1/amd_sfh_desc.o 15 15 16 - ccflags-y += -I $(srctree)/$(src)/ 16 + ccflags-y += -I $(src)/
+1 -1
drivers/hid/intel-ish-hid/Makefile
··· 24 24 obj-$(CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ishtp-loader.o 25 25 intel-ishtp-loader-objs += ishtp-fw-loader.o 26 26 27 - ccflags-y += -I $(srctree)/$(src)/ishtp 27 + ccflags-y += -I $(src)/ishtp
+1 -1
drivers/md/dm-vdo/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/indexer 3 + ccflags-y := -I$(src) -I$(src)/indexer 4 4 5 5 obj-$(CONFIG_DM_VDO) += dm-vdo.o 6 6
-4
drivers/misc/lkdtm/Makefile
··· 15 15 16 16 KASAN_SANITIZE_stackleak.o := n 17 17 18 - KASAN_SANITIZE_rodata.o := n 19 - KCSAN_SANITIZE_rodata.o := n 20 - KCOV_INSTRUMENT_rodata.o := n 21 - OBJECT_FILES_NON_STANDARD_rodata.o := y 22 18 CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) $(RETHUNK_CFLAGS) $(CC_FLAGS_CFI) 23 19 24 20 OBJCOPYFLAGS :=
+1 -1
drivers/net/ethernet/aquantia/atlantic/Makefile
··· 8 8 9 9 obj-$(CONFIG_AQTION) += atlantic.o 10 10 11 - ccflags-y += -I$(srctree)/$(src) 11 + ccflags-y += -I$(src) 12 12 13 13 atlantic-objs := aq_main.o \ 14 14 aq_nic.o \
+1 -1
drivers/net/ethernet/chelsio/libcxgb/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ccflags-y := -I $(srctree)/$(src)/../cxgb4 2 + ccflags-y := -I $(src)/../cxgb4 3 3 4 4 obj-$(CONFIG_CHELSIO_LIB) += libcxgb.o 5 5
+1 -1
drivers/net/ethernet/fungible/funeth/Makefile
··· 1 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 2 3 - ccflags-y += -I$(srctree)/$(src)/../funcore -I$(srctree)/$(src) 3 + ccflags-y += -I$(src)/../funcore -I$(src) 4 4 5 5 obj-$(CONFIG_FUN_ETH) += funeth.o 6 6
+1 -1
drivers/net/ethernet/hisilicon/hns3/Makefile
··· 3 3 # Makefile for the HISILICON network device drivers. 4 4 # 5 5 6 - ccflags-y += -I$(srctree)/$(src) 6 + ccflags-y += -I$(src) 7 7 ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3pf 8 8 ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3vf 9 9 ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3_common
+2 -2
drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
··· 6 6 # 7 7 8 8 ccflags-y += \ 9 - -I $(srctree)/$(src) \ 10 - -I $(srctree)/$(src)/../include 9 + -I $(src) \ 10 + -I $(src)/../include 11 11 12 12 obj-$(CONFIG_BRCMFMAC) += brcmfmac.o 13 13 brcmfmac-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/Makefile
··· 3 3 # Copyright (c) 2022 Broadcom Corporation 4 4 5 5 ccflags-y += \ 6 - -I $(srctree)/$(src) \ 7 - -I $(srctree)/$(src)/.. \ 8 - -I $(srctree)/$(src)/../../include 6 + -I $(src) \ 7 + -I $(src)/.. \ 8 + -I $(src)/../../include 9 9 10 10 obj-m += brcmfmac-bca.o 11 11 brcmfmac-bca-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/Makefile
··· 3 3 # Copyright (c) 2022 Broadcom Corporation 4 4 5 5 ccflags-y += \ 6 - -I $(srctree)/$(src) \ 7 - -I $(srctree)/$(src)/.. \ 8 - -I $(srctree)/$(src)/../../include 6 + -I $(src) \ 7 + -I $(src)/.. \ 8 + -I $(src)/../../include 9 9 10 10 obj-m += brcmfmac-cyw.o 11 11 brcmfmac-cyw-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/Makefile
··· 3 3 # Copyright (c) 2022 Broadcom Corporation 4 4 5 5 ccflags-y += \ 6 - -I $(srctree)/$(src) \ 7 - -I $(srctree)/$(src)/.. \ 8 - -I $(srctree)/$(src)/../../include 6 + -I $(src) \ 7 + -I $(src)/.. \ 8 + -I $(src)/../../include 9 9 10 10 obj-m += brcmfmac-wcc.o 11 11 brcmfmac-wcc-objs += \
+3 -3
drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
··· 16 16 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 17 18 18 ccflags-y := \ 19 - -I $(srctree)/$(src) \ 20 - -I $(srctree)/$(src)/phy \ 21 - -I $(srctree)/$(src)/../include 19 + -I $(src) \ 20 + -I $(src)/phy \ 21 + -I $(src)/../include 22 22 23 23 brcmsmac-y := \ 24 24 mac80211_if.o \
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile
··· 4 4 # 5 5 # Copyright (c) 2011 Broadcom Corporation 6 6 # 7 - ccflags-y := -I $(srctree)/$(src)/../include 7 + ccflags-y := -I $(src)/../include 8 8 9 9 obj-$(CONFIG_BRCMUTIL) += brcmutil.o 10 10 brcmutil-objs = utils.o d11.o
+1 -1
drivers/net/wireless/intel/iwlwifi/dvm/Makefile
··· 11 11 iwldvm-$(CONFIG_IWLWIFI_LEDS) += led.o 12 12 iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o 13 13 14 - ccflags-y += -I $(srctree)/$(src)/../ 14 + ccflags-y += -I $(src)/../
+1 -1
drivers/net/wireless/intel/iwlwifi/mei/Makefile
··· 5 5 iwlmei-$(CONFIG_IWLWIFI_DEVICE_TRACING) += trace.o 6 6 CFLAGS_trace.o := -I$(src) 7 7 8 - ccflags-y += -I $(srctree)/$(src)/../ 8 + ccflags-y += -I $(src)/../
+1 -1
drivers/net/wireless/intel/iwlwifi/mvm/Makefile
··· 16 16 iwlmvm-$(CONFIG_PM) += d3.o 17 17 iwlmvm-$(CONFIG_IWLMEI) += vendor-cmd.o 18 18 19 - subdir-ccflags-y += -I $(srctree)/$(src)/../ 19 + subdir-ccflags-y += -I $(src)/../
+1 -1
drivers/net/wireless/intel/iwlwifi/tests/Makefile
··· 2 2 3 3 iwlwifi-tests-y += module.o devinfo.o 4 4 5 - ccflags-y += -I$(srctree)/$(src)/../ 5 + ccflags-y += -I$(src)/../ 6 6 7 7 obj-$(CONFIG_IWLWIFI_KUNIT_TESTS) += iwlwifi-tests.o
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile
··· 3 3 4 4 obj-$(CONFIG_RTL8180) += rtl818x_pci.o 5 5 6 - ccflags-y += -I $(srctree)/$(src)/.. 6 + ccflags-y += -I $(src)/..
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile
··· 3 3 4 4 obj-$(CONFIG_RTL8187) += rtl8187.o 5 5 6 - ccflags-y += -I $(srctree)/$(src)/.. 6 + ccflags-y += -I $(src)/..
+2 -15
drivers/rapidio/Kconfig
··· 59 59 60 60 If you are unsure about this, say N here. 61 61 62 - choice 63 - prompt "Enumeration method" 64 - depends on RAPIDIO 65 - default RAPIDIO_ENUM_BASIC 66 - help 67 - There are different enumeration and discovery mechanisms offered 68 - for RapidIO subsystem. You may select single built-in method or 69 - or any number of methods to be built as modules. 70 - Selecting a built-in method disables use of loadable methods. 71 - 72 - If unsure, select Basic built-in. 73 - 74 62 config RAPIDIO_ENUM_BASIC 75 - tristate "Basic" 63 + tristate "Basic Enumeration method" 64 + depends on RAPIDIO 76 65 help 77 66 This option includes basic RapidIO fabric enumeration and discovery 78 67 mechanism similar to one described in RapidIO specification Annex 1. 79 - 80 - endchoice 81 68 82 69 config RAPIDIO_CHMAN 83 70 tristate "RapidIO Channelized Messaging driver"
+6 -6
drivers/scsi/aic7xxx/Makefile
··· 55 55 56 56 ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) 57 57 $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm 58 - $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \ 58 + $(obj)/aicasm/aicasm -I $(src) -r $(obj)/aic7xxx_reg.h \ 59 59 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ 60 - $(srctree)/$(src)/aic7xxx.seq 60 + $(src)/aic7xxx.seq 61 61 62 62 $(aic7xxx-gen-y): $(objtree)/$(obj)/aic7xxx_seq.h 63 63 @true ··· 73 73 74 74 ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) 75 75 $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm 76 - $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \ 76 + $(obj)/aicasm/aicasm -I $(src) -r $(obj)/aic79xx_reg.h \ 77 77 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ 78 - $(srctree)/$(src)/aic79xx.seq 78 + $(src)/aic79xx.seq 79 79 80 80 $(aic79xx-gen-y): $(objtree)/$(obj)/aic79xx_seq.h 81 81 @true ··· 83 83 $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped 84 84 endif 85 85 86 - $(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl] 87 - $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/ 86 + $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] 87 + $(MAKE) -C $(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/
+1 -1
drivers/staging/rtl8723bs/Makefile
··· 62 62 63 63 obj-$(CONFIG_RTL8723BS) := r8723bs.o 64 64 65 - ccflags-y += -I$(srctree)/$(src)/include -I$(srctree)/$(src)/hal 65 + ccflags-y += -I$(src)/include -I$(src)/hal
+1 -1
fs/iomap/Makefile
··· 4 4 # All Rights Reserved. 5 5 # 6 6 7 - ccflags-y += -I $(srctree)/$(src) # needed for trace events 7 + ccflags-y += -I $(src) # needed for trace events 8 8 9 9 obj-$(CONFIG_FS_IOMAP) += iomap.o 10 10
+7 -7
fs/unicode/Makefile
··· 18 18 19 19 quiet_cmd_utf8data = GEN $@ 20 20 cmd_utf8data = $< \ 21 - -a $(srctree)/$(src)/DerivedAge.txt \ 22 - -c $(srctree)/$(src)/DerivedCombiningClass.txt \ 23 - -p $(srctree)/$(src)/DerivedCoreProperties.txt \ 24 - -d $(srctree)/$(src)/UnicodeData.txt \ 25 - -f $(srctree)/$(src)/CaseFolding.txt \ 26 - -n $(srctree)/$(src)/NormalizationCorrections.txt \ 27 - -t $(srctree)/$(src)/NormalizationTest.txt \ 21 + -a $(src)/DerivedAge.txt \ 22 + -c $(src)/DerivedCombiningClass.txt \ 23 + -p $(src)/DerivedCoreProperties.txt \ 24 + -d $(src)/UnicodeData.txt \ 25 + -f $(src)/CaseFolding.txt \ 26 + -n $(src)/NormalizationCorrections.txt \ 27 + -t $(src)/NormalizationTest.txt \ 28 28 -o $@ 29 29 30 30 $(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
+2 -2
fs/xfs/Makefile
··· 4 4 # All Rights Reserved. 5 5 # 6 6 7 - ccflags-y += -I $(srctree)/$(src) # needed for trace events 8 - ccflags-y += -I $(srctree)/$(src)/libxfs 7 + ccflags-y += -I $(src) # needed for trace events 8 + ccflags-y += -I $(src)/libxfs 9 9 10 10 obj-$(CONFIG_XFS_FS) += xfs.o 11 11
+19
include/asm-generic/vmlinux.lds.h
··· 449 449 #endif 450 450 451 451 /* 452 + * Some symbol definitions will not exist yet during the first pass of the 453 + * link, but are guaranteed to exist in the final link. Provide preliminary 454 + * definitions that will be superseded in the final link to avoid having to 455 + * rely on weak external linkage, which requires a GOT when used in position 456 + * independent code. 457 + */ 458 + #define PRELIMINARY_SYMBOL_DEFINITIONS \ 459 + PROVIDE(kallsyms_addresses = .); \ 460 + PROVIDE(kallsyms_offsets = .); \ 461 + PROVIDE(kallsyms_names = .); \ 462 + PROVIDE(kallsyms_num_syms = .); \ 463 + PROVIDE(kallsyms_relative_base = .); \ 464 + PROVIDE(kallsyms_token_table = .); \ 465 + PROVIDE(kallsyms_token_index = .); \ 466 + PROVIDE(kallsyms_markers = .); \ 467 + PROVIDE(kallsyms_seqs_of_names = .); 468 + 469 + /* 452 470 * Read only Data 453 471 */ 454 472 #define RO_DATA(align) \ 455 473 . = ALIGN((align)); \ 474 + PRELIMINARY_SYMBOL_DEFINITIONS \ 456 475 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ 457 476 __start_rodata = .; \ 458 477 *(.rodata) *(.rodata.*) \
+1 -4
init/Makefile
··· 52 52 # Build version-timestamp.c with final UTS_VERSION 53 53 # 54 54 55 - include/generated/utsversion.h: build-version-auto = $(shell $(srctree)/$(src)/build-version) 55 + include/generated/utsversion.h: build-version-auto = $(shell $(src)/build-version) 56 56 include/generated/utsversion.h: build-timestamp-auto = $(shell LC_ALL=C date) 57 57 include/generated/utsversion.h: FORCE 58 58 $(call filechk,uts_version) 59 59 60 60 $(obj)/version-timestamp.o: include/generated/utsversion.h 61 61 CFLAGS_version-timestamp.o := -include include/generated/utsversion.h 62 - KASAN_SANITIZE_version-timestamp.o := n 63 - KCSAN_SANITIZE_version-timestamp.o := n 64 - GCOV_PROFILE_version-timestamp.o := n
-6
kernel/kallsyms.c
··· 325 325 unsigned long symbol_start = 0, symbol_end = 0; 326 326 unsigned long i, low, high, mid; 327 327 328 - /* This kernel should never had been booted. */ 329 - if (!IS_ENABLED(CONFIG_KALLSYMS_BASE_RELATIVE)) 330 - BUG_ON(!kallsyms_addresses); 331 - else 332 - BUG_ON(!kallsyms_offsets); 333 - 334 328 /* Do a binary search on the sorted kallsyms_addresses array. */ 335 329 low = 0; 336 330 high = kallsyms_num_syms;
+12 -18
kernel/kallsyms_internal.h
··· 5 5 #include <linux/types.h> 6 6 7 7 /* 8 - * These will be re-linked against their real values 9 - * during the second link stage. 8 + * These will be re-linked against their real values during the second link 9 + * stage. Preliminary values must be provided in the linker script using the 10 + * PROVIDE() directive so that the first link stage can complete successfully. 10 11 */ 11 - extern const unsigned long kallsyms_addresses[] __weak; 12 - extern const int kallsyms_offsets[] __weak; 13 - extern const u8 kallsyms_names[] __weak; 12 + extern const unsigned long kallsyms_addresses[]; 13 + extern const int kallsyms_offsets[]; 14 + extern const u8 kallsyms_names[]; 14 15 15 - /* 16 - * Tell the compiler that the count isn't in the small data section if the arch 17 - * has one (eg: FRV). 18 - */ 19 - extern const unsigned int kallsyms_num_syms 20 - __section(".rodata") __attribute__((weak)); 16 + extern const unsigned int kallsyms_num_syms; 17 + extern const unsigned long kallsyms_relative_base; 21 18 22 - extern const unsigned long kallsyms_relative_base 23 - __section(".rodata") __attribute__((weak)); 19 + extern const char kallsyms_token_table[]; 20 + extern const u16 kallsyms_token_index[]; 24 21 25 - extern const char kallsyms_token_table[] __weak; 26 - extern const u16 kallsyms_token_index[] __weak; 27 - 28 - extern const unsigned int kallsyms_markers[] __weak; 29 - extern const u8 kallsyms_seqs_of_names[] __weak; 22 + extern const unsigned int kallsyms_markers[]; 23 + extern const u8 kallsyms_seqs_of_names[]; 30 24 31 25 #endif // LINUX_KALLSYMS_INTERNAL_H_
+2 -2
kernel/ksysfs.c
··· 228 228 /* 229 229 * Make /sys/kernel/notes give the raw contents of our kernel .notes section. 230 230 */ 231 - extern const void __start_notes __weak; 232 - extern const void __stop_notes __weak; 231 + extern const void __start_notes; 232 + extern const void __stop_notes; 233 233 #define notes_size (&__stop_notes - &__start_notes) 234 234 235 235 static ssize_t notes_read(struct file *filp, struct kobject *kobj,
+3 -3
lib/Makefile
··· 353 353 $(call cmd,build_OID_registry) 354 354 355 355 quiet_cmd_build_OID_registry = GEN $@ 356 - cmd_build_OID_registry = perl $(srctree)/$(src)/build_OID_registry $< $@ 356 + cmd_build_OID_registry = perl $(src)/build_OID_registry $< $@ 357 357 358 358 clean-files += oid_registry_data.c 359 359 ··· 411 411 obj-$(CONFIG_FIRMWARE_TABLE) += fw_table.o 412 412 413 413 # FORTIFY_SOURCE compile-time behavior tests 414 - TEST_FORTIFY_SRCS = $(wildcard $(srctree)/$(src)/test_fortify/*-*.c) 415 - TEST_FORTIFY_LOGS = $(patsubst $(srctree)/$(src)/%.c, %.log, $(TEST_FORTIFY_SRCS)) 414 + TEST_FORTIFY_SRCS = $(wildcard $(src)/test_fortify/*-*.c) 415 + TEST_FORTIFY_LOGS = $(patsubst $(src)/%.c, %.log, $(TEST_FORTIFY_SRCS)) 416 416 TEST_FORTIFY_LOG = test_fortify.log 417 417 418 418 quiet_cmd_test_fortify = TEST $@
+2 -2
lib/buildid.c
··· 182 182 */ 183 183 void __init init_vmlinux_build_id(void) 184 184 { 185 - extern const void __start_notes __weak; 186 - extern const void __stop_notes __weak; 185 + extern const void __start_notes; 186 + extern const void __stop_notes; 187 187 unsigned int size = &__stop_notes - &__start_notes; 188 188 189 189 build_id_parse_buf(&__start_notes, vmlinux_build_id, size);
+1 -1
lib/raid6/Makefile
··· 53 53 endif 54 54 55 55 quiet_cmd_unroll = UNROLL $@ 56 - cmd_unroll = $(AWK) -v N=$* -f $(srctree)/$(src)/unroll.awk < $< > $@ 56 + cmd_unroll = $(AWK) -v N=$* -f $(src)/unroll.awk < $< > $@ 57 57 58 58 targets += int1.c int2.c int4.c int8.c 59 59 $(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE
+1 -1
net/wireless/Makefile
··· 25 25 cfg80211-y += extra-certs.o 26 26 endif 27 27 28 - $(obj)/shipped-certs.c: $(sort $(wildcard $(srctree)/$(src)/certs/*.hex)) 28 + $(obj)/shipped-certs.c: $(sort $(wildcard $(src)/certs/*.hex)) 29 29 @$(kecho) " GEN $@" 30 30 $(Q)(echo '#include "reg.h"'; \ 31 31 echo 'const u8 shipped_regdb_certs[] = {'; \
+2 -2
rust/Makefile
··· 329 329 $(bindgen_target_cflags) $(bindgen_target_extra) 330 330 331 331 $(obj)/bindings/bindings_generated.rs: private bindgen_target_flags = \ 332 - $(shell grep -Ev '^#|^$$' $(srctree)/$(src)/bindgen_parameters) 332 + $(shell grep -Ev '^#|^$$' $(src)/bindgen_parameters) 333 333 $(obj)/bindings/bindings_generated.rs: private bindgen_target_extra = ; \ 334 334 sed -Ei 's/pub const RUST_CONST_HELPER_([a-zA-Z0-9_]*)/pub const \1/g' $@ 335 335 $(obj)/bindings/bindings_generated.rs: $(src)/bindings/bindings_helper.h \ ··· 337 337 $(call if_changed_dep,bindgen) 338 338 339 339 $(obj)/uapi/uapi_generated.rs: private bindgen_target_flags = \ 340 - $(shell grep -Ev '^#|^$$' $(srctree)/$(src)/bindgen_parameters) 340 + $(shell grep -Ev '^#|^$$' $(src)/bindgen_parameters) 341 341 $(obj)/uapi/uapi_generated.rs: $(src)/uapi/uapi_helper.h \ 342 342 $(src)/bindgen_parameters FORCE 343 343 $(call if_changed_dep,bindgen)
+1 -1
samples/bpf/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - BPF_SAMPLES_PATH ?= $(abspath $(srctree)/$(src)) 3 + BPF_SAMPLES_PATH ?= $(abspath $(src)) 4 4 TOOLS_PATH := $(BPF_SAMPLES_PATH)/../../tools 5 5 6 6 pound := \#
+1 -1
samples/hid/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - HID_SAMPLES_PATH ?= $(abspath $(srctree)/$(src)) 3 + HID_SAMPLES_PATH ?= $(abspath $(src)) 4 4 TOOLS_PATH := $(HID_SAMPLES_PATH)/../../tools 5 5 6 6 pound := \#
+1 -2
scripts/Kbuild.include
··· 62 62 63 63 ### 64 64 # The path to Kbuild or Makefile. Kbuild has precedence over Makefile. 65 - kbuild-dir = $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 66 - kbuild-file = $(or $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Makefile) 65 + kbuild-file = $(or $(wildcard $(src)/Kbuild),$(src)/Makefile) 67 66 68 67 ### 69 68 # Read a file, replacing newlines with spaces
+3 -3
scripts/Makefile.asm-generic
··· 9 9 PHONY := all 10 10 all: 11 11 12 - src := $(subst /generated,,$(obj)) 12 + src := $(srctree)/$(subst /generated,,$(obj)) 13 13 14 14 include $(srctree)/scripts/Kbuild.include 15 15 -include $(kbuild-file) ··· 20 20 endif 21 21 22 22 redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y)) 23 - redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f))) 23 + redundant += $(foreach f, $(generic-y), $(if $(wildcard $(src)/$(f)),$(f))) 24 24 redundant := $(sort $(redundant)) 25 25 $(if $(redundant),\ 26 26 $(warning redundant generic-y found in $(src)/Kbuild: $(redundant))) 27 27 28 28 # If arch does not implement mandatory headers, fallback to asm-generic ones. 29 29 mandatory-y := $(filter-out $(generated-y), $(mandatory-y)) 30 - generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(srctree)/$(src)/$(f)),,$(f))) 30 + generic-y += $(foreach f, $(mandatory-y), $(if $(wildcard $(src)/$(f)),,$(f))) 31 31 32 32 generic-y := $(addprefix $(obj)/, $(generic-y)) 33 33 generated-y := $(addprefix $(obj)/, $(generated-y))
+18 -18
scripts/Makefile.build
··· 3 3 # Building 4 4 # ========================================================================== 5 5 6 - src := $(obj) 6 + src := $(if $(VPATH),$(VPATH)/)$(obj) 7 7 8 8 PHONY := $(obj)/ 9 9 $(obj)/: ··· 113 113 quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ 114 114 cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS) $(CC_FLAGS_LTO), $(c_flags)) -fverbose-asm -S -o $@ $< 115 115 116 - $(obj)/%.s: $(src)/%.c FORCE 116 + $(obj)/%.s: $(obj)/%.c FORCE 117 117 $(call if_changed_dep,cc_s_c) 118 118 119 119 quiet_cmd_cpp_i_c = CPP $(quiet_modtag) $@ 120 120 cmd_cpp_i_c = $(CPP) $(c_flags) -o $@ $< 121 121 122 - $(obj)/%.i: $(src)/%.c FORCE 122 + $(obj)/%.i: $(obj)/%.c FORCE 123 123 $(call if_changed_dep,cpp_i_c) 124 124 125 125 genksyms = scripts/genksyms/genksyms \ ··· 133 133 quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ 134 134 cmd_cc_symtypes_c = $(call cmd_gensymtypes_c,true,$@) >/dev/null 135 135 136 - $(obj)/%.symtypes : $(src)/%.c FORCE 136 + $(obj)/%.symtypes : $(obj)/%.c FORCE 137 137 $(call cmd,cc_symtypes_c) 138 138 139 139 # LLVM assembly ··· 141 141 quiet_cmd_cc_ll_c = CC $(quiet_modtag) $@ 142 142 cmd_cc_ll_c = $(CC) $(c_flags) -emit-llvm -S -fno-discard-value-names -o $@ $< 143 143 144 - $(obj)/%.ll: $(src)/%.c FORCE 144 + $(obj)/%.ll: $(obj)/%.c FORCE 145 145 $(call if_changed_dep,cc_ll_c) 146 146 147 147 # C (.c) files ··· 214 214 # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file 215 215 # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file 216 216 217 - is-standard-object = $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(target-stem).o)$(OBJECT_FILES_NON_STANDARD)n),y) 217 + is-standard-object = $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(target-stem).o)$(OBJECT_FILES_NON_STANDARD)n),$(is-kernel-object)) 218 218 219 - $(obj)/%.o: objtool-enabled = $(if $(is-standard-object),$(if $(delay-objtool),$(is-single-obj-m),y)) 219 + $(obj)/%.o: private objtool-enabled = $(if $(is-standard-object),$(if $(delay-objtool),$(is-single-obj-m),y)) 220 220 221 221 ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),) 222 222 cmd_warn_shared_object = $(if $(word 2, $(modname-multi)),$(warning $(kbuild-file): $*.o is added to multiple modules: $(modname-multi))) ··· 240 240 endef 241 241 242 242 # Built-in and composite module parts 243 - $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE 243 + $(obj)/%.o: $(obj)/%.c $(recordmcount_source) FORCE 244 244 $(call if_changed_rule,cc_o_c) 245 245 $(call cmd,force_checksrc) 246 246 ··· 257 257 $(CONFIG_SHELL) $(srctree)/scripts/makelst $*.o \ 258 258 System.map $(OBJDUMP) > $@ 259 259 260 - $(obj)/%.lst: $(src)/%.c FORCE 260 + $(obj)/%.lst: $(obj)/%.c FORCE 261 261 $(call if_changed_dep,cc_lst_c) 262 262 263 263 # Compile Rust sources (.rs) ··· 290 290 quiet_cmd_rustc_o_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@ 291 291 cmd_rustc_o_rs = $(rust_common_cmd) --emit=obj=$@ $< 292 292 293 - $(obj)/%.o: $(src)/%.rs FORCE 293 + $(obj)/%.o: $(obj)/%.rs FORCE 294 294 +$(call if_changed_dep,rustc_o_rs) 295 295 296 296 quiet_cmd_rustc_rsi_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@ ··· 298 298 $(rust_common_cmd) -Zunpretty=expanded $< >$@; \ 299 299 command -v $(RUSTFMT) >/dev/null && $(RUSTFMT) $@ 300 300 301 - $(obj)/%.rsi: $(src)/%.rs FORCE 301 + $(obj)/%.rsi: $(obj)/%.rs FORCE 302 302 +$(call if_changed_dep,rustc_rsi_rs) 303 303 304 304 quiet_cmd_rustc_s_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@ 305 305 cmd_rustc_s_rs = $(rust_common_cmd) --emit=asm=$@ $< 306 306 307 - $(obj)/%.s: $(src)/%.rs FORCE 307 + $(obj)/%.s: $(obj)/%.rs FORCE 308 308 +$(call if_changed_dep,rustc_s_rs) 309 309 310 310 quiet_cmd_rustc_ll_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@ 311 311 cmd_rustc_ll_rs = $(rust_common_cmd) --emit=llvm-ir=$@ $< 312 312 313 - $(obj)/%.ll: $(src)/%.rs FORCE 313 + $(obj)/%.ll: $(obj)/%.rs FORCE 314 314 +$(call if_changed_dep,rustc_ll_rs) 315 315 316 316 # Compile assembler sources (.S) ··· 336 336 quiet_cmd_cc_symtypes_S = SYM $(quiet_modtag) $@ 337 337 cmd_cc_symtypes_S = $(call cmd_gensymtypes_S,true,$@) >/dev/null 338 338 339 - $(obj)/%.symtypes : $(src)/%.S FORCE 339 + $(obj)/%.symtypes : $(obj)/%.S FORCE 340 340 $(call cmd,cc_symtypes_S) 341 341 342 342 343 343 quiet_cmd_cpp_s_S = CPP $(quiet_modtag) $@ 344 344 cmd_cpp_s_S = $(CPP) $(a_flags) -o $@ $< 345 345 346 - $(obj)/%.s: $(src)/%.S FORCE 346 + $(obj)/%.s: $(obj)/%.S FORCE 347 347 $(call if_changed_dep,cpp_s_S) 348 348 349 349 quiet_cmd_as_o_S = AS $(quiet_modtag) $@ ··· 358 358 359 359 endif 360 360 361 - $(obj)/%.o: $(src)/%.S FORCE 361 + $(obj)/%.o: $(obj)/%.S FORCE 362 362 $(call if_changed_rule,as_o_S) 363 363 364 364 targets += $(filter-out $(subdir-builtin), $(real-obj-y)) ··· 437 437 $(call cmd,gen_objtooldep) 438 438 endef 439 439 440 - $(multi-obj-m): objtool-enabled := $(delay-objtool) 441 - $(multi-obj-m): part-of-module := y 440 + $(multi-obj-m): private objtool-enabled := $(delay-objtool) 441 + $(multi-obj-m): private part-of-module := y 442 442 $(multi-obj-m): %.o: %.mod FORCE 443 443 $(call if_changed_rule,ld_multi_m) 444 444 $(call multi_depend, $(multi-obj-m), .o, -objs -y -m)
+1 -1
scripts/Makefile.clean
··· 3 3 # Cleaning up 4 4 # ========================================================================== 5 5 6 - src := $(obj) 6 + src := $(if $(VPATH),$(VPATH)/)$(obj) 7 7 8 8 PHONY := __clean 9 9 __clean:
+2 -2
scripts/Makefile.host
··· 112 112 quiet_cmd_host-csingle = HOSTCC $@ 113 113 cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \ 114 114 $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) 115 - $(host-csingle): $(obj)/%: $(src)/%.c FORCE 115 + $(host-csingle): $(obj)/%: $(obj)/%.c FORCE 116 116 $(call if_changed_dep,host-csingle) 117 117 118 118 # Link an executable based on list of .o files, all plain c ··· 129 129 # host-cobjs -> .o 130 130 quiet_cmd_host-cobjs = HOSTCC $@ 131 131 cmd_host-cobjs = $(HOSTCC) $(hostc_flags) -c -o $@ $< 132 - $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE 132 + $(host-cobjs): $(obj)/%.o: $(obj)/%.c FORCE 133 133 $(call if_changed_dep,host-cobjs) 134 134 135 135 # Link an executable based on list of .o files, a mixture of .c and .cc
+19 -15
scripts/Makefile.lib
··· 154 154 # 155 155 ifeq ($(CONFIG_GCOV_KERNEL),y) 156 156 _c_flags += $(if $(patsubst n%,, \ 157 - $(GCOV_PROFILE_$(target-stem).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \ 157 + $(GCOV_PROFILE_$(target-stem).o)$(GCOV_PROFILE)$(if $(is-kernel-object),$(CONFIG_GCOV_PROFILE_ALL))), \ 158 158 $(CFLAGS_GCOV)) 159 159 endif 160 160 ··· 165 165 ifeq ($(CONFIG_KASAN),y) 166 166 ifneq ($(CONFIG_KASAN_HW_TAGS),y) 167 167 _c_flags += $(if $(patsubst n%,, \ 168 - $(KASAN_SANITIZE_$(target-stem).o)$(KASAN_SANITIZE)y), \ 168 + $(KASAN_SANITIZE_$(target-stem).o)$(KASAN_SANITIZE)$(is-kernel-object)), \ 169 169 $(CFLAGS_KASAN), $(CFLAGS_KASAN_NOSANITIZE)) 170 170 endif 171 171 endif 172 172 173 173 ifeq ($(CONFIG_KMSAN),y) 174 174 _c_flags += $(if $(patsubst n%,, \ 175 - $(KMSAN_SANITIZE_$(target-stem).o)$(KMSAN_SANITIZE)y), \ 175 + $(KMSAN_SANITIZE_$(target-stem).o)$(KMSAN_SANITIZE)$(is-kernel-object)), \ 176 176 $(CFLAGS_KMSAN)) 177 177 _c_flags += $(if $(patsubst n%,, \ 178 - $(KMSAN_ENABLE_CHECKS_$(target-stem).o)$(KMSAN_ENABLE_CHECKS)y), \ 178 + $(KMSAN_ENABLE_CHECKS_$(target-stem).o)$(KMSAN_ENABLE_CHECKS)$(is-kernel-object)), \ 179 179 , -mllvm -msan-disable-checks=1) 180 180 endif 181 181 182 182 ifeq ($(CONFIG_UBSAN),y) 183 183 _c_flags += $(if $(patsubst n%,, \ 184 - $(UBSAN_SANITIZE_$(target-stem).o)$(UBSAN_SANITIZE)y), \ 184 + $(UBSAN_SANITIZE_$(target-stem).o)$(UBSAN_SANITIZE)$(is-kernel-object)), \ 185 185 $(CFLAGS_UBSAN)) 186 186 _c_flags += $(if $(patsubst n%,, \ 187 - $(UBSAN_SIGNED_WRAP_$(target-stem).o)$(UBSAN_SANITIZE_$(target-stem).o)$(UBSAN_SIGNED_WRAP)$(UBSAN_SANITIZE)y), \ 187 + $(UBSAN_SIGNED_WRAP_$(target-stem).o)$(UBSAN_SANITIZE_$(target-stem).o)$(UBSAN_SIGNED_WRAP)$(UBSAN_SANITIZE)$(is-kernel-object)), \ 188 188 $(CFLAGS_UBSAN_SIGNED_WRAP)) 189 189 endif 190 190 191 191 ifeq ($(CONFIG_KCOV),y) 192 192 _c_flags += $(if $(patsubst n%,, \ 193 - $(KCOV_INSTRUMENT_$(target-stem).o)$(KCOV_INSTRUMENT)$(CONFIG_KCOV_INSTRUMENT_ALL)), \ 193 + $(KCOV_INSTRUMENT_$(target-stem).o)$(KCOV_INSTRUMENT)$(if $(is-kernel-object),$(CONFIG_KCOV_INSTRUMENT_ALL))), \ 194 194 $(CFLAGS_KCOV)) 195 195 endif 196 196 ··· 200 200 # 201 201 ifeq ($(CONFIG_KCSAN),y) 202 202 _c_flags += $(if $(patsubst n%,, \ 203 - $(KCSAN_SANITIZE_$(target-stem).o)$(KCSAN_SANITIZE)y), \ 203 + $(KCSAN_SANITIZE_$(target-stem).o)$(KCSAN_SANITIZE)$(is-kernel-object)), \ 204 204 $(CFLAGS_KCSAN)) 205 205 # Some uninstrumented files provide implied barriers required to avoid false 206 206 # positives: set KCSAN_INSTRUMENT_BARRIERS for barrier instrumentation only. ··· 209 209 -D__KCSAN_INSTRUMENT_BARRIERS__) 210 210 endif 211 211 212 - # $(srctree)/$(src) for including checkin headers from generated source files 213 - # $(objtree)/$(obj) for including generated headers from checkin source files 212 + # $(src) for including checkin headers from generated source files 213 + # $(obj) for including generated headers from checkin source files 214 214 ifeq ($(KBUILD_EXTMOD),) 215 215 ifdef building_out_of_srctree 216 - _c_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj) 217 - _a_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj) 218 - _cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj) 216 + _c_flags += $(addprefix -I, $(src) $(obj)) 217 + _a_flags += $(addprefix -I, $(src) $(obj)) 218 + _cpp_flags += $(addprefix -I, $(src) $(obj)) 219 219 endif 220 220 endif 221 221 222 + # If $(is-kernel-object) is 'y', this object will be linked to vmlinux or modules 223 + is-kernel-object = $(or $(part-of-builtin),$(part-of-module)) 224 + 225 + part-of-builtin = $(if $(filter $(basename $@).o, $(real-obj-y) $(lib-y)),y) 222 226 part-of-module = $(if $(filter $(basename $@).o, $(real-obj-m)),y) 223 227 quiet_modtag = $(if $(part-of-module),[M], ) 224 228 ··· 414 410 $(call if_changed,fdtoverlay) 415 411 $(call multi_depend, $(multi-dtb-y), .dtb, -dtbs) 416 412 417 - ifneq ($(CHECK_DTBS)$(CHECK_DT_BINDING),) 413 + ifneq ($(CHECK_DTBS),) 418 414 DT_CHECKER ?= dt-validate 419 415 DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m) 420 416 DT_BINDING_DIR := Documentation/devicetree/bindings ··· 427 423 cmd_dtb = $(cmd_dtc) 428 424 endif 429 425 430 - $(obj)/%.dtb: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE 426 + $(obj)/%.dtb: $(obj)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE 431 427 $(call if_changed_dep,dtb) 432 428 433 429 $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
+3 -1
scripts/Makefile.modfinal
··· 21 21 # modname and part-of-module are set to make c_flags define proper module flags 22 22 modname = $(notdir $(@:.mod.o=)) 23 23 part-of-module = y 24 + GCOV_PROFILE := n 25 + KCSAN_SANITIZE := n 24 26 25 27 quiet_cmd_cc_o_c = CC [M] $@ 26 - cmd_cc_o_c = $(CC) $(filter-out $(CC_FLAGS_CFI) $(CFLAGS_GCOV) $(CFLAGS_KCSAN), $(c_flags)) -c -o $@ $< 28 + cmd_cc_o_c = $(CC) $(filter-out $(CC_FLAGS_CFI), $(c_flags)) -c -o $@ $< 27 29 28 30 %.mod.o: %.mod.c FORCE 29 31 $(call if_changed_dep,cc_o_c)
+1 -1
scripts/Makefile.modpost
··· 112 112 113 113 # set src + obj - they may be used in the modules's Makefile 114 114 obj := $(KBUILD_EXTMOD) 115 - src := $(obj) 115 + src := $(if $(VPATH),$(VPATH)/)$(obj) 116 116 117 117 # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS 118 118 include $(kbuild-file)
+3 -4
scripts/Makefile.vdsoinst
··· 13 13 14 14 define gen_install_rules 15 15 16 - src := $$(firstword $$(subst :,$(space),$(1))) 17 - dest := $(install-dir)/$$(or $$(word 2,$$(subst :,$(space),$(1))),$$(patsubst %.dbg,%,$$(notdir $(1)))) 16 + dest := $(install-dir)/$$(patsubst %.dbg,%,$$(notdir $(1))) 18 17 19 18 __default: $$(dest) 20 - $$(dest): $$(src) FORCE 19 + $$(dest): $(1) FORCE 21 20 $$(call cmd,install) 22 21 23 22 # Some architectures create .build-id symlinks 24 23 ifneq ($(filter arm sparc x86, $(SRCARCH)),) 25 - link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug 24 + link := $(install-dir)/.build-id/$$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug 26 25 27 26 __default: $$(link) 28 27 $$(link): $$(dest) FORCE
-3
scripts/Makefile.vmlinux
··· 18 18 $(call if_changed_dep,cc_o_c) 19 19 20 20 ifdef CONFIG_MODULES 21 - KASAN_SANITIZE_.vmlinux.export.o := n 22 - KCSAN_SANITIZE_.vmlinux.export.o := n 23 - GCOV_PROFILE_.vmlinux.export.o := n 24 21 targets += .vmlinux.export.o 25 22 vmlinux: .vmlinux.export.o 26 23 endif
+3 -3
scripts/dtc/Makefile
··· 16 16 fdtoverlay-objs := $(libfdt) fdtoverlay.o util.o 17 17 18 18 # Source files need to get at the userspace version of libfdt_env.h to compile 19 - HOST_EXTRACFLAGS += -I $(srctree)/$(src)/libfdt 19 + HOST_EXTRACFLAGS += -I $(src)/libfdt 20 20 HOST_EXTRACFLAGS += -DNO_YAML 21 21 22 22 # Generated files need one more search path to include headers in source tree 23 - HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) 24 - HOSTCFLAGS_dtc-parser.tab.o := -I $(srctree)/$(src) 23 + HOSTCFLAGS_dtc-lexer.lex.o := -I $(src) 24 + HOSTCFLAGS_dtc-parser.tab.o := -I $(src) 25 25 26 26 # dependencies on generated files need to be listed explicitly 27 27 $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
+1 -1
scripts/gdb/linux/Makefile
··· 2 2 3 3 ifdef building_out_of_srctree 4 4 5 - symlinks := $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/*.py)) 5 + symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py)) 6 6 7 7 quiet_cmd_symlink = SYMLINK $@ 8 8 cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@
+2 -2
scripts/genksyms/Makefile
··· 23 23 endif 24 24 25 25 # -I needed for generated C source to include headers in source tree 26 - HOSTCFLAGS_parse.tab.o := -I $(srctree)/$(src) 27 - HOSTCFLAGS_lex.lex.o := -I $(srctree)/$(src) 26 + HOSTCFLAGS_parse.tab.o := -I $(src) 27 + HOSTCFLAGS_lex.lex.o := -I $(src) 28 28 29 29 # dependencies on generated files need to be listed explicitly 30 30 $(obj)/lex.lex.o: $(obj)/parse.tab.h
+4 -4
scripts/kconfig/Makefile
··· 57 57 58 58 PHONY += localmodconfig localyesconfig 59 59 localyesconfig localmodconfig: $(obj)/conf 60 - $(Q)$(PERL) $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config 60 + $(Q)$(PERL) $(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config 61 61 $(Q)if [ -f .config ]; then \ 62 62 cmp -s .tmp.config .config || \ 63 63 (mv -f .config .config.old.1; \ ··· 118 118 # CHECK: -o cache_dir=<path> working? 119 119 PHONY += testconfig 120 120 testconfig: $(obj)/conf 121 - $(Q)$(PYTHON3) -B -m pytest $(srctree)/$(src)/tests \ 121 + $(Q)$(PYTHON3) -B -m pytest $(src)/tests \ 122 122 -o cache_dir=$(abspath $(obj)/tests/.cache) \ 123 123 $(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no) 124 124 clean-files += tests/.cache ··· 165 165 preprocess.o symbol.o util.o 166 166 167 167 $(obj)/lexer.lex.o: $(obj)/parser.tab.h 168 - HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src) 169 - HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src) 168 + HOSTCFLAGS_lexer.lex.o := -I $(src) 169 + HOSTCFLAGS_parser.tab.o := -I $(src) 170 170 171 171 # conf: Used for defconfig, oldconfig and related targets 172 172 hostprogs += conf
+7 -9
scripts/kconfig/conf.c
··· 446 446 } 447 447 } 448 448 449 - static int conf_choice(struct menu *menu) 449 + static void conf_choice(struct menu *menu) 450 450 { 451 451 struct symbol *sym, *def_sym; 452 452 struct menu *child; ··· 459 459 sym_calc_value(sym); 460 460 switch (sym_get_tristate_value(sym)) { 461 461 case no: 462 - return 1; 463 462 case mod: 464 - return 0; 463 + return; 465 464 case yes: 466 465 break; 467 466 } 468 467 } else { 469 468 switch (sym_get_tristate_value(sym)) { 470 469 case no: 471 - return 1; 470 + return; 472 471 case mod: 473 472 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); 474 - return 0; 473 + return; 475 474 case yes: 476 475 break; 477 476 } ··· 496 497 printf("%*c", indent, '>'); 497 498 } else 498 499 printf("%*c", indent, ' '); 499 - printf(" %d. %s", cnt, menu_get_prompt(child)); 500 - if (child->sym->name) 501 - printf(" (%s)", child->sym->name); 500 + printf(" %d. %s (%s)", cnt, menu_get_prompt(child), 501 + child->sym->name); 502 502 if (!sym_has_value(child->sym)) 503 503 printf(" (NEW)"); 504 504 printf("\n"); ··· 550 552 continue; 551 553 } 552 554 sym_set_tristate_value(child->sym, yes); 553 - return 1; 555 + return; 554 556 } 555 557 } 556 558
+13 -33
scripts/kconfig/confdata.c
··· 502 502 503 503 for_all_symbols(sym) { 504 504 sym_calc_value(sym); 505 - if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE)) 505 + if (sym_is_choice(sym)) 506 506 continue; 507 507 if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { 508 508 /* check that calculated value agrees with saved value */ ··· 793 793 794 794 sym_clear_all_valid(); 795 795 796 - /* Traverse all menus to find all relevant symbols */ 797 - menu = rootmenu.list; 796 + menu_for_each_entry(menu) { 797 + struct menu *choice; 798 798 799 - while (menu != NULL) 800 - { 801 799 sym = menu->sym; 802 800 if (sym && !sym_is_choice(sym)) { 803 801 sym_calc_value(sym); 804 802 if (!(sym->flags & SYMBOL_WRITE)) 805 - goto next_menu; 803 + continue; 806 804 sym->flags &= ~SYMBOL_WRITE; 807 805 /* If we cannot change the symbol - skip */ 808 806 if (!sym_is_changeable(sym)) 809 - goto next_menu; 807 + continue; 810 808 /* If symbol equals to default value - skip */ 811 809 if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0) 812 - goto next_menu; 810 + continue; 813 811 814 812 /* 815 813 * If symbol is a choice value and equals to the 816 814 * default for a choice - skip. 817 - * But only if value is bool and equal to "y" and 818 - * choice is not "optional". 819 - * (If choice is "optional" then all values can be "n") 820 815 */ 821 - if (sym_is_choice_value(sym)) { 822 - struct symbol *cs; 816 + choice = sym_get_choice_menu(sym); 817 + if (choice) { 823 818 struct symbol *ds; 824 819 825 - cs = prop_get_symbol(sym_get_choice_prop(sym)); 826 - ds = sym_choice_default(cs); 827 - if (!sym_is_optional(cs) && sym == ds) { 820 + ds = sym_choice_default(choice->sym); 821 + if (sym == ds) { 828 822 if ((sym->type == S_BOOLEAN) && 829 823 sym_get_tristate_value(sym) == yes) 830 - goto next_menu; 824 + continue; 831 825 } 832 826 } 833 827 print_symbol_for_dotconfig(out, sym); 834 - } 835 - next_menu: 836 - if (menu->list != NULL) { 837 - menu = menu->list; 838 - } 839 - else if (menu->next != NULL) { 840 - menu = menu->next; 841 - } else { 842 - while ((menu = menu->parent)) { 843 - if (menu->next != NULL) { 844 - menu = menu->next; 845 - break; 846 - } 847 - } 848 828 } 849 829 } 850 830 fclose(out); ··· 886 906 "# %s\n" 887 907 "#\n", str); 888 908 need_newline = false; 889 - } else if (!(sym->flags & SYMBOL_CHOICE) && 909 + } else if (!sym_is_choice(sym) && 890 910 !(sym->flags & SYMBOL_WRITTEN)) { 891 911 sym_calc_value(sym); 892 912 if (!(sym->flags & SYMBOL_WRITE)) ··· 1008 1028 1009 1029 for_all_symbols(sym) { 1010 1030 sym_calc_value(sym); 1011 - if ((sym->flags & SYMBOL_NO_WRITE) || !sym->name) 1031 + if (sym_is_choice(sym)) 1012 1032 continue; 1013 1033 if (sym->flags & SYMBOL_WRITE) { 1014 1034 if (sym->flags & SYMBOL_DEF_AUTO) {
+1 -5
scripts/kconfig/expr.h
··· 72 72 /* 73 73 * Represents a configuration symbol. 74 74 * 75 - * Choices are represented as a special kind of symbol and have the 76 - * SYMBOL_CHOICE bit set in 'flags'. 75 + * Choices are represented as a special kind of symbol with null name. 77 76 */ 78 77 struct symbol { 79 78 /* link node for the hash table */ ··· 130 131 131 132 #define SYMBOL_CONST 0x0001 /* symbol is const */ 132 133 #define SYMBOL_CHECK 0x0008 /* used during dependency checking */ 133 - #define SYMBOL_CHOICE 0x0010 /* start of a choice block (null name) */ 134 134 #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ 135 135 #define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ 136 - #define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ 137 136 #define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ 138 137 #define SYMBOL_CHANGED 0x0400 /* ? */ 139 138 #define SYMBOL_WRITTEN 0x0800 /* track info to avoid double-write to .config */ 140 - #define SYMBOL_NO_WRITE 0x1000 /* Symbol for internal use only; it will not be written */ 141 139 #define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ 142 140 #define SYMBOL_WARNED 0x8000 /* warning has been issued */ 143 141
+12 -68
scripts/kconfig/gconf.c
··· 18 18 #include <unistd.h> 19 19 #include <time.h> 20 20 21 - //#define DEBUG 22 - 23 21 enum { 24 22 SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW 25 23 }; ··· 68 70 static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row); 69 71 static gchar **fill_row(struct menu *menu); 70 72 static void conf_changed(void); 71 - 72 - /* Helping/Debugging Functions */ 73 - #ifdef DEBUG 74 - static const char *dbg_sym_flags(int val) 75 - { 76 - static char buf[256]; 77 - 78 - bzero(buf, 256); 79 - 80 - if (val & SYMBOL_CONST) 81 - strcat(buf, "const/"); 82 - if (val & SYMBOL_CHECK) 83 - strcat(buf, "check/"); 84 - if (val & SYMBOL_CHOICE) 85 - strcat(buf, "choice/"); 86 - if (val & SYMBOL_CHOICEVAL) 87 - strcat(buf, "choiceval/"); 88 - if (val & SYMBOL_VALID) 89 - strcat(buf, "valid/"); 90 - if (val & SYMBOL_OPTIONAL) 91 - strcat(buf, "optional/"); 92 - if (val & SYMBOL_WRITE) 93 - strcat(buf, "write/"); 94 - if (val & SYMBOL_CHANGED) 95 - strcat(buf, "changed/"); 96 - if (val & SYMBOL_NO_WRITE) 97 - strcat(buf, "no_write/"); 98 - 99 - buf[strlen(buf) - 1] = '\0'; 100 - 101 - return buf; 102 - } 103 - #endif 104 73 105 74 static void replace_button_icon(GladeXML *xml, GdkDrawable *window, 106 75 GtkStyle *style, gchar *btn_name, gchar **xpm) ··· 458 493 if (conf_read(fn)) 459 494 text_insert_msg("Error", "Unable to load configuration !"); 460 495 else 461 - display_tree(&rootmenu); 496 + display_tree_part(); 462 497 } 463 498 464 499 void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data) ··· 1047 1082 row[COL_NAME] = g_strdup(sym->name); 1048 1083 1049 1084 sym_calc_value(sym); 1050 - sym->flags &= ~SYMBOL_CHANGED; 1085 + menu->flags &= ~MENU_CHANGED; 1051 1086 1052 1087 if (sym_is_choice(sym)) { // parse childs for getting final value 1053 1088 struct menu *child; 1054 1089 struct symbol *def_sym = sym_get_choice_value(sym); 1055 1090 struct menu *def_menu = NULL; 1056 - 1057 - row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); 1058 1091 1059 1092 for (child = menu->list; child; child = child->next) { 1060 1093 if (menu_is_visible(child) ··· 1063 1100 if (def_menu) 1064 1101 row[COL_VALUE] = 1065 1102 g_strdup(menu_get_prompt(def_menu)); 1103 + 1104 + if (sym_get_type(sym) == S_BOOLEAN) { 1105 + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); 1106 + return row; 1107 + } 1066 1108 } 1067 1109 if (sym->flags & SYMBOL_CHOICEVAL) 1068 1110 row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); ··· 1075 1107 stype = sym_get_type(sym); 1076 1108 switch (stype) { 1077 1109 case S_BOOLEAN: 1078 - if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) 1079 - row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); 1080 - if (sym_is_choice(sym)) 1081 - break; 1082 - /* fall through */ 1083 1110 case S_TRISTATE: 1084 1111 val = sym_get_tristate_value(sym); 1085 1112 switch (val) { ··· 1231 1268 else 1232 1269 menu2 = NULL; // force adding of a first child 1233 1270 1234 - #ifdef DEBUG 1235 - printf("%*c%s | %s\n", indent, ' ', 1236 - menu1 ? menu_get_prompt(menu1) : "nil", 1237 - menu2 ? menu_get_prompt(menu2) : "nil"); 1238 - #endif 1239 - 1240 1271 if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || 1241 1272 (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) || 1242 1273 (opt_mode == OPT_ALL && !menu_get_prompt(child1))) { ··· 1271 1314 else 1272 1315 goto reparse; // next child 1273 1316 } 1274 - } else if (sym && (sym->flags & SYMBOL_CHANGED)) { 1317 + } else if (sym && (child1->flags & MENU_CHANGED)) { 1275 1318 set_node(child2, menu1, fill_row(menu1)); 1276 1319 } 1277 1320 ··· 1287 1330 /* Display the whole tree (single/split/full view) */ 1288 1331 static void display_tree(struct menu *menu) 1289 1332 { 1290 - struct symbol *sym; 1291 1333 struct property *prop; 1292 1334 struct menu *child; 1293 1335 enum prop_type ptype; ··· 1298 1342 1299 1343 for (child = menu->list; child; child = child->next) { 1300 1344 prop = child->prompt; 1301 - sym = child->sym; 1302 1345 ptype = prop ? prop->type : P_UNKNOWN; 1303 1346 1304 - if (sym) 1305 - sym->flags &= ~SYMBOL_CHANGED; 1347 + menu->flags &= ~MENU_CHANGED; 1306 1348 1307 1349 if ((view_mode == SPLIT_VIEW) 1308 1350 && !(child->flags & MENU_ROOT) && (tree == tree1)) ··· 1314 1360 (opt_mode == OPT_PROMPT && menu_has_prompt(child)) || 1315 1361 (opt_mode == OPT_ALL && menu_get_prompt(child))) 1316 1362 place_node(child, fill_row(child)); 1317 - #ifdef DEBUG 1318 - printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); 1319 - printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); 1320 - printf("%s", prop_get_type_name(ptype)); 1321 - printf(" | "); 1322 - if (sym) { 1323 - printf("%s", sym_type_name(sym->type)); 1324 - printf(" | "); 1325 - printf("%s", dbg_sym_flags(sym->flags)); 1326 - printf("\n"); 1327 - } else 1328 - printf("\n"); 1329 - #endif 1363 + 1330 1364 if ((view_mode != FULL_VIEW) && (ptype == P_MENU) 1331 1365 && (tree == tree2)) 1332 1366 continue; ··· 1347 1405 display_tree(current); 1348 1406 else if (view_mode == SPLIT_VIEW) 1349 1407 display_tree(browsed); 1408 + else if (view_mode == FULL_VIEW) 1409 + display_tree(&rootmenu); 1350 1410 gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); 1351 1411 } 1352 1412
-1
scripts/kconfig/lexer.l
··· 120 120 "menuconfig" return T_MENUCONFIG; 121 121 "modules" return T_MODULES; 122 122 "on" return T_ON; 123 - "optional" return T_OPTIONAL; 124 123 "prompt" return T_PROMPT; 125 124 "range" return T_RANGE; 126 125 "select" return T_SELECT;
+7 -6
scripts/kconfig/lkc.h
··· 79 79 char *str_get(struct gstr *gs); 80 80 81 81 /* menu.c */ 82 + struct menu *menu_next(struct menu *menu, struct menu *root); 83 + #define menu_for_each_sub_entry(menu, root) \ 84 + for (menu = menu_next(root, root); menu; menu = menu_next(menu, root)) 85 + #define menu_for_each_entry(menu) \ 86 + menu_for_each_sub_entry(menu, &rootmenu) 82 87 void _menu_init(void); 83 88 void menu_warn(struct menu *menu, const char *fmt, ...); 84 89 struct menu *menu_add_menu(void); ··· 129 124 130 125 static inline bool sym_is_choice(struct symbol *sym) 131 126 { 132 - return sym->flags & SYMBOL_CHOICE ? true : false; 127 + /* A choice is a symbol with no name */ 128 + return sym->name == NULL; 133 129 } 134 130 135 131 static inline bool sym_is_choice_value(struct symbol *sym) 136 132 { 137 133 return sym->flags & SYMBOL_CHOICEVAL ? true : false; 138 - } 139 - 140 - static inline bool sym_is_optional(struct symbol *sym) 141 - { 142 - return sym->flags & SYMBOL_OPTIONAL ? true : false; 143 134 } 144 135 145 136 static inline bool sym_has_value(struct symbol *sym)
+1
scripts/kconfig/lkc_proto.h
··· 34 34 bool sym_set_string_value(struct symbol *sym, const char *newval); 35 35 bool sym_is_changeable(struct symbol *sym); 36 36 struct property * sym_get_choice_prop(struct symbol *sym); 37 + struct menu *sym_get_choice_menu(struct symbol *sym); 37 38 const char * sym_get_string_value(struct symbol *sym); 38 39 39 40 const char * prop_get_type_name(enum prop_type type);
-9
scripts/kconfig/lxdialog/util.c
··· 17 17 18 18 static void set_mono_theme(void) 19 19 { 20 - dlg.screen.atr = A_NORMAL; 21 - dlg.shadow.atr = A_NORMAL; 22 - dlg.dialog.atr = A_NORMAL; 23 20 dlg.title.atr = A_BOLD; 24 - dlg.border.atr = A_NORMAL; 25 21 dlg.button_active.atr = A_REVERSE; 26 22 dlg.button_inactive.atr = A_DIM; 27 23 dlg.button_key_active.atr = A_REVERSE; 28 24 dlg.button_key_inactive.atr = A_BOLD; 29 25 dlg.button_label_active.atr = A_REVERSE; 30 - dlg.button_label_inactive.atr = A_NORMAL; 31 - dlg.inputbox.atr = A_NORMAL; 32 26 dlg.position_indicator.atr = A_BOLD; 33 - dlg.menubox.atr = A_NORMAL; 34 - dlg.menubox_border.atr = A_NORMAL; 35 - dlg.item.atr = A_NORMAL; 36 27 dlg.item_selected.atr = A_REVERSE; 37 28 dlg.tag.atr = A_BOLD; 38 29 dlg.tag_selected.atr = A_REVERSE;
+42 -62
scripts/kconfig/mconf.c
··· 525 525 526 526 val = sym_get_tristate_value(sym); 527 527 if (sym_is_changeable(sym)) { 528 - switch (type) { 529 - case S_BOOLEAN: 530 - item_make("[%c]", val == no ? ' ' : '*'); 531 - break; 532 - case S_TRISTATE: 533 - switch (val) { 534 - case yes: ch = '*'; break; 535 - case mod: ch = 'M'; break; 536 - default: ch = ' '; break; 537 - } 538 - item_make("<%c>", ch); 539 - break; 528 + switch (val) { 529 + case yes: ch = '*'; break; 530 + case mod: ch = 'M'; break; 531 + default: ch = ' '; break; 540 532 } 533 + item_make("<%c>", ch); 541 534 item_set_tag('t'); 542 535 item_set_data(menu); 543 536 } else { ··· 541 548 542 549 item_add_str("%*c%s", indent + 1, ' ', menu_get_prompt(menu)); 543 550 if (val == yes) { 544 - if (def_menu) { 545 - item_add_str(" (%s)", menu_get_prompt(def_menu)); 546 - item_add_str(" --->"); 547 - if (def_menu->list) { 548 - indent += 2; 549 - build_conf(def_menu); 550 - indent -= 2; 551 - } 552 - } 551 + if (def_menu) 552 + item_add_str(" (%s) --->", menu_get_prompt(def_menu)); 553 553 return; 554 554 } 555 555 } else { ··· 554 568 } 555 569 child_count++; 556 570 val = sym_get_tristate_value(sym); 557 - if (sym_is_choice_value(sym) && val == yes) { 558 - item_make(" "); 559 - item_set_tag(':'); 571 + switch (type) { 572 + case S_BOOLEAN: 573 + if (sym_is_changeable(sym)) 574 + item_make("[%c]", val == no ? ' ' : '*'); 575 + else 576 + item_make("-%c-", val == no ? ' ' : '*'); 577 + item_set_tag('t'); 560 578 item_set_data(menu); 561 - } else { 562 - switch (type) { 563 - case S_BOOLEAN: 564 - if (sym_is_changeable(sym)) 565 - item_make("[%c]", val == no ? ' ' : '*'); 566 - else 567 - item_make("-%c-", val == no ? ' ' : '*'); 568 - item_set_tag('t'); 569 - item_set_data(menu); 570 - break; 571 - case S_TRISTATE: 572 - switch (val) { 573 - case yes: ch = '*'; break; 574 - case mod: ch = 'M'; break; 575 - default: ch = ' '; break; 576 - } 577 - if (sym_is_changeable(sym)) { 578 - if (sym->rev_dep.tri == mod) 579 - item_make("{%c}", ch); 580 - else 581 - item_make("<%c>", ch); 582 - } else 583 - item_make("-%c-", ch); 584 - item_set_tag('t'); 585 - item_set_data(menu); 586 - break; 587 - default: 588 - tmp = 2 + strlen(sym_get_string_value(sym)); /* () = 2 */ 589 - item_make("(%s)", sym_get_string_value(sym)); 590 - tmp = indent - tmp + 4; 591 - if (tmp < 0) 592 - tmp = 0; 593 - item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu), 594 - (sym_has_value(sym) || !sym_is_changeable(sym)) ? 595 - "" : " (NEW)"); 596 - item_set_tag('s'); 597 - item_set_data(menu); 598 - goto conf_childs; 579 + break; 580 + case S_TRISTATE: 581 + switch (val) { 582 + case yes: ch = '*'; break; 583 + case mod: ch = 'M'; break; 584 + default: ch = ' '; break; 599 585 } 586 + if (sym_is_changeable(sym)) { 587 + if (sym->rev_dep.tri == mod) 588 + item_make("{%c}", ch); 589 + else 590 + item_make("<%c>", ch); 591 + } else 592 + item_make("-%c-", ch); 593 + item_set_tag('t'); 594 + item_set_data(menu); 595 + break; 596 + default: 597 + tmp = 2 + strlen(sym_get_string_value(sym)); /* () = 2 */ 598 + item_make("(%s)", sym_get_string_value(sym)); 599 + tmp = indent - tmp + 4; 600 + if (tmp < 0) 601 + tmp = 0; 602 + item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu), 603 + (sym_has_value(sym) || !sym_is_changeable(sym)) ? 604 + "" : " (NEW)"); 605 + item_set_tag('s'); 606 + item_set_data(menu); 607 + goto conf_childs; 600 608 } 601 609 item_add_str("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu), 602 610 (sym_has_value(sym) || !sym_is_changeable(sym)) ?
+27 -24
scripts/kconfig/menu.c
··· 17 17 struct menu rootmenu; 18 18 static struct menu **last_entry_ptr; 19 19 20 + /** 21 + * menu_next - return the next menu entry with depth-first traversal 22 + * @menu: pointer to the current menu 23 + * @root: root of the sub-tree to traverse. If NULL is given, the traveral 24 + * continues until it reaches the end of the entire menu tree. 25 + * return: the menu to visit next, or NULL when it reaches the end. 26 + */ 27 + struct menu *menu_next(struct menu *menu, struct menu *root) 28 + { 29 + if (menu->list) 30 + return menu->list; 31 + 32 + while (menu != root && !menu->next) 33 + menu = menu->parent; 34 + 35 + if (menu == root) 36 + return NULL; 37 + 38 + return menu->next; 39 + } 40 + 20 41 void menu_warn(struct menu *menu, const char *fmt, ...) 21 42 { 22 43 va_list ap; ··· 263 242 sym->name); 264 243 } 265 244 if (sym_is_choice(sym)) { 266 - struct property *choice_prop = 267 - sym_get_choice_prop(sym2); 245 + struct menu *choice = sym_get_choice_menu(sym2); 268 246 269 - if (!choice_prop || 270 - prop_get_symbol(choice_prop) != sym) 247 + if (!choice || choice->sym != sym) 271 248 prop_warn(prop, 272 249 "choice default symbol '%s' is not contained in the choice", 273 250 sym2->name); ··· 505 486 menu->sym && !sym_is_choice_value(menu->sym)) { 506 487 current_entry = menu; 507 488 menu->sym->flags |= SYMBOL_CHOICEVAL; 508 - if (!menu->prompt) 509 - menu_warn(menu, "choice value must have a prompt"); 510 - for (prop = menu->sym->prop; prop; prop = prop->next) { 511 - if (prop->type == P_DEFAULT) 512 - prop_warn(prop, "defaults for choice " 513 - "values not supported"); 514 - if (prop->menu == menu) 515 - continue; 516 - if (prop->type == P_PROMPT && 517 - prop->menu->parent->sym != sym) 518 - prop_warn(prop, "choice value used outside its choice group"); 519 - } 520 489 /* Non-tristate choice values of tristate choices must 521 490 * depend on the choice being set to Y. The choice 522 491 * values' dependencies were propagated to their ··· 579 572 } 580 573 581 574 /* 582 - * For non-optional choices, add a reverse dependency (corresponding to 583 - * a select) of '<visibility> && m'. This prevents the user from 584 - * setting the choice mode to 'n' when the choice is visible. 585 - * 586 - * This would also work for non-choice symbols, but only non-optional 587 - * choices clear SYMBOL_OPTIONAL as of writing. Choices are implemented 588 - * as a type of symbol. 575 + * For choices, add a reverse dependency (corresponding to a select) of 576 + * '<visibility> && m'. This prevents the user from setting the choice 577 + * mode to 'n' when the choice is visible. 589 578 */ 590 - if (sym && !sym_is_optional(sym) && parent->prompt) { 579 + if (sym && sym_is_choice(sym) && parent->prompt) { 591 580 sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, 592 581 expr_alloc_and(parent->prompt->visible.expr, 593 582 expr_alloc_symbol(&symbol_mod)));
+47 -71
scripts/kconfig/nconf.c
··· 826 826 827 827 val = sym_get_tristate_value(sym); 828 828 if (sym_is_changeable(sym)) { 829 - switch (type) { 830 - case S_BOOLEAN: 831 - item_make(menu, 't', "[%c]", 832 - val == no ? ' ' : '*'); 829 + switch (val) { 830 + case yes: 831 + ch = '*'; 833 832 break; 834 - case S_TRISTATE: 835 - switch (val) { 836 - case yes: 837 - ch = '*'; 838 - break; 839 - case mod: 840 - ch = 'M'; 841 - break; 842 - default: 843 - ch = ' '; 844 - break; 845 - } 846 - item_make(menu, 't', "<%c>", ch); 833 + case mod: 834 + ch = 'M'; 835 + break; 836 + default: 837 + ch = ' '; 847 838 break; 848 839 } 840 + item_make(menu, 't', "<%c>", ch); 849 841 } else { 850 842 item_make(menu, def_menu ? 't' : ':', " "); 851 843 } ··· 845 853 item_add_str("%*c%s", indent + 1, 846 854 ' ', menu_get_prompt(menu)); 847 855 if (val == yes) { 848 - if (def_menu) { 849 - item_add_str(" (%s)", 850 - menu_get_prompt(def_menu)); 851 - item_add_str(" --->"); 852 - if (def_menu->list) { 853 - indent += 2; 854 - build_conf(def_menu); 855 - indent -= 2; 856 - } 857 - } 856 + if (def_menu) 857 + item_add_str(" (%s) --->", menu_get_prompt(def_menu)); 858 858 return; 859 859 } 860 860 } else { ··· 858 874 } 859 875 child_count++; 860 876 val = sym_get_tristate_value(sym); 861 - if (sym_is_choice_value(sym) && val == yes) { 862 - item_make(menu, ':', " "); 863 - } else { 864 - switch (type) { 865 - case S_BOOLEAN: 866 - if (sym_is_changeable(sym)) 867 - item_make(menu, 't', "[%c]", 868 - val == no ? ' ' : '*'); 869 - else 870 - item_make(menu, 't', "-%c-", 871 - val == no ? ' ' : '*'); 877 + switch (type) { 878 + case S_BOOLEAN: 879 + if (sym_is_changeable(sym)) 880 + item_make(menu, 't', "[%c]", 881 + val == no ? ' ' : '*'); 882 + else 883 + item_make(menu, 't', "-%c-", 884 + val == no ? ' ' : '*'); 885 + break; 886 + case S_TRISTATE: 887 + switch (val) { 888 + case yes: 889 + ch = '*'; 872 890 break; 873 - case S_TRISTATE: 874 - switch (val) { 875 - case yes: 876 - ch = '*'; 877 - break; 878 - case mod: 879 - ch = 'M'; 880 - break; 881 - default: 882 - ch = ' '; 883 - break; 884 - } 885 - if (sym_is_changeable(sym)) { 886 - if (sym->rev_dep.tri == mod) 887 - item_make(menu, 888 - 't', "{%c}", ch); 889 - else 890 - item_make(menu, 891 - 't', "<%c>", ch); 892 - } else 893 - item_make(menu, 't', "-%c-", ch); 891 + case mod: 892 + ch = 'M'; 894 893 break; 895 894 default: 896 - tmp = 2 + strlen(sym_get_string_value(sym)); 897 - item_make(menu, 's', " (%s)", 898 - sym_get_string_value(sym)); 899 - tmp = indent - tmp + 4; 900 - if (tmp < 0) 901 - tmp = 0; 902 - item_add_str("%*c%s%s", tmp, ' ', 903 - menu_get_prompt(menu), 904 - (sym_has_value(sym) || 905 - !sym_is_changeable(sym)) ? "" : 906 - " (NEW)"); 907 - goto conf_childs; 895 + ch = ' '; 896 + break; 908 897 } 898 + if (sym_is_changeable(sym)) { 899 + if (sym->rev_dep.tri == mod) 900 + item_make(menu, 't', "{%c}", ch); 901 + else 902 + item_make(menu, 't', "<%c>", ch); 903 + } else 904 + item_make(menu, 't', "-%c-", ch); 905 + break; 906 + default: 907 + tmp = 2 + strlen(sym_get_string_value(sym)); 908 + item_make(menu, 's', " (%s)", 909 + sym_get_string_value(sym)); 910 + tmp = indent - tmp + 4; 911 + if (tmp < 0) 912 + tmp = 0; 913 + item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu), 914 + (sym_has_value(sym) || 915 + !sym_is_changeable(sym)) ? "" : " (NEW)"); 916 + goto conf_childs; 909 917 } 910 918 item_add_str("%*c%s%s", indent + 1, ' ', 911 919 menu_get_prompt(menu),
+55 -21
scripts/kconfig/parser.y
··· 30 30 31 31 struct menu *current_menu, *current_entry; 32 32 33 + static bool inside_choice = false; 34 + 33 35 %} 34 36 35 37 %union ··· 71 69 %token T_MODULES 72 70 %token T_ON 73 71 %token T_OPEN_PAREN 74 - %token T_OPTIONAL 75 72 %token T_PLUS_EQUAL 76 73 %token T_PROMPT 77 74 %token T_RANGE ··· 141 140 142 141 config_entry_start: T_CONFIG nonconst_symbol T_EOL 143 142 { 144 - $2->flags |= SYMBOL_OPTIONAL; 145 143 menu_add_entry($2); 146 144 printd(DEBUG_PARSE, "%s:%d:config %s\n", cur_filename, cur_lineno, $2->name); 147 145 }; 148 146 149 147 config_stmt: config_entry_start config_option_list 150 148 { 149 + if (inside_choice) { 150 + if (!current_entry->prompt) { 151 + fprintf(stderr, "%s:%d: error: choice member must have a prompt\n", 152 + current_entry->filename, current_entry->lineno); 153 + yynerrs++; 154 + } 155 + } 156 + 151 157 printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno); 152 158 }; 153 159 154 160 menuconfig_entry_start: T_MENUCONFIG nonconst_symbol T_EOL 155 161 { 156 - $2->flags |= SYMBOL_OPTIONAL; 157 162 menu_add_entry($2); 158 163 printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", cur_filename, cur_lineno, $2->name); 159 164 }; ··· 231 224 232 225 choice: T_CHOICE T_EOL 233 226 { 234 - struct symbol *sym = sym_lookup(NULL, SYMBOL_CHOICE); 235 - sym->flags |= SYMBOL_NO_WRITE; 227 + struct symbol *sym = sym_lookup(NULL, 0); 228 + 236 229 menu_add_entry(sym); 237 230 menu_add_expr(P_CHOICE, NULL, NULL); 238 231 printd(DEBUG_PARSE, "%s:%d:choice\n", cur_filename, cur_lineno); ··· 247 240 } 248 241 249 242 $$ = menu_add_menu(); 243 + 244 + inside_choice = true; 250 245 }; 251 246 252 247 choice_end: end 253 248 { 249 + inside_choice = false; 250 + 254 251 if (zconf_endtoken($1, "choice")) { 255 252 menu_end_menu(); 256 253 printd(DEBUG_PARSE, "%s:%d:endchoice\n", cur_filename, cur_lineno); ··· 281 270 { 282 271 menu_set_type($1); 283 272 printd(DEBUG_PARSE, "%s:%d:type(%u)\n", cur_filename, cur_lineno, $1); 284 - }; 285 - 286 - choice_option: T_OPTIONAL T_EOL 287 - { 288 - current_entry->sym->flags |= SYMBOL_OPTIONAL; 289 - printd(DEBUG_PARSE, "%s:%d:optional\n", cur_filename, cur_lineno); 290 273 }; 291 274 292 275 choice_option: T_DEFAULT nonconst_symbol if_expr T_EOL ··· 476 471 477 472 %% 478 473 474 + /** 475 + * choice_check_sanity - check sanity of a choice member 476 + * 477 + * @menu: menu of the choice member 478 + * 479 + * Return: -1 if an error is found, 0 otherwise. 480 + */ 481 + static int choice_check_sanity(struct menu *menu) 482 + { 483 + struct property *prop; 484 + int ret = 0; 485 + 486 + for (prop = menu->sym->prop; prop; prop = prop->next) { 487 + if (prop->type == P_DEFAULT) { 488 + fprintf(stderr, "%s:%d: error: %s", 489 + prop->filename, prop->lineno, 490 + "defaults for choice values not supported\n"); 491 + ret = -1; 492 + } 493 + 494 + if (prop->menu != menu && prop->type == P_PROMPT && 495 + prop->menu->parent != menu->parent) { 496 + fprintf(stderr, "%s:%d: error: %s", 497 + prop->filename, prop->lineno, 498 + "choice value has a prompt outside its choice group\n"); 499 + ret = -1; 500 + } 501 + } 502 + 503 + return ret; 504 + } 505 + 479 506 void conf_parse(const char *name) 480 507 { 481 508 struct menu *menu; ··· 554 517 555 518 menu_finalize(); 556 519 557 - menu = &rootmenu; 558 - while (menu) { 520 + menu_for_each_entry(menu) { 521 + struct menu *child; 522 + 559 523 if (menu->sym && sym_check_deps(menu->sym)) 560 524 yynerrs++; 561 525 562 - if (menu->list) { 563 - menu = menu->list; 564 - continue; 526 + if (menu->sym && sym_is_choice(menu->sym)) { 527 + menu_for_each_sub_entry(child, menu) 528 + if (child->sym && choice_check_sanity(child)) 529 + yynerrs++; 565 530 } 566 - 567 - while (!menu->next && menu->parent) 568 - menu = menu->parent; 569 - 570 - menu = menu->next; 571 531 } 572 532 573 533 if (yynerrs)
+55 -18
scripts/kconfig/symbol.c
··· 78 78 return NULL; 79 79 } 80 80 81 + /** 82 + * sym_get_choice_menu - get the parent choice menu if present 83 + * 84 + * @sym: a symbol pointer 85 + * 86 + * Return: a choice menu if this function is called against a choice member. 87 + */ 88 + struct menu *sym_get_choice_menu(struct symbol *sym) 89 + { 90 + struct menu *menu = NULL; 91 + struct menu *m; 92 + 93 + /* 94 + * Choice members must have a prompt. Find a menu entry with a prompt, 95 + * and assume it resides inside a choice block. 96 + */ 97 + list_for_each_entry(m, &sym->menus, link) 98 + if (m->prompt) { 99 + menu = m; 100 + break; 101 + } 102 + 103 + if (!menu) 104 + return NULL; 105 + 106 + do { 107 + menu = menu->parent; 108 + } while (menu && !menu->sym); 109 + 110 + if (menu && menu->sym && sym_is_choice(menu->sym)) 111 + return menu; 112 + 113 + return NULL; 114 + } 115 + 81 116 static struct property *sym_get_default_prop(struct symbol *sym) 82 117 { 83 118 struct property *prop; ··· 187 152 188 153 static void sym_set_changed(struct symbol *sym) 189 154 { 190 - struct property *prop; 155 + struct menu *menu; 191 156 192 157 sym->flags |= SYMBOL_CHANGED; 193 - for (prop = sym->prop; prop; prop = prop->next) { 194 - if (prop->menu) 195 - prop->menu->flags |= MENU_CHANGED; 196 - } 158 + list_for_each_entry(menu, &sym->menus, link) 159 + menu->flags |= MENU_CHANGED; 197 160 } 198 161 199 162 static void sym_set_all_changed(void) ··· 499 466 if (sym->flags & SYMBOL_CHANGED) 500 467 sym_set_changed(choice_sym); 501 468 } 502 - } 503 469 504 - if (sym->flags & SYMBOL_NO_WRITE) 505 470 sym->flags &= ~SYMBOL_WRITE; 471 + } 506 472 507 473 if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) 508 474 set_all_choice_values(sym); ··· 859 827 if (symbol->name && 860 828 !strcmp(symbol->name, name) && 861 829 (flags ? symbol->flags & flags 862 - : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) 830 + : !(symbol->flags & SYMBOL_CONST))) 863 831 return symbol; 864 832 } 865 833 new_name = xstrdup(name); ··· 1204 1172 1205 1173 static struct symbol *sym_check_choice_deps(struct symbol *choice) 1206 1174 { 1207 - struct symbol *sym, *sym2; 1208 - struct property *prop; 1209 - struct expr *e; 1175 + struct menu *choice_menu, *menu; 1176 + struct symbol *sym2; 1210 1177 struct dep_stack stack; 1211 1178 1212 1179 dep_stack_insert(&stack, choice); 1213 1180 1214 - prop = sym_get_choice_prop(choice); 1215 - expr_list_for_each_sym(prop->expr, e, sym) 1216 - sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); 1181 + choice_menu = list_first_entry(&choice->menus, struct menu, link); 1182 + 1183 + menu_for_each_sub_entry(menu, choice_menu) { 1184 + if (menu->sym) 1185 + menu->sym->flags |= SYMBOL_CHECK | SYMBOL_CHECKED; 1186 + } 1217 1187 1218 1188 choice->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); 1219 1189 sym2 = sym_check_sym_deps(choice); ··· 1223 1189 if (sym2) 1224 1190 goto out; 1225 1191 1226 - expr_list_for_each_sym(prop->expr, e, sym) { 1227 - sym2 = sym_check_sym_deps(sym); 1192 + menu_for_each_sub_entry(menu, choice_menu) { 1193 + if (!menu->sym) 1194 + continue; 1195 + sym2 = sym_check_sym_deps(menu->sym); 1228 1196 if (sym2) 1229 1197 break; 1230 1198 } 1231 1199 out: 1232 - expr_list_for_each_sym(prop->expr, e, sym) 1233 - sym->flags &= ~SYMBOL_CHECK; 1200 + menu_for_each_sub_entry(menu, choice_menu) 1201 + if (menu->sym) 1202 + menu->sym->flags &= ~SYMBOL_CHECK; 1234 1203 1235 1204 if (sym2 && sym_is_choice_value(sym2) && 1236 1205 prop_get_symbol(sym_get_choice_prop(sym2)) == choice)
-26
scripts/kconfig/tests/choice/Kconfig
··· 18 18 endchoice 19 19 20 20 choice 21 - prompt "optional boolean choice" 22 - optional 23 - default OPT_BOOL_CHOICE1 24 - 25 - config OPT_BOOL_CHOICE0 26 - bool "choice 0" 27 - 28 - config OPT_BOOL_CHOICE1 29 - bool "choice 1" 30 - 31 - endchoice 32 - 33 - choice 34 21 prompt "tristate choice" 35 22 default TRI_CHOICE1 36 23 ··· 25 38 tristate "choice 0" 26 39 27 40 config TRI_CHOICE1 28 - tristate "choice 1" 29 - 30 - endchoice 31 - 32 - choice 33 - prompt "optional tristate choice" 34 - optional 35 - default OPT_TRI_CHOICE1 36 - 37 - config OPT_TRI_CHOICE0 38 - tristate "choice 0" 39 - 40 - config OPT_TRI_CHOICE1 41 41 tristate "choice 1" 42 42 43 43 endchoice
-2
scripts/kconfig/tests/choice/__init__.py
··· 6 6 7 7 The behavior of 'y' choice is intuitive. If choice values are tristate, 8 8 the choice can be 'm' where each value can be enabled independently. 9 - Also, if a choice is marked as 'optional', the whole choice can be 10 - invisible. 11 9 """ 12 10 13 11
-4
scripts/kconfig/tests/choice/allmod_expected_config
··· 1 1 CONFIG_MODULES=y 2 2 # CONFIG_BOOL_CHOICE0 is not set 3 3 CONFIG_BOOL_CHOICE1=y 4 - # CONFIG_OPT_BOOL_CHOICE0 is not set 5 - CONFIG_OPT_BOOL_CHOICE1=y 6 4 CONFIG_TRI_CHOICE0=m 7 5 CONFIG_TRI_CHOICE1=m 8 - CONFIG_OPT_TRI_CHOICE0=m 9 - CONFIG_OPT_TRI_CHOICE1=m
-4
scripts/kconfig/tests/choice/allyes_expected_config
··· 1 1 CONFIG_MODULES=y 2 2 # CONFIG_BOOL_CHOICE0 is not set 3 3 CONFIG_BOOL_CHOICE1=y 4 - # CONFIG_OPT_BOOL_CHOICE0 is not set 5 - CONFIG_OPT_BOOL_CHOICE1=y 6 4 # CONFIG_TRI_CHOICE0 is not set 7 5 CONFIG_TRI_CHOICE1=y 8 - # CONFIG_OPT_TRI_CHOICE0 is not set 9 - CONFIG_OPT_TRI_CHOICE1=y
-2
scripts/kconfig/tests/choice/oldask0_expected_stdout
··· 3 3 1. choice 0 (BOOL_CHOICE0) (NEW) 4 4 > 2. choice 1 (BOOL_CHOICE1) (NEW) 5 5 choice[1-2?]: 6 - optional boolean choice [N/y/?] (NEW) 7 6 tristate choice [M/y/?] (NEW) 8 7 choice 0 (TRI_CHOICE0) [N/m/?] (NEW) 9 8 choice 1 (TRI_CHOICE1) [N/m/?] (NEW) 10 - optional tristate choice [N/m/y/?] (NEW)
-1
scripts/kconfig/tests/choice/oldask1_config
··· 1 1 # CONFIG_MODULES is not set 2 - CONFIG_OPT_BOOL_CHOICE0=y
-6
scripts/kconfig/tests/choice/oldask1_expected_stdout
··· 3 3 1. choice 0 (BOOL_CHOICE0) (NEW) 4 4 > 2. choice 1 (BOOL_CHOICE1) (NEW) 5 5 choice[1-2?]: 6 - optional boolean choice [Y/n/?] (NEW) 7 - optional boolean choice 8 - > 1. choice 0 (OPT_BOOL_CHOICE0) 9 - 2. choice 1 (OPT_BOOL_CHOICE1) (NEW) 10 - choice[1-2?]: 11 6 tristate choice 12 7 1. choice 0 (TRI_CHOICE0) (NEW) 13 8 > 2. choice 1 (TRI_CHOICE1) (NEW) 14 9 choice[1-2?]: 15 - optional tristate choice [N/y/?]
-1
scripts/mod/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - OBJECT_FILES_NON_STANDARD := y 3 2 CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) 4 3 5 4 hostprogs-always-y += modpost mk_elfconfig
+1
scripts/module.lds.S
··· 13 13 /DISCARD/ : { 14 14 *(.discard) 15 15 *(.discard.*) 16 + *(.export_symbol) 16 17 } 17 18 18 19 __ksymtab 0 : { *(SORT(___ksymtab+*)) }
+15 -19
scripts/package/buildtar
··· 53 53 # 54 54 # Install arch-specific kernel image(s) 55 55 # 56 + # Note: 57 + # mips and arm64 copy the first image found. This may not produce the desired 58 + # outcome because it may pick up a stale file remaining in the build tree. 59 + # 56 60 case "${ARCH}" in 57 - x86|i386|x86_64) 58 - [ -f "${objtree}/arch/x86/boot/bzImage" ] && cp -v -- "${objtree}/arch/x86/boot/bzImage" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" 59 - ;; 60 61 alpha) 61 - [ -f "${objtree}/arch/alpha/boot/vmlinux.gz" ] && cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" 62 + cp -v -- "${objtree}/arch/alpha/boot/vmlinux.gz" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" 62 63 ;; 63 64 parisc*) 64 - [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" 65 + cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" 65 66 [ -f "${objtree}/lifimage" ] && cp -v -- "${objtree}/lifimage" "${tmpdir}/boot/lifimage-${KERNELRELEASE}" 66 67 ;; 67 68 mips) 69 + # Please note the following code may copy a stale file. 68 70 if [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.bin" ]; then 69 71 cp -v -- "${objtree}/arch/mips/boot/compressed/vmlinux.bin" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" 70 72 elif [ -f "${objtree}/arch/mips/boot/compressed/vmlinux.ecoff" ]; then ··· 88 86 fi 89 87 ;; 90 88 arm64) 89 + # Please note the following code may copy a stale file. 91 90 for i in Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo vmlinuz.efi ; do 92 91 if [ -f "${objtree}/arch/arm64/boot/${i}" ] ; then 93 92 cp -v -- "${objtree}/arch/arm64/boot/${i}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" ··· 97 94 done 98 95 ;; 99 96 riscv) 100 - for i in Image.bz2 Image.gz Image; do 101 - if [ -f "${objtree}/arch/riscv/boot/${i}" ] ; then 102 - cp -v -- "${objtree}/arch/riscv/boot/${i}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}" 103 - break 104 - fi 105 - done 97 + case "${KBUILD_IMAGE##*/}" in 98 + Image.*|vmlinuz.efi) 99 + cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}";; 100 + *) 101 + cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-${KERNELRELEASE}";; 102 + esac 106 103 ;; 107 104 *) 108 - [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${KERNELRELEASE}" 109 - echo "" >&2 110 - echo '** ** ** WARNING ** ** **' >&2 111 - echo "" >&2 112 - echo "Your architecture did not define any architecture-dependent files" >&2 113 - echo "to be placed into the tarball. Please add those to ${0} ..." >&2 114 - echo "" >&2 115 - sleep 5 105 + cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinuz-${KERNELRELEASE}" 116 106 ;; 117 107 esac
+6 -6
scripts/unifdef.c
··· 203 203 static int delcount; /* count of deleted lines */ 204 204 static unsigned blankcount; /* count of blank lines */ 205 205 static unsigned blankmax; /* maximum recent blankcount */ 206 - static bool constexpr; /* constant #if expression */ 206 + static bool constexpression; /* constant #if expression */ 207 207 static bool zerosyms = true; /* to format symdepth output */ 208 208 static bool firstsym; /* ditto */ 209 209 ··· 819 819 /* 820 820 * Function for evaluating the innermost parts of expressions, 821 821 * viz. !expr (expr) number defined(symbol) symbol 822 - * We reset the constexpr flag in the last two cases. 822 + * We reset the constexpression flag in the last two cases. 823 823 */ 824 824 static Linetype 825 825 eval_unary(const struct ops *ops, int *valp, const char **cpp) ··· 877 877 cp = skipcomment(cp); 878 878 if (defparen && *cp++ != ')') 879 879 return (LT_ERROR); 880 - constexpr = false; 880 + constexpression = false; 881 881 } else if (!endsym(*cp)) { 882 882 debug("eval%d symbol", ops - eval_ops); 883 883 sym = findsym(cp); ··· 895 895 lt = *valp ? LT_TRUE : LT_FALSE; 896 896 cp = skipargs(cp); 897 897 } 898 - constexpr = false; 898 + constexpression = false; 899 899 } else { 900 900 debug("eval%d bad expr", ops - eval_ops); 901 901 return (LT_ERROR); ··· 955 955 int val = 0; 956 956 957 957 debug("eval %s", *cpp); 958 - constexpr = killconsts ? false : true; 958 + constexpression = killconsts ? false : true; 959 959 ret = eval_table(eval_ops, &val, cpp); 960 960 debug("eval = %d", val); 961 - return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); 961 + return (constexpression ? LT_IF : ret == LT_ERROR ? LT_IF : ret); 962 962 } 963 963 964 964 /*
+1 -1
security/tomoyo/Makefile
··· 11 11 printf '\t"";\n';) \ 12 12 } > $@ 13 13 14 - $(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(srctree)/$(src)/policy/*.conf.default) FORCE 14 + $(obj)/builtin-policy.h: $(wildcard $(obj)/policy/*.conf $(src)/policy/*.conf.default) FORCE 15 15 $(call if_changed,policy) 16 16 17 17 ifndef CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
+1 -1
usr/Makefile
··· 22 22 # If CONFIG_INITRAMFS_SOURCE is empty, generate a small initramfs with the 23 23 # default contents. 24 24 ifeq ($(ramfs-input),) 25 - ramfs-input := $(srctree)/$(src)/default_cpio_list 25 + ramfs-input := $(src)/default_cpio_list 26 26 endif 27 27 28 28 ifeq ($(words $(ramfs-input)),1)
+1 -1
usr/include/Makefile
··· 78 78 cmd_hdrtest = \ 79 79 $(CC) $(c_flags) -fsyntax-only -x c /dev/null \ 80 80 $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \ 81 - $(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \ 81 + $(PERL) $(src)/headers_check.pl $(obj) $(SRCARCH) $<; \ 82 82 touch $@ 83 83 84 84 $(obj)/%.hdrtest: $(obj)/%.h FORCE