mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
Kbuild fixes for v5.4 (2nd)
- fix a bashism of setlocalversion - do not use the too new --sort option of tar -----BEGIN PGP SIGNATURE----- iQJSBAABCgA8FiEEbmPs18K1szRHjPqEPYsBB53g2wYFAl2sh9MeHHlhbWFkYS5t YXNhaGlyb0Bzb2Npb25leHQuY29tAAoJED2LAQed4NsGO90P/13dNgaibb3JcCvp +ugn+o26V+aqZ8uDLPPifUNFLLnDfGmgORAOe0Z2mGI2CqMDaWMYjvyZNF1KzOdD +WFZubiTUevYyM9AOG6O6EOGEDRumgvdNhnJIP+aCUNKGM50zzhuAa23y6Xip1NZ qJY5AYu9KiH9jTXtZAdGReuMdvNRsMZuvmI4Qnc21utItVxDFEQKGdTlRoJaGEdN Zc/f1HzWwlr7VWZiy0iMRSCAAtAA3TN3S1bw5QCYsuJb3LRl2EIOKMeSinRTYWRc zU5CHrkRSX4/M/o8VantTOZueuGMfbaOAl1KEDh8DUPDcrl+gmL4s8aFuDW+5d2+ 7pPlEe/FNZOAGVBDgiK59N3bl2Rn/Uyg9VGwFc8PU3VeY5VbS97ayBaLFcua2zwX 88mtsZoq+fN3qsq8gfbb21qauTbEibyrk8lzjHoQl07TW82GFWG/GXSt9dQAm1sb w/M15WdaONKOzkYXGGCo0l6vdXx1+qqV/LZQcaWhfcoeU5YVVEmSRwCakCxxSWUE rvWtn0vljgH8kyb0gnUP6qLJC9clwMv58sl/mG65/D7zs9B74g16BkX0tU8vLSpr Ww1BpGtPwuFPp7+kEzWemtlulhDvow2xIX7bNIkAk1IIVpyCmU98AKpivR7G9Cvt 4cZPSGRU+s2ou/hrtjryzvmwhGUG =KNWF -----END PGP SIGNATURE----- Merge tag 'kbuild-fixes-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild fixes from Masahiro Yamada: - fix a bashism of setlocalversion - do not use the too new --sort option of tar * tag 'kbuild-fixes-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kheaders: substituting --sort in archive creation scripts: setlocalversion: fix a bashism kbuild: update comment about KBUILD_ALLDIRS
This commit is contained in:
commit
e2ab4ef83f
2
Makefile
2
Makefile
@ -1037,7 +1037,7 @@ export KBUILD_VMLINUX_OBJS := $(head-y) $(init-y) $(core-y) $(libs-y2) \
|
||||
export KBUILD_VMLINUX_LIBS := $(libs-y1)
|
||||
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
|
||||
export LDFLAGS_vmlinux
|
||||
# used by scripts/package/Makefile
|
||||
# used by scripts/Makefile.package
|
||||
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
|
||||
|
||||
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
|
||||
|
@ -71,10 +71,13 @@ done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1
|
||||
find $cpio_dir -type f -print0 |
|
||||
xargs -0 -P8 -n1 perl -pi -e 'BEGIN {undef $/;}; s/\/\*((?!SPDX).)*?\*\///smg;'
|
||||
|
||||
# Create archive and try to normalize metadata for reproducibility
|
||||
tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
|
||||
--owner=0 --group=0 --sort=name --numeric-owner \
|
||||
-Jcf $tarfile -C $cpio_dir/ . > /dev/null
|
||||
# Create archive and try to normalize metadata for reproducibility.
|
||||
# For compatibility with older versions of tar, files are fed to tar
|
||||
# pre-sorted, as --sort=name might not be available.
|
||||
find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \
|
||||
tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
|
||||
--owner=0 --group=0 --numeric-owner --no-recursion \
|
||||
-Jcf $tarfile -C $cpio_dir/ -T - > /dev/null
|
||||
|
||||
echo "$src_files_md5" > kernel/kheaders.md5
|
||||
echo "$obj_files_md5" >> kernel/kheaders.md5
|
||||
|
@ -93,7 +93,7 @@ scm_version()
|
||||
# Check for mercurial and a mercurial repo.
|
||||
if test -d .hg && hgid=`hg id 2>/dev/null`; then
|
||||
# Do we have an tagged version? If so, latesttagdistance == 1
|
||||
if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
|
||||
if [ "`hg log -r . --template '{latesttagdistance}'`" = "1" ]; then
|
||||
id=`hg log -r . --template '{latesttag}'`
|
||||
printf '%s%s' -hg "$id"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user