Commit 2ddcf496 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull Kbuild updates from Nicolas Schier:

  - Enable -fms-extensions, allowing anonymous use of tagged struct or
    union in struct/union (tag kbuild-ms-extensions-6.19). An exemplary
    conversion patch is added here, too (btrfs).

    [ Editor's note: the core of this actually came in early through a
      shared branch and a few other trees    - Linus ]

  - Introduce architecture-specific CC_CAN_LINK and flags for userprogs

  - Add new packaging target 'modules-cpio-pkg' for building a initramfs
    cpio w/ kmods

  - Handle included .c files in gen_compile_commands

  - Minor kbuild changes:
     - Use objtree for module signing key path, fixing oot kmod signing
     - Improve documentation of KBUILD_BUILD_TIMESTAMP
     - Reuse KBUILD_USERCFLAGS for UAPI, instead of defining twice
     - Rename scripts/Makefile.extrawarn to Makefile.warn
     - Drop obsolete types.h check from headers_check.pl
     - Remove outdated config leak ignore entries

* tag 'kbuild-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux:
  kbuild: add target to build a cpio containing modules
  initramfs: add gen_init_cpio to hostprogs unconditionally
  kbuild: allow architectures to override CC_CAN_LINK
  init: deduplicate cc-can-link.sh invocations
  kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings
  scripts: headers_install.sh: Remove two outdated config leak ignore entries
  scripts/clang-tools: Handle included .c files in gen_compile_commands
  kbuild: uapi: Drop types.h check from headers_check.pl
  kbuild: Rename Makefile.extrawarn to Makefile.warn
  MAINTAINERS, .mailmap: Update mail address for Nicolas Schier
  kbuild: uapi: reuse KBUILD_USERCFLAGS
  kbuild: doc: improve KBUILD_BUILD_TIMESTAMP documentation
  kbuild: Use objtree for module signing key path
  btrfs: send: make use of -fms-extensions for defining struct fs_path
parents 784faa8e 2a9c8c0b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -589,8 +589,8 @@ Nicolas Pitre <nico@fluxnic.net> <nicolas.pitre@linaro.org>
Nicolas Pitre <nico@fluxnic.net> <nico@linaro.org>
Nicolas Saenz Julienne <nsaenz@kernel.org> <nsaenzjulienne@suse.de>
Nicolas Saenz Julienne <nsaenz@kernel.org> <nsaenzjulienne@suse.com>
Nicolas Schier <nicolas.schier@linux.dev> <n.schier@avm.de>
Nicolas Schier <nicolas.schier@linux.dev> <nicolas@fjasle.eu>
Nicolas Schier <nsc@kernel.org> <n.schier@avm.de>
Nicolas Schier <nsc@kernel.org> <nicolas@fjasle.eu>
Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Nikolay Aleksandrov <razor@blackwall.org> <naleksan@redhat.com>
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@redhat.com>
+8 −2
Original line number Diff line number Diff line
@@ -328,8 +328,14 @@ KBUILD_BUILD_TIMESTAMP
----------------------
Setting this to a date string overrides the timestamp used in the
UTS_VERSION definition (uname -v in the running kernel). The value has to
be a string that can be passed to date -d. The default value
is the output of the date command at one point during build.
be a string that can be passed to date -d. E.g.::

    $ KBUILD_BUILD_TIMESTAMP="Mon Oct 13 00:00:00 UTC 2025" make

The default value is the output of the date command at one point during
build. If provided, this timestamp will also be used for mtime fields
within any initramfs archive. Initramfs mtimes are 32-bit, so dates before
the 1970 Unix epoch, or after 2106-02-07 06:28:15 UTC will fail.

KBUILD_BUILD_USER, KBUILD_BUILD_HOST
------------------------------------
+1 −1
Original line number Diff line number Diff line
@@ -13498,7 +13498,7 @@ F: fs/autofs/
KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
M:	Nathan Chancellor <nathan@kernel.org>
M:	Nicolas Schier <nicolas@fjasle.eu>
M:	Nicolas Schier <nsc@kernel.org>
L:	linux-kbuild@vger.kernel.org
S:	Odd Fixes
Q:	https://patchwork.kernel.org/project/linux-kbuild/list/
+12 −3
Original line number Diff line number Diff line
@@ -1084,7 +1084,7 @@ KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srcroot)/=)
endif

# include additional Makefiles when needed
include-y			:= scripts/Makefile.extrawarn
include-y			:= scripts/Makefile.warn
include-$(CONFIG_DEBUG_INFO)	+= scripts/Makefile.debug
include-$(CONFIG_DEBUG_INFO_BTF)+= scripts/Makefile.btf
include-$(CONFIG_KASAN)		+= scripts/Makefile.kasan
@@ -1137,8 +1137,17 @@ ifneq ($(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS),)
LDFLAGS_vmlinux	+= --emit-relocs --discard-none
endif

# Align the bit size of userspace programs with the kernel
USERFLAGS_FROM_KERNEL := -m32 -m64 --target=%
# Align the architecture of userspace programs with the kernel
USERFLAGS_FROM_KERNEL := --target=%

ifdef CONFIG_ARCH_USERFLAGS
KBUILD_USERCFLAGS += $(CONFIG_ARCH_USERFLAGS)
KBUILD_USERLDFLAGS += $(CONFIG_ARCH_USERFLAGS)
else
# If not overridden also inherit the bit size
USERFLAGS_FROM_KERNEL += -m32 -m64
endif

KBUILD_USERCFLAGS  += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
KBUILD_USERLDFLAGS += $(filter $(USERFLAGS_FROM_KERNEL), $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))

+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
CFLAGS-$(CONFIG_DRM_USE_DYNAMIC_DEBUG)	+= -DDYNAMIC_DEBUG_MODULE

# Unconditionally enable W=1 warnings locally
# --- begin copy-paste W=1 warnings from scripts/Makefile.extrawarn
# --- begin copy-paste W=1 warnings from scripts/Makefile.warn
subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
subdir-ccflags-y += $(call cc-option, -Wrestrict)
subdir-ccflags-y += -Wmissing-format-attribute
Loading