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

Commit 65fc716f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  Fix incompatibility with versions of Perl less than 5.6.0
  kbuild: do not include arch/<ARCH>/include/asm in find-sources twice.
  kbuild: tag with git revision when git describe is missing
  kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module
  kbuild: fix KBUILD_EXTRA_SYMBOLS
  adjust init section definitions
  scripts/checksyscalls.sh: fix for non-gnu sed
  scripts/package: don't break if %{_smp_mflags} isn't set
  kbuild: setlocalversion: dont include svn change count
  kbuild: improve check-symlink
  kbuild: mkspec - fix build rpm
parents 814b3bed 15a2ee74
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -961,6 +961,7 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)

# The asm symlink changes when $(ARCH) changes.
# Detect this and ask user to run make mrproper
# If asm is a stale symlink (point to dir that does not exist) remove it
define check-symlink
	set -e;                                                            \
	if [ -L include/asm ]; then                                        \
@@ -970,6 +971,10 @@ define check-symlink
			echo "       set ARCH or save .config and run 'make mrproper' to fix it";             \
			exit 1;                                            \
		fi;                                                        \
		test -e $$asmlink || rm include/asm;                       \
	elif [ -d include/asm ]; then                                      \
		echo "ERROR: $@ is a directory but a symlink was expected";\
		exit 1;                                                    \
	fi
endef

@@ -1431,7 +1436,8 @@ ALLSOURCE_ARCHS := $(SRCARCH)
define find-sources
        ( for arch in $(ALLSOURCE_ARCHS) ; do \
	       find $(__srctree)arch/$${arch} $(RCS_FIND_IGNORE) \
	            -name $1 -print; \
		    -wholename $(__srctree)arch/$${arch}/include/asm -type d -prune \
	            -o -name $1 -print; \
	  done ; \
	  find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
	       -name $1 -print; \
+5 −1
Original line number Diff line number Diff line
@@ -112,21 +112,25 @@
#define __FINIT		.previous

#define __INITDATA	.section	".init.data","aw"
#define __INITRODATA	.section	".init.rodata","a"
#define __FINITDATA	.previous

#define __DEVINIT        .section	".devinit.text", "ax"
#define __DEVINITDATA    .section	".devinit.data", "aw"
#define __DEVINITRODATA  .section	".devinit.rodata", "a"

#define __CPUINIT        .section	".cpuinit.text", "ax"
#define __CPUINITDATA    .section	".cpuinit.data", "aw"
#define __CPUINITRODATA  .section	".cpuinit.rodata", "a"

#define __MEMINIT        .section	".meminit.text", "ax"
#define __MEMINITDATA    .section	".meminit.data", "aw"
#define __MEMINITRODATA  .section	".meminit.rodata", "a"

/* silence warnings when references are OK */
#define __REF            .section       ".ref.text", "ax"
#define __REFDATA        .section       ".ref.data", "aw"
#define __REFCONST       .section       ".ref.rodata", "aw"
#define __REFCONST       .section       ".ref.rodata", "a"

#ifndef __ASSEMBLY__
/*
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ modpost = scripts/mod/modpost \
 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,)       \
 $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile)   \
 $(if $(KBUILD_EXTMOD),-I $(modulesymfile))      \
 $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \
 $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
 $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
 $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S)      \
 $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
+2 −2
Original line number Diff line number Diff line
@@ -113,10 +113,10 @@ EOF
}

syscall_list() {
sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\
sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\
\#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\
\#warning syscall \1 not implemented\
\#endif/p }' $1
\#endif/p' $1
}

(ignore_list && syscall_list ${srctree}/arch/x86/include/asm/unistd_32.h) | \
+5 −5
Original line number Diff line number Diff line
#!/usr/bin/perl
#!/usr/bin/perl -w
#
# headers_check.pl execute a number of trivial consistency checks
#
@@ -17,7 +17,6 @@
# 2) TODO: check for leaked CONFIG_ symbols

use strict;
use warnings;

my ($dir, $arch, @files) = @ARGV;

@@ -27,14 +26,15 @@ my $lineno = 0;
my $filename;

foreach my $file (@files) {
	local *FH;
	$filename = $file;
	open(my $fh, '<', "$filename") or die "$filename: $!\n";
	open(FH, "<$filename") or die "$filename: $!\n";
	$lineno = 0;
	while ($line = <$fh>) {
	while ($line = <FH>) {
		$lineno++;
		check_include();
	}
	close $fh;
	close FH;
}
exit $ret;

Loading