Skip to content

Commit 1e9ed93

Browse files
committed
Merge tag 'kbuild-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada: - Remove the global -isystem compiler flag, which was made possible by the introduction of <linux/stdarg.h> - Improve the Kconfig help to print the location in the top menu level - Fix "FORCE prerequisite is missing" build warning for sparc - Add new build targets, tarzst-pkg and perf-tarzst-src-pkg, which generate a zstd-compressed tarball - Prevent gen_init_cpio tool from generating a corrupted cpio when KBUILD_BUILD_TIMESTAMP is set to 2106-02-07 or later - Misc cleanups * tag 'kbuild-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (28 commits) kbuild: use more subdir- for visiting subdirectories while cleaning sh: remove meaningless archclean line initramfs: Check timestamp to prevent broken cpio archive kbuild: split DEBUG_CFLAGS out to scripts/Makefile.debug gen_init_cpio: add static const qualifiers kbuild: Add make tarzst-pkg build option scripts: update the comments of kallsyms support sparc: Add missing "FORCE" target when using if_changed kconfig: refactor conf_touch_dep() kconfig: refactor conf_write_dep() kconfig: refactor conf_write_autoconf() kconfig: add conf_get_autoheader_name() kconfig: move sym_escape_string_value() to confdata.c kconfig: refactor listnewconfig code kconfig: refactor conf_write_symbol() kconfig: refactor conf_write_heading() kconfig: remove 'const' from the return type of sym_escape_string_value() kconfig: rename a variable in the lexer to a clearer name kconfig: narrow the scope of variables in the lexer kconfig: Create links to main menu items in search ...
2 parents 67b7e1f + 8212f89 commit 1e9ed93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+453
-479
lines changed

Documentation/kbuild/makefiles.rst

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,22 +1050,9 @@ is not sufficient this sometimes needs to be explicit.
10501050
The above assignment instructs kbuild to descend down in the
10511051
directory compressed/ when "make clean" is executed.
10521052

1053-
To support the clean infrastructure in the Makefiles that build the
1054-
final bootimage there is an optional target named archclean:
1055-
1056-
Example::
1057-
1058-
#arch/x86/Makefile
1059-
archclean:
1060-
$(Q)$(MAKE) $(clean)=arch/x86/boot
1061-
1062-
When "make clean" is executed, make will descend down in arch/x86/boot,
1063-
and clean as usual. The Makefile located in arch/x86/boot/ may use
1064-
the subdir- trick to descend further down.
1065-
10661053
Note 1: arch/$(SRCARCH)/Makefile cannot use "subdir-", because that file is
1067-
included in the top level makefile, and the kbuild infrastructure
1068-
is not operational at that point.
1054+
included in the top level makefile. Instead, arch/$(SRCARCH)/Kbuild can use
1055+
"subdir-".
10691056

10701057
Note 2: All directories listed in core-y, libs-y, drivers-y and net-y will
10711058
be visited during "make clean".

Makefile

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -850,44 +850,6 @@ ifdef CONFIG_ZERO_CALL_USED_REGS
850850
KBUILD_CFLAGS += -fzero-call-used-regs=used-gpr
851851
endif
852852

853-
DEBUG_CFLAGS :=
854-
855-
ifdef CONFIG_DEBUG_INFO
856-
857-
ifdef CONFIG_DEBUG_INFO_SPLIT
858-
DEBUG_CFLAGS += -gsplit-dwarf
859-
else
860-
DEBUG_CFLAGS += -g
861-
endif
862-
863-
ifndef CONFIG_AS_IS_LLVM
864-
KBUILD_AFLAGS += -Wa,-gdwarf-2
865-
endif
866-
867-
ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
868-
dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4
869-
dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5
870-
DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y)
871-
endif
872-
873-
ifdef CONFIG_DEBUG_INFO_REDUCED
874-
DEBUG_CFLAGS += -fno-var-tracking
875-
ifdef CONFIG_CC_IS_GCC
876-
DEBUG_CFLAGS += -femit-struct-debug-baseonly
877-
endif
878-
endif
879-
880-
ifdef CONFIG_DEBUG_INFO_COMPRESSED
881-
DEBUG_CFLAGS += -gz=zlib
882-
KBUILD_AFLAGS += -gz=zlib
883-
KBUILD_LDFLAGS += --compress-debug-sections=zlib
884-
endif
885-
886-
endif # CONFIG_DEBUG_INFO
887-
888-
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
889-
export DEBUG_CFLAGS
890-
891853
ifdef CONFIG_FUNCTION_TRACER
892854
ifdef CONFIG_FTRACE_MCOUNT_USE_CC
893855
CC_FLAGS_FTRACE += -mrecord-mcount
@@ -984,7 +946,7 @@ KBUILD_CFLAGS += -falign-functions=64
984946
endif
985947

