History

Merge tag 'kbuild-fixes-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux

Pull Kbuild fixes from Nicolas Schier: - builddeb - avoid recompiles for non-cross-compiles Avoid triggering complete rebuilds for non-cross-compile Debian package builds by only triggering the rebuild of host tools for actual cross-compile builds - Never respect CONFIG_WERROR / W=e to fixdep Avoid spurious rebuilds of fixdep w/ and w/o -Werror during a single kbuild invocation by never respecting CONFIG_WERROR for fixdep * tag 'kbuild-fixes-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: kbuild: Never respect CONFIG_WERROR / W=e to fixdep kbuild: builddeb - avoid recompiles for non-cross-compiles

Linus Torvalds committed 6 months ago

Commit b9351172 parents 2ff1bc4 75f7c472 files · +9 −1Browse files

Unified · Split

2 files
  1. Makefile +2 −0
  2. scripts/package/builddeb +7 −1
Makefile+2−0
@@ -657,6 +657,8 @@ export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ · 656 unmodified lines
657657
658658 # Basic helpers built in scripts/basic/
659659 PHONY += scripts_basic
660+scripts_basic: KBUILD_HOSTCFLAGS := $(KBUILD_HOSTCFLAGS)
661+scripts_basic: KBUILD_HOSTLDFLAGS := $(KBUILD_HOSTLDFLAGS)
660662 scripts_basic:
661663 $(Q)$(MAKE) $(build)=scripts/basic
662664
scripts/package/builddeb+7−1
@@ -139,7 +139,13 @@ install_kernel_headers () { · 138 unmodified lines
139139 pdir=debian/$1
140140 version=${1#linux-headers-}
141141
142− CC="${DEB_HOST_GNU_TYPE}-gcc" "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
142+ # Override $CC only for cross-compiles, to not unnecessarily rebuild
143+ # scripts/ including plugins, which may lead to a full kernel rebuild.
144+ if [ -n "${CROSS_COMPILE}" ]; then
145+ CC="${DEB_HOST_GNU_TYPE}-gcc" "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
146+ else
147+ "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
148+ fi
143149
144150 mkdir -p $pdir/lib/modules/$version/
145151 ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build