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

Merge tag 'kbuild-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

- add build_{menu,n,g,x}config targets for compile-testing Kconfig

- fix and improve recursive dependency detection in Kconfig

- fix parallel building of menuconfig/nconfig

- fix syntax error in clang-version.sh

- suppress distracting log from syncconfig

- remove obsolete "rpm" target

- remove VMLINUX_SYMBOL(_STR) macro entirely

- fix microblaze build with CONFIG_DYNAMIC_FTRACE

- move compiler test for dead code/data elimination to Kconfig

- rename well-known LDFLAGS variable to KBUILD_LDFLAGS

- misc fixes and cleanups

* tag 'kbuild-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: rename LDFLAGS to KBUILD_LDFLAGS
kbuild: pass LDFLAGS to recordmcount.pl
kbuild: test dead code/data elimination support in Kconfig
initramfs: move gen_initramfs_list.sh from scripts/ to usr/
vmlinux.lds.h: remove stale <linux/export.h> include
export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR()
Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci
kbuild: make sorting initramfs contents independent of locale
kbuild: remove "rpm" target, which is alias of "rpm-pkg"
kbuild: Fix LOADLIBES rename in Documentation/kbuild/makefiles.txt
kconfig: suppress "configuration written to .config" for syncconfig
kconfig: fix "Can't open ..." in parallel build
kbuild: Add a space after `!` to prevent parsing as file pattern
scripts: modpost: check memory allocation results
kconfig: improve the recursive dependency report
kconfig: report recursive dependency involving 'imply'
kconfig: error out when seeing recursive dependency
kconfig: add build-only configurator targets
scripts/dtc: consolidate include path options in Makefile

