Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e026bcc5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull Kbuild updates from Masahiro Yamada:

 - verify depmod is installed before modules_install

 - support build salt in case build ids must be unique between builds

 - allow users to specify additional host compiler flags via HOST*FLAGS,
   and rename internal variables to KBUILD_HOST*FLAGS

 - update buildtar script to drop vax support, add arm64 support

 - update builddeb script for better debarch support

 - document the pit-fall of if_changed usage

 - fix parallel build of UML with O= option

 - make 'samples' target depend on headers_install to fix build errors

 - remove deprecated host-progs variable

 - add a new coccinelle script for refcount_t vs atomic_t check

 - improve double-test coccinelle script

 - misc cleanups and fixes

* tag 'kbuild-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (41 commits)
  coccicheck: return proper error code on fail
  Coccinelle: doubletest: reduce side effect false positives
  kbuild: remove deprecated host-progs variable
  kbuild: make samples really depend on headers_install
  um: clean up archheaders recipe
  kbuild: add %asm-generic to no-dot-config-targets
  um: fix parallel building with O= option
  scripts: Add Python 3 support to tracing/draw_functrace.py
  builddeb: Add automatic support for sh{3,4}{,eb} architectures
  builddeb: Add automatic support for riscv* architectures
  builddeb: Add automatic support for m68k architecture
  builddeb: Add automatic support for or1k architecture
  builddeb: Add automatic support for sparc64 architecture
  builddeb: Add automatic support for mips{,64}r6{,el} architectures
  builddeb: Add automatic support for mips64el architecture
  builddeb: Add automatic support for ppc64 and powerpcspe architectures
  builddeb: Introduce functions to simplify kconfig tests in set_debarch
  builddeb: Drop check for 32-bit s390
  builddeb: Change architecture detection fallback to use dpkg-architecture
  builddeb: Skip architecture detection when KBUILD_DEBARCH is set
  ...
parents 7c7b562c 512ddf7d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -50,6 +50,22 @@ LDFLAGS_MODULE
--------------------------------------------------
Additional options used for $(LD) when linking modules.

HOSTCFLAGS
--------------------------------------------------
Additional flags to be passed to $(HOSTCC) when building host programs.

HOSTCXXFLAGS
--------------------------------------------------
Additional flags to be passed to $(HOSTCXX) when building host programs.

HOSTLDFLAGS
--------------------------------------------------
Additional flags to be passed when linking host programs.

HOSTLDLIBS
--------------------------------------------------
Additional libraries to link against when building host programs.

KBUILD_KCONFIG
--------------------------------------------------
Set the top-level Kconfig file to the value of this environment
+7 −1
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ Both possibilities are described in the following.

	When compiling host programs, it is possible to set specific flags.
	The programs will always be compiled utilising $(HOSTCC) passed
	the options specified in $(HOSTCFLAGS).
	the options specified in $(KBUILD_HOSTCFLAGS).
	To set flags that will take effect for all host programs created
	in that Makefile, use the variable HOST_EXTRACFLAGS.

@@ -1105,6 +1105,12 @@ When kbuild executes, the following steps are followed (roughly):
		target: source(s) FORCE
	#WRONG!#	$(call if_changed, ld/objcopy/gzip/...)

        Note: if_changed should not be used more than once per target.
              It stores the executed command in a corresponding .cmd
        file and multiple calls would result in overwrites and
        unwanted results when the target is up to date and only the
        tests on changed commands trigger execution of commands.

    ld
	Link target. Often, LDFLAGS_$@ is used to set specific options to ld.

+7 −12
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ binutils 2.20 ld -v
flex                   2.5.35           flex --version
bison                  2.0              bison --version
util-linux             2.10o            fdformat --version
module-init-tools      0.9.10           depmod -V
kmod                   13               depmod -V
e2fsprogs              1.41.4           e2fsck -V
jfsutils               1.1.3            fsck.jfs -V
reiserfsprogs          3.6.3            reiserfsck -V
@@ -156,12 +156,6 @@ is not build with ``CONFIG_KALLSYMS`` and you have no way to rebuild and
reproduce the Oops with that option, then you can still decode that Oops
with ksymoops.

Module-Init-Tools
-----------------

A new module loader is now in the kernel that requires ``module-init-tools``
to use.  It is backward compatible with the 2.4.x series kernels.

Mkinitrd
--------

@@ -371,16 +365,17 @@ Util-linux

- <https://www.kernel.org/pub/linux/utils/util-linux/>

Kmod
----

- <https://www.kernel.org/pub/linux/utils/kernel/kmod/>
- <https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git>

Ksymoops
--------

- <https://www.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/>

Module-Init-Tools
-----------------

- <https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/>

Mkinitrd
--------

+13 −11
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ clean-targets := %clean mrproper cleandocs
no-dot-config-targets := $(clean-targets) \
			 cscope gtags TAGS tags help% %docs check% coccicheck \
			 $(version_h) headers_% archheaders archscripts \
			 kernelversion %src-pkg
			 %asm-generic kernelversion %src-pkg

config-targets := 0
mixed-targets  := 0
@@ -359,11 +359,12 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)

HOSTCC       = gcc
HOSTCXX      = g++
HOSTCFLAGS   := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
		-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
HOSTLDFLAGS  := $(HOST_LFS_LDFLAGS)
HOST_LOADLIBES := $(HOST_LFS_LIBS)
KBUILD_HOSTCFLAGS   := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
		-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \
		$(HOSTCFLAGS)
KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
KBUILD_HOSTLDFLAGS  := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
KBUILD_HOSTLDLIBS   := $(HOST_LFS_LIBS) $(HOSTLDLIBS)

# Make variables (CC, etc...)
AS		= $(CROSS_COMPILE)as
@@ -429,10 +430,10 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
LDFLAGS :=
GCC_PLUGINS_CFLAGS :=

export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS

export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
@@ -1009,9 +1010,10 @@ ifdef CONFIG_GDB_SCRIPTS
endif
	+$(call if_changed,link-vmlinux)

# Build samples along the rest of the kernel
# Build samples along the rest of the kernel. This needs headers_install.
ifdef CONFIG_SAMPLES
vmlinux-dirs += samples
samples: headers_install
endif

# The actual objects are generated when descending,
@@ -1116,7 +1118,7 @@ define filechk_version.h
	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef

$(version_h): $(srctree)/Makefile FORCE
$(version_h): FORCE
	$(call filechk,version.h)
	$(Q)rm -f $(old_version_h)

+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ targets := vmlinux.gz vmlinux \
		   tools/bootpzh bootloader bootpheader bootpzheader 
OBJSTRIP	:= $(obj)/tools/objstrip

HOSTCFLAGS	:= -Wall -I$(objtree)/usr/include
KBUILD_HOSTCFLAGS := -Wall -I$(objtree)/usr/include
BOOTCFLAGS	+= -I$(objtree)/$(obj) -I$(srctree)/$(obj)

# SRM bootable image.  Copy to offset 512 of a partition.
Loading