mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
Merge tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada: - Refactor scripts/kallsyms to make it faster and easier to maintain - Clean up menuconfig - Provide Clang with hard-coded target triple instead of CROSS_COMPILE - Use -z pack-relative-relocs flags instead of --use-android-relr-tags for arm64 CONFIG_RELR - Add srcdeb-pkg target to build only a Debian source package - Add KDEB_SOURCE_COMPRESS option to specify the compression for a Debian source package - Misc cleanups and fixes * tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: deb-pkg: specify targets in debian/rules as .PHONY sparc: unify sparc32/sparc64 archhelp kbuild: rpm-pkg: remove kernel-drm PROVIDES kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify source compression kbuild: add srcdeb-pkg target Makefile: use -z pack-relative-relocs kbuild: clang: do not use CROSS_COMPILE for target triple kconfig: menuconfig: reorder functions to remove forward declarations kconfig: menuconfig: remove unused M_EVENT macro kconfig: menuconfig: remove OLD_NCURSES macro kbuild: builddeb: Eliminate debian/arch use scripts/kallsyms: update the usage in the comment block scripts/kallsyms: decrease expand_symbol() / cleanup_symbol_name() calls scripts/kallsyms: change the output order scripts/kallsyms: move compiler-generated symbol patterns to mksysmap scripts/kallsyms: exclude symbols generated by itself dynamically scripts/mksysmap: use sed with in-line comments scripts/mksysmap: remove comments described in nm(1) scripts/kallsyms: remove redundant code for omitting U and N kallsyms: expand symbol name into comment for debugging
This commit is contained in:
@@ -5,7 +5,6 @@ include $(srctree)/scripts/Kbuild.include
|
||||
include $(srctree)/scripts/Makefile.lib
|
||||
|
||||
KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
|
||||
KBUILD_PKG_ROOTCMD ?="fakeroot -u"
|
||||
# Include only those top-level files that are needed by make, plus the GPL copy
|
||||
TAR_CONTENT := Documentation LICENSES arch block certs crypto drivers fs \
|
||||
include init io_uring ipc kernel lib mm net rust \
|
||||
@@ -42,19 +41,25 @@ check-git:
|
||||
false; \
|
||||
fi
|
||||
|
||||
git-config-tar.gz = -c tar.tar.gz.command="$(KGZIP)"
|
||||
git-config-tar.bz2 = -c tar.tar.bz2.command="$(KBZIP2)"
|
||||
git-config-tar.xz = -c tar.tar.xz.command="$(XZ)"
|
||||
git-config-tar.zst = -c tar.tar.zst.command="$(ZSTD)"
|
||||
git-config-tar.gz = -c tar.tar.gz.command="$(KGZIP)"
|
||||
git-config-tar.bz2 = -c tar.tar.bz2.command="$(KBZIP2)"
|
||||
git-config-tar.lzma = -c tar.tar.lzma.command="$(LZMA)"
|
||||
git-config-tar.xz = -c tar.tar.xz.command="$(XZ)"
|
||||
git-config-tar.zst = -c tar.tar.zst.command="$(ZSTD)"
|
||||
|
||||
quiet_cmd_archive = ARCHIVE $@
|
||||
cmd_archive = git -C $(srctree) $(git-config-tar$(suffix $@)) archive \
|
||||
--output=$$(realpath $@) $(archive-args)
|
||||
|
||||
suffix-gzip := .gz
|
||||
suffix-bzip2 := .bz2
|
||||
suffix-lzma := .lzma
|
||||
suffix-xz := .xz
|
||||
|
||||
# Linux source tarball
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
linux-tarballs := $(addprefix linux, .tar.gz)
|
||||
linux-tarballs := $(addprefix linux, .tar.gz .tar.bz2 .tar.lzma .tar.xz)
|
||||
|
||||
targets += $(linux-tarballs)
|
||||
$(linux-tarballs): archive-args = --prefix=linux/ $$(cat $<)
|
||||
@@ -86,6 +91,22 @@ binrpm-pkg:
|
||||
+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
|
||||
$(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec
|
||||
|
||||
# deb-pkg srcdeb-pkg bindeb-pkg
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
KDEB_SOURCE_COMPRESS ?= gzip
|
||||
|
||||
supported-deb-source-compress := gzip bzip2 lzma xz
|
||||
|
||||
PHONY += linux.tar.unsupported-deb-src-compress
|
||||
linux.tar.unsupported-deb-src-compress:
|
||||
@echo "error: KDEB_SOURCE_COMPRESS=$(KDEB_SOURCE_COMPRESS) is not supported. The supported values are: $(supported-deb-source-compress)" >&2
|
||||
@false
|
||||
|
||||
debian-orig-suffix := \
|
||||
$(strip $(if $(filter $(supported-deb-source-compress), $(KDEB_SOURCE_COMPRESS)), \
|
||||
$(suffix-$(KDEB_SOURCE_COMPRESS)),.unsupported-deb-src-compress))
|
||||
|
||||
quiet_cmd_debianize = GEN $@
|
||||
cmd_debianize = $(srctree)/scripts/package/mkdebian $(mkdebian-opts)
|
||||
|
||||
@@ -95,23 +116,34 @@ debian: FORCE
|
||||
PHONY += debian-orig
|
||||
debian-orig: private source = $(shell dpkg-parsechangelog -S Source)
|
||||
debian-orig: private version = $(shell dpkg-parsechangelog -S Version | sed 's/-[^-]*$$//')
|
||||
debian-orig: private orig-name = $(source)_$(version).orig.tar.gz
|
||||
debian-orig: private orig-name = $(source)_$(version).orig.tar$(debian-orig-suffix)
|
||||
debian-orig: mkdebian-opts = --need-source
|
||||
debian-orig: linux.tar.gz debian
|
||||
debian-orig: linux.tar$(debian-orig-suffix) debian
|
||||
$(Q)if [ "$(df --output=target .. 2>/dev/null)" = "$(df --output=target $< 2>/dev/null)" ]; then \
|
||||
ln -f $< ../$(orig-name); \
|
||||
else \
|
||||
cp $< ../$(orig-name); \
|
||||
fi
|
||||
|
||||
PHONY += deb-pkg
|
||||
deb-pkg: debian-orig
|
||||
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) \
|
||||
--build=source,binary -nc -us -uc
|
||||
KBUILD_PKG_ROOTCMD ?= 'fakeroot -u'
|
||||
|
||||
PHONY += bindeb-pkg
|
||||
PHONY += deb-pkg srcdeb-pkg bindeb-pkg
|
||||
|
||||
deb-pkg: private build-type := source,binary
|
||||
srcdeb-pkg: private build-type := source
|
||||
bindeb-pkg: private build-type := binary
|
||||
|
||||
deb-pkg srcdeb-pkg: debian-orig
|
||||
bindeb-pkg: debian
|
||||
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
|
||||
deb-pkg srcdeb-pkg bindeb-pkg:
|
||||
+$(strip dpkg-buildpackage \
|
||||
--build=$(build-type) --no-pre-clean --unsigned-changes \
|
||||
$(if $(findstring source, $(build-type)), \
|
||||
--unsigned-source --compression=$(KDEB_SOURCE_COMPRESS)) \
|
||||
$(if $(findstring binary, $(build-type)), \
|
||||
-r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch), \
|
||||
--no-check-builddeps) \
|
||||
$(DPKG_FLAGS))
|
||||
|
||||
PHONY += intdeb-pkg
|
||||
intdeb-pkg:
|
||||
@@ -208,6 +240,7 @@ help:
|
||||
@echo ' srcrpm-pkg - Build only the source kernel RPM package'
|
||||
@echo ' binrpm-pkg - Build only the binary kernel RPM package'
|
||||
@echo ' deb-pkg - Build both source and binary deb kernel packages'
|
||||
@echo ' srcdeb-pkg - Build only the source kernel deb package'
|
||||
@echo ' bindeb-pkg - Build only the binary kernel deb package'
|
||||
@echo ' snap-pkg - Build only the binary kernel snap package'
|
||||
@echo ' (will connect to external hosts)'
|
||||
|
||||
Reference in New Issue
Block a user