Skip to content

Commit b5dbc28

Browse files
committed
Merge tag 'kbuild-fixes-v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - fix missed rebuild of TRIM_UNUSED_KSYMS - fix rpm-pkg for GNU tar >= 1.29 - include scripts/dtc/include-prefixes/* to kernel header deb-pkg - add -no-integrated-as option ealier to fix building with Clang - fix netfilter Makefile for parallel building * tag 'kbuild-fixes-v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: netfilter: nf_nat_snmp_basic: add correct dependency to Makefile kbuild: rpm-pkg: Support GNU tar >= 1.29 builddeb: Fix header package regarding dtc source links kbuild: set no-integrated-as before incl. arch Makefile kbuild: make scripts/adjust_autoksyms.sh robust against timestamp races
2 parents a44406e + 28913ee commit b5dbc28

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN)
487487
endif
488488
KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
489489
KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
490+
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
491+
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
490492
endif
491493

492494
RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
@@ -743,8 +745,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
743745
# See modpost pattern 2
744746
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
745747
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
746-
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
747-
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
748748
else
749749

750750
# These warnings generated too much noise in a regular build.

net/ipv4/netfilter/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o
2929
obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o
3030

3131
nf_nat_snmp_basic-y := nf_nat_snmp_basic-asn1.o nf_nat_snmp_basic_main.o
32-
nf_nat_snmp_basic-y : nf_nat_snmp_basic-asn1.h nf_nat_snmp_basic-asn1.c
32+
$(obj)/nf_nat_snmp_basic_main.o: $(obj)/nf_nat_snmp_basic-asn1.h
3333
obj-$(CONFIG_NF_NAT_SNMP_BASIC) += nf_nat_snmp_basic.o
3434
clean-files := nf_nat_snmp_basic-asn1.c nf_nat_snmp_basic-asn1.h
3535

scripts/adjust_autoksyms.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ while read sympath; do
8484
depfile="include/config/ksym/${sympath}.h"
8585
mkdir -p "$(dirname "$depfile")"
8686
touch "$depfile"
87+
# Filesystems with coarse time precision may create timestamps
88+
# equal to the one from a file that was very recently built and that
89+
# needs to be rebuild. Let's guard against that by making sure our
90+
# dep files are always newer than the first file we created here.
91+
while [ ! "$depfile" -nt "$new_ksyms_file" ]; do
92+
touch "$depfile"
93+
done
8794
echo $((count += 1))
8895
done | tail -1 )
8996
changed=${changed:-0}

scripts/package/builddeb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ fi
313313

314314
# Build kernel header package
315315
(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
316-
(cd $srctree; find arch/*/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
316+
(cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles"
317317
(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
318318
(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
319319
if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then

scripts/package/mkspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ $M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_instal
9898
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build
9999
$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source
100100
$S$M mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE
101-
$S$M tar cf - . $EXCLUDES | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE
101+
$S$M tar cf - $EXCLUDES . | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE
102102
$S$M cd %{buildroot}/lib/modules/$KERNELRELEASE
103103
$S$M ln -sf /usr/src/kernels/$KERNELRELEASE build
104104
$S$M ln -sf /usr/src/kernels/$KERNELRELEASE source

0 commit comments

Comments
 (0)