986948
# arch Makefile may override CC so keep this after arch Makefile is included
987-
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
949+
NOSTDINC_FLAGS += -nostdinc
988950

989951
# warn about C99 declaration after statement
990952
KBUILD_CFLAGS += -Wdeclaration-after-statement
@@ -1051,6 +1013,7 @@ KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
10511013

10521014
# include additional Makefiles when needed
10531015
include-y := scripts/Makefile.extrawarn
1016+
include-$(CONFIG_DEBUG_INFO) += scripts/Makefile.debug
10541017
include-$(CONFIG_KASAN) += scripts/Makefile.kasan
10551018
include-$(CONFIG_KCSAN) += scripts/Makefile.kcsan
10561019
include-$(CONFIG_UBSAN) += scripts/Makefile.ubsan

arch/alpha/Kbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
obj-y += kernel/ mm/
33
obj-$(CONFIG_MATHEMU) += math-emu/
4+
5+
# for cleaning
6+
subdir- += boot

arch/alpha/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ $(boot)/vmlinux.gz: vmlinux
5555
bootimage bootpfile bootpzfile: vmlinux
5656
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
5757

58-
archclean:
59-
$(Q)$(MAKE) $(clean)=$(boot)
60-
6158
archheaders:
6259
$(Q)$(MAKE) $(build)=arch/alpha/kernel/syscalls all
6360

arch/arc/Kbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-y += kernel/
33
obj-y += mm/
4+
5+
# for cleaning
6+
subdir- += boot

arch/arc/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,3 @@ uImage: $(uimage-default-y)
112112
@$(kecho) ' Image $(boot)/uImage is ready'
113113

114114
CLEAN_FILES += $(boot)/uImage
115-
116-
archclean:
117-
$(Q)$(MAKE) $(clean)=$(boot)

arch/arm/Kbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ obj-y += kernel/ mm/ common/
99
obj-y += probes/
1010
obj-y += net/
1111
obj-y += crypto/
12+
13+
# for cleaning
14+
subdir- += boot

arch/arm/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ ifeq ($(CONFIG_VDSO),y)
318318
$(Q)$(MAKE) $(build)=arch/arm/vdso $@
319319
endif
320320

321-
# We use MRPROPER_FILES and CLEAN_FILES now
322-
archclean:
323-
$(Q)$(MAKE) $(clean)=$(boot)
324-
325321
# My testing targets (bypasses dependencies)
326322
bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
327323

arch/arm64/Kbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ obj-$(CONFIG_KVM) += kvm/
44
obj-$(CONFIG_XEN) += xen/
55
obj-$(subst m,y,$(CONFIG_HYPERV)) += hyperv/
66
obj-$(CONFIG_CRYPTO) += crypto/
7+
8+
# for cleaning
9+
subdir- += boot

arch/arm64/Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,6 @@ ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y)
182182
endif
183183
endif
184184

185-
186-
# We use MRPROPER_FILES and CLEAN_FILES now
187-
archclean:
188-
$(Q)$(MAKE) $(clean)=$(boot)
189-
$(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso
190-
$(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso32
191-
192185
ifeq ($(KBUILD_EXTMOD),)
193186
# We need to generate vdso-offsets.h before compiling certain files in kernel/.
194187
# In order to do that, we should use the archprepare target, but we can't since

0 commit comments

Comments
 (0)