+189 -210
+3 -3
Documentation/early-userspace/README
··· 66 66 67 67 As a technical note, when directories and files are specified, the 68 68 entire CONFIG_INITRAMFS_SOURCE is passed to 69 - scripts/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE 69 + usr/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE 70 70 can really be interpreted as any legal argument to 71 71 gen_initramfs_list.sh. If a directory is specified as an argument then 72 72 the contents are scanned, uid/gid translation is performed, and 73 73 usr/gen_init_cpio file directives are output. If a directory is 74 - specified as an argument to scripts/gen_initramfs_list.sh then the 74 + specified as an argument to usr/gen_initramfs_list.sh then the 75 75 contents of the file are simply copied to the output. All of the output 76 76 directives from directory scanning and file contents copying are 77 77 processed by usr/gen_init_cpio. 78 78 79 - See also 'scripts/gen_initramfs_list.sh -h'. 79 + See also 'usr/gen_initramfs_list.sh -h'. 80 80 81 81 Where's this all leading? 82 82 =========================
+1 -1
Documentation/filesystems/ramfs-rootfs-initramfs.txt
··· 164 164 The kernel does not depend on external cpio tools. If you specify a 165 165 directory instead of a configuration file, the kernel's build infrastructure 166 166 creates a configuration file from that directory (usr/Makefile calls 167 - scripts/gen_initramfs_list.sh), and proceeds to package up that directory 167 + usr/gen_initramfs_list.sh), and proceeds to package up that directory 168 168 using the config file (by feeding it to usr/gen_init_cpio, which is created 169 169 from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is 170 170 entirely self-contained, and the kernel's boot-time extractor is also
+1 -2
Documentation/kbuild/kconfig-language.txt
··· 545 545 Practical solutions to kconfig recursive issue 546 546 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 547 547 548 - Developers who run into the recursive Kconfig issue have three options 548 + Developers who run into the recursive Kconfig issue have two options 549 549 at their disposal. We document them below and also provide a list of 550 550 historical issues resolved through these different solutions. 551 551 ··· 553 553 b) Match dependency semantics: 554 554 b1) Swap all "select FOO" to "depends on FOO" or, 555 555 b2) Swap all "depends on FOO" to "select FOO" 556 - c) Consider the use of "imply" instead of "select" 557 556 558 557 The resolution to a) can be tested with the sample Kconfig file 559 558 Documentation/kbuild/Kconfig.recursion-issue-01 through the removal
+1 -1
Documentation/kbuild/makefiles.txt
··· 680 680 681 681 Example: 682 682 #scripts/kconfig/Makefile 683 - HOSTLOADLIBES_qconf := -L$(QTDIR)/lib 683 + HOSTLDLIBS_qconf := -L$(QTDIR)/lib 684 684 685 685 When linking qconf, it will be passed the extra option 686 686 "-L$(QTDIR)/lib".
+5 -13
Makefile
··· 440 440 KBUILD_AFLAGS_MODULE := -DMODULE 441 441 KBUILD_CFLAGS_MODULE := -DMODULE 442 442 KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds 443 - LDFLAGS := 443 + KBUILD_LDFLAGS := 444 444 GCC_PLUGINS_CFLAGS := 445 445 446 446 export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC ··· 448 448 export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE 449 449 export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 450 450 451 - export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 451 + export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS 452 452 export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 453 453 export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN 454 454 export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE ··· 790 790 endif 791 791 792 792 ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION 793 - KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,) 794 - KBUILD_CFLAGS_KERNEL += $(call cc-option,-fdata-sections,) 793 + KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections 794 + LDFLAGS_vmlinux += --gc-sections 795 795 endif 796 796 797 797 # arch Makefile may override CC so keep this after arch Makefile is included ··· 856 856 LDFLAGS_BUILD_ID := $(call ld-option, --build-id) 857 857 KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 858 858 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 859 - 860 - ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION 861 - LDFLAGS_vmlinux += $(call ld-option, --gc-sections,) 862 - endif 863 859 864 860 ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 865 861 LDFLAGS_vmlinux += $(call ld-option, -X,) ··· 1020 1024 1021 1025 # Final link of vmlinux with optional arch pass after final link 1022 1026 cmd_link-vmlinux = \ 1023 - $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \ 1027 + $(CONFIG_SHELL) $< $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) ; \ 1024 1028 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) 1025 1029 1026 1030 vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE ··· 1350 1354 1351 1355 # Packaging of the kernel to various formats 1352 1356 # --------------------------------------------------------------------------- 1353 - # rpm target kept for backward compatibility 1354 1357 package-dir := scripts/package 1355 1358 1356 1359 %src-pkg: FORCE 1357 1360 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1358 1361 %pkg: include/config/kernel.release FORCE 1359 1362 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1360 - rpm: rpm-pkg 1361 - @echo " WARNING: \"rpm\" target will be removed after Linux 4.18" 1362 - @echo " Please use \"rpm-pkg\" instead." 1363 1363 1364 1364 1365 1365 # Brief documentation of the typical targets used
+1 -1
arch/arc/Makefile
··· 95 95 # Finally dump eveything into kernel build system 96 96 KBUILD_CFLAGS += $(cflags-y) 97 97 KBUILD_AFLAGS += $(KBUILD_CFLAGS) 98 - LDFLAGS += $(ldflags-y) 98 + KBUILD_LDFLAGS += $(ldflags-y) 99 99 100 100 head-y := arch/arc/kernel/head.o 101 101
+2 -2
arch/arm/Makefile
··· 43 43 KBUILD_CPPFLAGS += -mbig-endian 44 44 CHECKFLAGS += -D__ARMEB__ 45 45 AS += -EB 46 - LDFLAGS += -EB 46 + KBUILD_LDFLAGS += -EB 47 47 else 48 48 KBUILD_CPPFLAGS += -mlittle-endian 49 49 CHECKFLAGS += -D__ARMEL__ 50 50 AS += -EL 51 - LDFLAGS += -EL 51 + KBUILD_LDFLAGS += -EL 52 52 endif 53 53 54 54 #
+2 -2
arch/arm64/Makefile
··· 62 62 AS += -EB 63 63 # Prefer the baremetal ELF build target, but not all toolchains include 64 64 # it so fall back to the standard linux version if needed. 65 - LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb) 65 + KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb) 66 66 UTS_MACHINE := aarch64_be 67 67 else 68 68 KBUILD_CPPFLAGS += -mlittle-endian 69 69 CHECKFLAGS += -D__AARCH64EL__ 70 70 AS += -EL 71 71 # Same as above, prefer ELF but fall back to linux target if needed. 72 - LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux) 72 + KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux) 73 73 UTS_MACHINE := aarch64 74 74 endif 75 75
+1 -2
arch/c6x/Makefile
··· 23 23 KBUILD_CFLAGS += -mbig-endian 24 24 KBUILD_AFLAGS += -mbig-endian 25 25 LINKFLAGS += -mbig-endian 26 - KBUILD_LDFLAGS += -mbig-endian 27 - LDFLAGS += -EB 26 + KBUILD_LDFLAGS += -mbig-endian -EB 28 27 CHECKFLAGS += -D_BIG_ENDIAN 29 28 endif 30 29
+1 -1
arch/h8300/Makefile
··· 22 22 KBUILD_CFLAGS += -D__linux__ 23 23 KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" 24 24 KBUILD_AFLAGS += $(aflags-y) 25 - LDFLAGS += $(ldflags-y) 25 + KBUILD_LDFLAGS += $(ldflags-y) 26 26 27 27 CHECKFLAGS += -msize-long 28 28
+1 -3
arch/hexagon/Makefile
··· 22 22 23 23 KBUILD_CFLAGS += $(cflags-y) 24 24 KBUILD_AFLAGS += $(aflags-y) 25 - 26 - # no KBUILD_LDFLAGS? 27 - LDFLAGS += $(ldflags-y) 25 + KBUILD_LDFLAGS += $(ldflags-y) 28 26 29 27 # Thread-info register will be r19. This value is not configureable; 30 28 # it is hard-coded in several files.
+1 -1
arch/m68k/Makefile
··· 69 69 KBUILD_AFLAGS += -D__uClinux__ 70 70 endif 71 71 72 - LDFLAGS := -m m68kelf 72 + KBUILD_LDFLAGS := -m m68kelf 73 73 KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds 74 74 75 75 ifdef CONFIG_SUN3
+2 -2
arch/microblaze/Makefile
··· 40 40 ifdef CONFIG_CPU_BIG_ENDIAN 41 41 KBUILD_CFLAGS += -mbig-endian 42 42 KBUILD_AFLAGS += -mbig-endian 43 - LDFLAGS += -EB 43 + KBUILD_LDFLAGS += -EB 44 44 else 45 45 KBUILD_CFLAGS += -mlittle-endian 46 46 KBUILD_AFLAGS += -mlittle-endian 47 - LDFLAGS += -EL 47 + KBUILD_LDFLAGS += -EL 48 48 endif 49 49 50 50 CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
+1 -1
arch/mips/Makefile
··· 309 309 # instead of .eh_frame so we don't discard them. 310 310 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 311 311 312 - LDFLAGS += -m $(ld-emul) 312 + KBUILD_LDFLAGS += -m $(ld-emul) 313 313 314 314 ifdef CONFIG_MIPS 315 315 CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
+1 -1
arch/mips/boot/compressed/Makefile
··· 92 92 vmlinuzobjs-y += $(obj)/piggy.o 93 93 94 94 quiet_cmd_zld = LD $@ 95 - cmd_zld = $(LD) $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ 95 + cmd_zld = $(LD) $(KBUILD_LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ 96 96 quiet_cmd_strip = STRIP $@ 97 97 cmd_strip = $(STRIP) -s $@ 98 98 vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr
+1 -1
arch/mips/lasat/image/Makefile
··· 38 38 39 39 # Rule to make the bootloader 40 40 $(obj)/rom: $(addprefix $(obj)/,$(OBJECTS)) 41 - $(LD) $(LDFLAGS) $(LDSCRIPT) -o $@ $^ 41 + $(LD) $(KBUILD_LDFLAGS) $(LDSCRIPT) -o $@ $^ 42 42 43 43 $(obj)/%.o: $(obj)/%.gz 44 44 $(LD) -r -o $@ -b binary $<
+2 -2
arch/nds32/Makefile
··· 33 33 ifdef CONFIG_CPU_LITTLE_ENDIAN 34 34 KBUILD_CFLAGS += $(call cc-option, -EL) 35 35 KBUILD_AFLAGS += $(call cc-option, -EL) 36 - LDFLAGS += $(call cc-option, -EL) 36 + KBUILD_LDFLAGS += $(call cc-option, -EL) 37 37 CHECKFLAGS += -D__NDS32_EL__ 38 38 else 39 39 KBUILD_CFLAGS += $(call cc-option, -EB) 40 40 KBUILD_AFLAGS += $(call cc-option, -EB) 41 - LDFLAGS += $(call cc-option, -EB) 41 + KBUILD_LDFLAGS += $(call cc-option, -EB) 42 42 CHECKFLAGS += -D__NDS32_EB__ 43 43 endif 44 44
+3 -3
arch/powerpc/Makefile
··· 76 76 77 77 ifdef CONFIG_CPU_LITTLE_ENDIAN 78 78 KBUILD_CFLAGS += -mlittle-endian 79 - LDFLAGS += -EL 79 + KBUILD_LDFLAGS += -EL 80 80 LDEMULATION := lppc 81 81 GNUTARGET := powerpcle 82 82 MULTIPLEWORD := -mno-multiple 83 83 KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect) 84 84 else 85 85 KBUILD_CFLAGS += $(call cc-option,-mbig-endian) 86 - LDFLAGS += -EB 86 + KBUILD_LDFLAGS += -EB 87 87 LDEMULATION := ppc 88 88 GNUTARGET := powerpc 89 89 MULTIPLEWORD := -mmultiple ··· 108 108 ifeq ($(HAS_BIARCH),y) 109 109 KBUILD_CFLAGS += -m$(BITS) 110 110 KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS) 111 - LDFLAGS += -m elf$(BITS)$(LDEMULATION) 111 + KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION) 112 112 KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) 113 113 endif 114 114
+2 -2
arch/riscv/Makefile
··· 29 29 KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128) 30 30 31 31 KBUILD_MARCH = rv64im 32 - LDFLAGS += -melf64lriscv 32 + KBUILD_LDFLAGS += -melf64lriscv 33 33 else 34 34 BITS := 32 35 35 UTS_MACHINE := riscv32 ··· 37 37 KBUILD_CFLAGS += -mabi=ilp32 38 38 KBUILD_AFLAGS += -mabi=ilp32 39 39 KBUILD_MARCH = rv32im 40 - LDFLAGS += -melf32lriscv 40 + KBUILD_LDFLAGS += -melf32lriscv 41 41 endif 42 42 43 43 KBUILD_CFLAGS += -Wall
+1 -1
arch/s390/Makefile
··· 11 11 # 12 12 13 13 LD_BFD := elf64-s390 14 - LDFLAGS := -m elf64_s390 14 + KBUILD_LDFLAGS := -m elf64_s390 15 15 KBUILD_AFLAGS_MODULE += -fPIC 16 16 KBUILD_CFLAGS_MODULE += -fPIC 17 17 KBUILD_AFLAGS += -m64
+2 -2
arch/sh/Makefile
··· 122 122 ifdef CONFIG_CPU_LITTLE_ENDIAN 123 123 ld-bfd := elf32-$(UTS_MACHINE)-linux 124 124 LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd) 125 - LDFLAGS += -EL 125 + KBUILD_LDFLAGS += -EL 126 126 else 127 127 ld-bfd := elf32-$(UTS_MACHINE)big-linux 128 128 LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd) 129 - LDFLAGS += -EB 129 + KBUILD_LDFLAGS += -EB 130 130 endif 131 131 132 132 export ld-bfd BITS
+2 -2
arch/sparc/Makefile
··· 21 21 # 22 22 23 23 CHECKFLAGS += -D__sparc__ 24 - LDFLAGS := -m elf32_sparc 24 + KBUILD_LDFLAGS := -m elf32_sparc 25 25 export BITS := 32 26 26 UTS_MACHINE := sparc 27 27 ··· 40 40 # 41 41 42 42 CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ 43 - LDFLAGS := -m elf64_sparc 43 + KBUILD_LDFLAGS := -m elf64_sparc 44 44 export BITS := 64 45 45 UTS_MACHINE := sparc64 46 46
+1 -1
arch/um/Makefile
··· 133 133 # The wrappers will select whether using "malloc" or the kernel allocator. 134 134 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc 135 135 136 - LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) 136 + LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt)) 137 137 138 138 # Used by link-vmlinux.sh which has special support for um link 139 139 export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
+2 -2
arch/x86/Makefile
··· 219 219 KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) 220 220 KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) 221 221 222 - LDFLAGS := -m elf_$(UTS_MACHINE) 222 + KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) 223 223 224 224 # 225 225 # The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to ··· 227 227 # by the linker. 228 228 # 229 229 ifdef CONFIG_X86_64 230 - LDFLAGS += $(call ld-option, -z max-page-size=0x200000) 230 + KBUILD_LDFLAGS += $(call ld-option, -z max-page-size=0x200000) 231 231 endif 232 232 233 233 # Speed up the build
+2 -2
arch/x86/Makefile.um
··· 4 4 ifeq ($(CONFIG_X86_32),y) 5 5 START := 0x8048000 6 6 7 - LDFLAGS += -m elf_i386 7 + KBUILD_LDFLAGS += -m elf_i386 8 8 ELF_ARCH := i386 9 9 ELF_FORMAT := elf32-i386 10 10 CHECKFLAGS += -D__i386__ ··· 43 43 44 44 CHECKFLAGS += -m64 -D__x86_64__ 45 45 KBUILD_AFLAGS += -m64 46 - LDFLAGS += -m elf_x86_64 46 + KBUILD_LDFLAGS += -m elf_x86_64 47 47 KBUILD_CPPFLAGS += -m64 48 48 49 49 ELF_ARCH := i386:x86-64
+3 -3
arch/x86/boot/compressed/Makefile
··· 42 42 GCOV_PROFILE := n 43 43 UBSAN_SANITIZE :=n 44 44 45 - LDFLAGS := -m elf_$(UTS_MACHINE) 45 + KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) 46 46 # Compressed kernel should be built as PIE since it may be loaded at any 47 47 # address by the bootloader. 48 48 ifeq ($(CONFIG_X86_32),y) 49 - LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker) 49 + KBUILD_LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker) 50 50 else 51 51 # To build 64-bit compressed kernel as PIE, we disable relocation 52 52 # overflow check to avoid relocation overflow error with a new linker 53 53 # command-line option, -z noreloc-overflow. 54 - LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ 54 + KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ 55 55 && echo "-z noreloc-overflow -pie --no-dynamic-linker") 56 56 endif 57 57 LDFLAGS_vmlinux := -T
+1 -1
arch/xtensa/Makefile
··· 49 49 KBUILD_AFLAGS += -mlongcalls -mtext-section-literals 50 50 51 51 ifneq ($(CONFIG_LD_NO_RELAX),) 52 - LDFLAGS := --no-relax 52 + KBUILD_LDFLAGS := --no-relax 53 53 endif 54 54 55 55 ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1)
+1 -1
arch/xtensa/boot/boot-elf/Makefile
··· 25 25 $(OBJS) $@ 26 26 27 27 $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds 28 - $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 28 + $(Q)$(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) \ 29 29 -T $(obj)/boot.lds \ 30 30 --build-id=none \ 31 31 -o $@ $(obj)/Image.o
+8 -8
certs/system_certificates.S
··· 5 5 __INITRODATA 6 6 7 7 .align 8 8 - .globl VMLINUX_SYMBOL(system_certificate_list) 9 - VMLINUX_SYMBOL(system_certificate_list): 8 + .globl system_certificate_list 9 + system_certificate_list: 10 10 __cert_list_start: 11 11 #ifdef CONFIG_MODULE_SIG 12 12 .incbin "certs/signing_key.x509" ··· 15 15 __cert_list_end: 16 16 17 17 #ifdef CONFIG_SYSTEM_EXTRA_CERTIFICATE 18 - .globl VMLINUX_SYMBOL(system_extra_cert) 18 + .globl system_extra_cert 19 19 .size system_extra_cert, CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE 20 - VMLINUX_SYMBOL(system_extra_cert): 20 + system_extra_cert: 21 21 .fill CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE, 1, 0 22 22 23 23 .align 4 24 - .globl VMLINUX_SYMBOL(system_extra_cert_used) 25 - VMLINUX_SYMBOL(system_extra_cert_used): 24 + .globl system_extra_cert_used 25 + system_extra_cert_used: 26 26 .int 0 27 27 28 28 #endif /* CONFIG_SYSTEM_EXTRA_CERTIFICATE */ 29 29 30 30 .align 8 31 - .globl VMLINUX_SYMBOL(system_certificate_list_size) 32 - VMLINUX_SYMBOL(system_certificate_list_size): 31 + .globl system_certificate_list_size 32 + system_certificate_list_size: 33 33 #ifdef CONFIG_64BIT 34 34 .quad __cert_list_end - __cert_list_start 35 35 #else
-2
include/asm-generic/vmlinux.lds.h
··· 54 54 #define LOAD_OFFSET 0 55 55 #endif 56 56 57 - #include <linux/export.h> 58 - 59 57 /* Align . to a 8 byte boundary equals to maximum function alignment. */ 60 58 #define ALIGN_FUNCTION() . = ALIGN(8) 61 59
-7
include/linux/export.h
··· 10 10 * hackers place grumpy comments in header files. 11 11 */ 12 12 13 - #define __VMLINUX_SYMBOL(x) x 14 - #define __VMLINUX_SYMBOL_STR(x) #x 15 - 16 - /* Indirect, so macros are expanded before pasting. */ 17 - #define VMLINUX_SYMBOL(x) __VMLINUX_SYMBOL(x) 18 - #define VMLINUX_SYMBOL_STR(x) __VMLINUX_SYMBOL_STR(x) 19 - 20 13 #ifndef __ASSEMBLY__ 21 14 #ifdef MODULE 22 15 extern struct module __this_module;
+2
init/Kconfig
··· 1097 1097 bool "Dead code and data elimination (EXPERIMENTAL)" 1098 1098 depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION 1099 1099 depends on EXPERT 1100 + depends on $(cc-option,-ffunction-sections -fdata-sections) 1101 + depends on $(ld-option,--gc-sections) 1100 1102 help 1101 1103 Enable this if you want to do dead code and data elimination with 1102 1104 the linker by compiling with -ffunction-sections -fdata-sections,
+2 -2
scripts/Kbuild.include
··· 163 163 $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) 164 164 165 165 # ld-option 166 - # Usage: LDFLAGS += $(call ld-option, -X, -Y) 167 - ld-option = $(call try-run, $(LD) $(LDFLAGS) $(1) -v,$(1),$(2),$(3)) 166 + # Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y) 167 + ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3)) 168 168 169 169 # ar-option 170 170 # Usage: KBUILD_ARFLAGS := $(call ar-option,D)
+3 -3
scripts/Makefile.build
··· 190 190 $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ 191 191 > $(@D)/.tmp_$(@F:.o=.ver); \ 192 192 \ 193 - $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 193 + $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 194 194 -T $(@D)/.tmp_$(@F:.o=.ver); \ 195 195 rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ 196 196 else \ ··· 220 220 "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ 221 221 "$(if $(CONFIG_64BIT),64,32)" \ 222 222 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ 223 - "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 223 + "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \ 224 224 "$(if $(part-of-module),1,0)" "$(@)"; 225 225 recordmcount_source := $(srctree)/scripts/recordmcount.pl 226 226 endif # BUILD_C_RECORDMCOUNT ··· 394 394 $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ 395 395 > $(@D)/.tmp_$(@F:.o=.ver); \ 396 396 \ 397 - $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 397 + $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 398 398 -T $(@D)/.tmp_$(@F:.o=.ver); \ 399 399 rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ 400 400 else \
+1 -1
scripts/Makefile.lib
··· 162 162 cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ 163 163 $(__cpp_flags) 164 164 165 - ld_flags = $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) 165 + ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) 166 166 167 167 DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes 168 168
+1 -1
scripts/Makefile.modpost
··· 120 120 # Step 6), final link of the modules with optional arch pass after final link 121 121 quiet_cmd_ld_ko_o = LD [M] $@ 122 122 cmd_ld_ko_o = \ 123 - $(LD) -r $(LDFLAGS) \ 123 + $(LD) -r $(KBUILD_LDFLAGS) \ 124 124 $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ 125 125 -o $@ $(filter-out FORCE,$^) ; \ 126 126 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
+1 -1
scripts/clang-version.sh
··· 12 12 13 13 compiler="$*" 14 14 15 - if !( $compiler --version | grep -q clang) ; then 15 + if ! ( $compiler --version | grep -q clang) ; then 16 16 echo 0 17 17 exit 1 18 18 fi
+1 -40
scripts/coccinelle/api/alloc/zalloc-simple.cocci
··· 35 35 36 36 * x = (T)\(kmalloc(E1, ...)\|vmalloc(E1)\|dma_alloc_coherent(...,E1,...)\| 37 37 kmalloc_node(E1, ...)\|kmem_cache_alloc(...)\|kmem_alloc(E1, ...)\| 38 - devm_kmalloc(...,E1,...)\|kvmalloc(E1, ...)\|pci_alloc_consistent(...,E1,...)\| 39 - kvmalloc_node(E1,...)\); 38 + devm_kmalloc(...,E1,...)\|kvmalloc(E1, ...)\|kvmalloc_node(E1,...)\); 40 39 if ((x==NULL) || ...) S 41 40 * memset((T2)x,0,E1); 42 41 ··· 122 123 | 123 124 - x = (T)kvmalloc(E1,E2); 124 125 + x = (T)kvzalloc(E1,E2); 125 - | 126 - - x = pci_alloc_consistent(E2,E1,E3); 127 - + x = pci_zalloc_consistent(E2,E1,E3); 128 - | 129 - - x = (T *)pci_alloc_consistent(E2,E1,E3); 130 - + x = pci_zalloc_consistent(E2,E1,E3); 131 - | 132 - - x = (T)pci_alloc_consistent(E2,E1,E3); 133 - + x = (T)pci_zalloc_consistent(E2,E1,E3); 134 126 | 135 127 - x = kvmalloc_node(E1,E2,E3); 136 128 + x = kvzalloc_node(E1,E2,E3); ··· 378 388 msg="WARNING: kvzalloc should be used for %s, instead of kvmalloc/memset" % (x) 379 389 coccilib.report.print_report(p[0], msg) 380 390 381 - //----------------------------------------------------------------- 382 - @r8 depends on org || report@ 383 - type T, T2; 384 - expression x; 385 - expression E1,E2,E3; 386 - statement S; 387 - position p; 388 - @@ 389 - 390 - x = (T)pci_alloc_consistent@p(E2,E1,E3); 391 - if ((x==NULL) || ...) S 392 - memset((T2)x,0,E1); 393 - 394 - @script:python depends on org@ 395 - p << r8.p; 396 - x << r8.x; 397 - @@ 398 - 399 - msg="%s" % (x) 400 - msg_safe=msg.replace("[","@(").replace("]",")") 401 - coccilib.org.print_todo(p[0], msg_safe) 402 - 403 - @script:python depends on report@ 404 - p << r8.p; 405 - x << r8.x; 406 - @@ 407 - 408 - msg="WARNING: pci_zalloc_consistent should be used for %s, instead of pci_alloc_consistent/memset" % (x) 409 - coccilib.report.print_report(p[0], msg) 410 391 //----------------------------------------------------------------- 411 392 @r9 depends on org || report@ 412 393 type T, T2;
+4 -14
scripts/dtc/Makefile
··· 9 9 dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o 10 10 11 11 # Source files need to get at the userspace version of libfdt_env.h to compile 12 + HOST_EXTRACFLAGS := -I$(src)/libfdt 12 13 13 - HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt 14 - 15 - HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC) 16 - HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC) 17 - HOSTCFLAGS_dtc.o := $(HOSTCFLAGS_DTC) 18 - HOSTCFLAGS_flattree.o := $(HOSTCFLAGS_DTC) 19 - HOSTCFLAGS_fstree.o := $(HOSTCFLAGS_DTC) 20 - HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC) 21 - HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC) 22 - HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC) 23 - HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC) 24 - 25 - HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC) 26 - HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) 14 + # Generated files need one more search path to include headers in source tree 15 + HOSTCFLAGS_dtc-lexer.lex.o := -I$(src) 16 + HOSTCFLAGS_dtc-parser.tab.o := -I$(src) 27 17 28 18 # dependencies on generated files need to be listed explicitly 29 19 $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
+1 -1
scripts/gen_initramfs_list.sh usr/gen_initramfs_list.sh
··· 174 174 ${dep_list}header "$1" 175 175 176 176 srcdir=$(echo "$1" | sed -e 's://*:/:g') 177 - dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | sort) 177 + dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort) 178 178 179 179 # If $dirlist is only one line, then the directory is empty 180 180 if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
+13 -3
scripts/kconfig/Makefile
··· 3 3 # Kernel configuration targets 4 4 # These targets are used from top-level makefile 5 5 6 - PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig 6 + PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \ 7 + build_menuconfig build_nconfig build_gconfig build_xconfig 7 8 8 9 ifdef KBUILD_KCONFIG 9 10 Kconfig := $(KBUILD_KCONFIG) ··· 33 32 34 33 nconfig: $(obj)/nconf 35 34 $< $(silent) $(Kconfig) 35 + 36 + build_menuconfig: $(obj)/mconf 37 + 38 + build_nconfig: $(obj)/nconf 39 + 40 + build_gconfig: $(obj)/gconf 41 + 42 + build_xconfig: $(obj)/qconf 36 43 37 44 localyesconfig localmodconfig: $(obj)/conf 38 45 $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config ··· 178 169 HOSTCFLAGS_nconf.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) 179 170 HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/.nconf-cfg && echo $$cflags) 180 171 181 - $(obj)/nconf.o: $(obj)/.nconf-cfg 172 + $(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/.nconf-cfg 182 173 183 174 # mconf: Used for the menuconfig target based on lxdialog 184 175 hostprogs-y += mconf ··· 189 180 $(foreach f, mconf.o $(lxdialog), \ 190 181 $(eval HOSTCFLAGS_$f = $$(shell . $(obj)/.mconf-cfg && echo $$$$cflags))) 191 182 192 - $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/.mconf-cfg 183 + $(obj)/mconf.o: $(obj)/.mconf-cfg 184 + $(addprefix $(obj)/lxdialog/, $(lxdialog)): $(obj)/.mconf-cfg 193 185 194 186 # qconf: Used for the xconfig target based on Qt 195 187 hostprogs-y += qconf
+5
scripts/kconfig/conf.c
··· 508 508 input_mode = (enum input_mode)opt; 509 509 switch (opt) { 510 510 case syncconfig: 511 + /* 512 + * syncconfig is invoked during the build stage. 513 + * Suppress distracting "configuration written to ..." 514 + */ 515 + conf_set_message_callback(NULL); 511 516 sync_kconfig = 1; 512 517 break; 513 518 case defconfig:
+41 -19
scripts/kconfig/symbol.c
··· 1011 1011 struct dep_stack *prev, *next; 1012 1012 struct symbol *sym; 1013 1013 struct property *prop; 1014 - struct expr *expr; 1014 + struct expr **expr; 1015 1015 } *check_top; 1016 1016 1017 1017 static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) ··· 1076 1076 fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", 1077 1077 prop->file->name, prop->lineno); 1078 1078 1079 - if (stack->expr) { 1080 - fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", 1081 - prop->file->name, prop->lineno, 1082 - sym->name ? sym->name : "<choice>", 1083 - prop_get_type_name(prop->type), 1084 - next_sym->name ? next_sym->name : "<choice>"); 1085 - } else if (stack->prop) { 1086 - fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", 1087 - prop->file->name, prop->lineno, 1088 - sym->name ? sym->name : "<choice>", 1089 - next_sym->name ? next_sym->name : "<choice>"); 1090 - } else if (sym_is_choice(sym)) { 1079 + if (sym_is_choice(sym)) { 1091 1080 fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n", 1092 1081 menu->file->name, menu->lineno, 1093 1082 sym->name ? sym->name : "<choice>", ··· 1086 1097 menu->file->name, menu->lineno, 1087 1098 sym->name ? sym->name : "<choice>", 1088 1099 next_sym->name ? next_sym->name : "<choice>"); 1089 - } else { 1100 + } else if (stack->expr == &sym->dir_dep.expr) { 1101 + fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", 1102 + prop->file->name, prop->lineno, 1103 + sym->name ? sym->name : "<choice>", 1104 + next_sym->name ? next_sym->name : "<choice>"); 1105 + } else if (stack->expr == &sym->rev_dep.expr) { 1090 1106 fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n", 1091 1107 prop->file->name, prop->lineno, 1092 1108 sym->name ? sym->name : "<choice>", 1109 + next_sym->name ? next_sym->name : "<choice>"); 1110 + } else if (stack->expr == &sym->implied.expr) { 1111 + fprintf(stderr, "%s:%d:\tsymbol %s is implied by %s\n", 1112 + prop->file->name, prop->lineno, 1113 + sym->name ? sym->name : "<choice>", 1114 + next_sym->name ? next_sym->name : "<choice>"); 1115 + } else if (stack->expr) { 1116 + fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", 1117 + prop->file->name, prop->lineno, 1118 + sym->name ? sym->name : "<choice>", 1119 + prop_get_type_name(prop->type), 1120 + next_sym->name ? next_sym->name : "<choice>"); 1121 + } else { 1122 + fprintf(stderr, "%s:%d:\tsymbol %s %s is visible depending on %s\n", 1123 + prop->file->name, prop->lineno, 1124 + sym->name ? sym->name : "<choice>", 1125 + prop_get_type_name(prop->type), 1093 1126 next_sym->name ? next_sym->name : "<choice>"); 1094 1127 } 1095 1128 } ··· 1168 1157 1169 1158 dep_stack_insert(&stack, sym); 1170 1159 1160 + stack.expr = &sym->dir_dep.expr; 1161 + sym2 = sym_check_expr_deps(sym->dir_dep.expr); 1162 + if (sym2) 1163 + goto out; 1164 + 1165 + stack.expr = &sym->rev_dep.expr; 1171 1166 sym2 = sym_check_expr_deps(sym->rev_dep.expr); 1172 1167 if (sym2) 1173 1168 goto out; 1174 1169 1170 + stack.expr = &sym->implied.expr; 1171 + sym2 = sym_check_expr_deps(sym->implied.expr); 1172 + if (sym2) 1173 + goto out; 1174 + 1175 + stack.expr = NULL; 1176 + 1175 1177 for (prop = sym->prop; prop; prop = prop->next) { 1176 - if (prop->type == P_CHOICE || prop->type == P_SELECT) 1178 + if (prop->type == P_CHOICE || prop->type == P_SELECT || 1179 + prop->type == P_IMPLY) 1177 1180 continue; 1178 1181 stack.prop = prop; 1179 1182 sym2 = sym_check_expr_deps(prop->visible.expr); ··· 1195 1170 break; 1196 1171 if (prop->type != P_DEFAULT || sym_is_choice(sym)) 1197 1172 continue; 1198 - stack.expr = prop->expr; 1173 + stack.expr = &prop->expr; 1199 1174 sym2 = sym_check_expr_deps(prop->expr); 1200 1175 if (sym2) 1201 1176 break; ··· 1272 1247 sym2 = sym_check_sym_deps(sym); 1273 1248 sym->flags &= ~SYMBOL_CHECK; 1274 1249 } 1275 - 1276 - if (sym2 && sym2 == sym) 1277 - sym2 = NULL; 1278 1250 1279 1251 return sym2; 1280 1252 }
+10
scripts/kconfig/tests/err_recursive_dep/__init__.py
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + """ 3 + Detect recursive dependency error. 4 + 5 + Recursive dependency should be treated as an error. 6 + """ 7 + 8 + def test(conf): 9 + assert conf.oldaskconfig() == 1 10 + assert conf.stderr_contains('expected_stderr')
+38
scripts/kconfig/tests/err_recursive_dep/expected_stderr
··· 1 + Kconfig:11:error: recursive dependency detected! 2 + Kconfig:11: symbol B is selected by B 3 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 4 + subsection "Kconfig recursive dependency limitations" 5 + 6 + Kconfig:5:error: recursive dependency detected! 7 + Kconfig:5: symbol A depends on A 8 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 9 + subsection "Kconfig recursive dependency limitations" 10 + 11 + Kconfig:17:error: recursive dependency detected! 12 + Kconfig:17: symbol C1 depends on C2 13 + Kconfig:21: symbol C2 depends on C1 14 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 15 + subsection "Kconfig recursive dependency limitations" 16 + 17 + Kconfig:32:error: recursive dependency detected! 18 + Kconfig:32: symbol D2 is selected by D1 19 + Kconfig:27: symbol D1 depends on D2 20 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 21 + subsection "Kconfig recursive dependency limitations" 22 + 23 + Kconfig:37:error: recursive dependency detected! 24 + Kconfig:37: symbol E1 depends on E2 25 + Kconfig:42: symbol E2 is implied by E1 26 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 27 + subsection "Kconfig recursive dependency limitations" 28 + 29 + Kconfig:60:error: recursive dependency detected! 30 + Kconfig:60: symbol G depends on G 31 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 32 + subsection "Kconfig recursive dependency limitations" 33 + 34 + Kconfig:51:error: recursive dependency detected! 35 + Kconfig:51: symbol F2 depends on F1 36 + Kconfig:49: symbol F1 default value contains F2 37 + For a resolution refer to Documentation/kbuild/kconfig-language.txt 38 + subsection "Kconfig recursive dependency limitations"
+2 -1
scripts/kconfig/tests/warn_recursive_dep/Kconfig scripts/kconfig/tests/err_recursive_dep/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 1 3 # depends on itself 2 4 3 5 config A ··· 33 31 bool 34 32 35 33 # depends on and imply 36 - # This is not recursive dependency 37 34 38 35 config E1 39 36 bool "E1"
-9
scripts/kconfig/tests/warn_recursive_dep/__init__.py
··· 1 - """ 2 - Warn recursive inclusion. 3 - 4 - Recursive dependency should be warned. 5 - """ 6 - 7 - def test(conf): 8 - assert conf.oldaskconfig() == 0 9 - assert conf.stderr_contains('expected_stderr')
-30
scripts/kconfig/tests/warn_recursive_dep/expected_stderr
··· 1 - Kconfig:9:error: recursive dependency detected! 2 - Kconfig:9: symbol B is selected by B 3 - For a resolution refer to Documentation/kbuild/kconfig-language.txt 4 - subsection "Kconfig recursive dependency limitations" 5 - 6 - Kconfig:3:error: recursive dependency detected! 7 - Kconfig:3: symbol A depends on A 8 - For a resolution refer to Documentation/kbuild/kconfig-language.txt 9 - subsection "Kconfig recursive dependency limitations" 10 - 11 - Kconfig:15:error: recursive dependency detected! 12 - Kconfig:15: symbol C1 depends on C2 13 - Kconfig:19: symbol C2 depends on C1 14 - For a resolution refer to Documentation/kbuild/kconfig-language.txt 15 - subsection "Kconfig recursive dependency limitations" 16 - 17 - Kconfig:30:error: recursive dependency detected! 18 - Kconfig:30: symbol D2 is selected by D1 19 - Kconfig:25: symbol D1 depends on D2 20 - For a resolution refer to Documentation/kbuild/kconfig-language.txt 21 - subsection "Kconfig recursive dependency limitations" 22 - 23 - Kconfig:59:error: recursive dependency detected! 24 - Kconfig:59: symbol G depends on G 25 - For a resolution refer to Documentation/kbuild/kconfig-language.txt 26 - subsection "Kconfig recursive dependency limitations" 27 - 28 - Kconfig:50:error: recursive dependency detected! 29 - Kconfig:50: symbol F2 depends on F1 30 - Kconfig:48: symbol F1 default value contains F2
+4 -4
scripts/mod/modpost.c
··· 672 672 if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) 673 673 break; 674 674 if (symname[0] == '.') { 675 - char *munged = strdup(symname); 675 + char *munged = NOFAIL(strdup(symname)); 676 676 munged[0] = '_'; 677 677 munged[1] = toupper(munged[1]); 678 678 symname = munged; ··· 1318 1318 static char *sec2annotation(const char *s) 1319 1319 { 1320 1320 if (match(s, init_exit_sections)) { 1321 - char *p = malloc(20); 1321 + char *p = NOFAIL(malloc(20)); 1322 1322 char *r = p; 1323 1323 1324 1324 *p++ = '_'; ··· 1338 1338 strcat(p, " "); 1339 1339 return r; 1340 1340 } else { 1341 - return strdup(""); 1341 + return NOFAIL(strdup("")); 1342 1342 } 1343 1343 } 1344 1344 ··· 2036 2036 { 2037 2037 if (buf->size - buf->pos < len) { 2038 2038 buf->size += len + SZ; 2039 - buf->p = realloc(buf->p, buf->size); 2039 + buf->p = NOFAIL(realloc(buf->p, buf->size)); 2040 2040 } 2041 2041 strncpy(buf->p + buf->pos, s, len); 2042 2042 buf->pos += len;
+1 -1
usr/Makefile
··· 24 24 # Generate the initramfs cpio archive 25 25 26 26 hostprogs-y := gen_init_cpio 27 - initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh 27 + initramfs := $(CONFIG_SHELL) $(srctree)/$(src)/gen_initramfs_list.sh 28 28 ramfs-input := $(if $(filter-out "",$(CONFIG_INITRAMFS_SOURCE)), \ 29 29 $(shell echo $(CONFIG_INITRAMFS_SOURCE)),-d) 30 30 ramfs-args := \
+2 -2
usr/initramfs_data.S
··· 30 30 .incbin __stringify(INITRAMFS_IMAGE) 31 31 __irf_end: 32 32 .section .init.ramfs.info,"a" 33 - .globl VMLINUX_SYMBOL(__initramfs_size) 34 - VMLINUX_SYMBOL(__initramfs_size): 33 + .globl __initramfs_size 34 + __initramfs_size: 35 35 #ifdef CONFIG_64BIT 36 36 .quad __irf_end - __irf_start 37 37 #else