aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl3
-rwxr-xr-xscripts/depmod.sh5
-rw-r--r--scripts/kconfig/Makefile1
-rw-r--r--scripts/kconfig/check-pkgconfig.sh8
-rwxr-xr-xscripts/kconfig/gconf-cfg.sh7
-rwxr-xr-xscripts/kconfig/mconf-cfg.sh25
-rw-r--r--scripts/kconfig/mconf.c1
-rw-r--r--scripts/kconfig/nconf-cfg.sh25
-rwxr-xr-xscripts/kconfig/qconf-cfg.sh7
-rwxr-xr-xscripts/recordmcount.pl3
-rwxr-xr-xscripts/setlocalversion2
11 files changed, 51 insertions, 36 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5219280bf7ff..161b0224d6ae 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -380,6 +380,7 @@ our $Attribute = qr{
380 __noclone| 380 __noclone|
381 __deprecated| 381 __deprecated|
382 __read_mostly| 382 __read_mostly|
383 __ro_after_init|
383 __kprobes| 384 __kprobes|
384 $InitAttribute| 385 $InitAttribute|
385 ____cacheline_aligned| 386 ____cacheline_aligned|
@@ -3311,7 +3312,7 @@ sub process {
3311 # known declaration macros 3312 # known declaration macros
3312 $sline =~ /^\+\s+$declaration_macros/ || 3313 $sline =~ /^\+\s+$declaration_macros/ ||
3313 # start of struct or union or enum 3314 # start of struct or union or enum
3314 $sline =~ /^\+\s+(?:union|struct|enum|typedef)\b/ || 3315 $sline =~ /^\+\s+(?:static\s+)?(?:const\s+)?(?:union|struct|enum|typedef)\b/ ||
3315 # start or end of block or continuation of declaration 3316 # start or end of block or continuation of declaration
3316 $sline =~ /^\+\s+(?:$|[\{\}\.\#\"\?\:\(\[])/ || 3317 $sline =~ /^\+\s+(?:$|[\{\}\.\#\"\?\:\(\[])/ ||
3317 # bitfield continuation 3318 # bitfield continuation
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index 999d585eaa73..e083bcae343f 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -11,13 +11,14 @@ DEPMOD=$1
11KERNELRELEASE=$2 11KERNELRELEASE=$2
12 12
13if ! test -r System.map ; then 13if ! test -r System.map ; then
14 echo "Warning: modules_install: missing 'System.map' file. Skipping depmod." >&2
14 exit 0 15 exit 0
15fi 16fi
16 17
17if [ -z $(command -v $DEPMOD) ]; then 18if [ -z $(command -v $DEPMOD) ]; then
18 echo "'make modules_install' requires $DEPMOD. Please install it." >&2 19 echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
19 echo "This is probably in the kmod package." >&2 20 echo "This is probably in the kmod package." >&2
20 exit 1 21 exit 0
21fi 22fi
22 23
23# older versions of depmod require the version string to start with three 24# older versions of depmod require the version string to start with three
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 4a7bd2192073..67ed9f6ccdf8 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -221,7 +221,6 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c
221 221
222# check if necessary packages are available, and configure build flags 222# check if necessary packages are available, and configure build flags
223define filechk_conf_cfg 223define filechk_conf_cfg
224 $(CONFIG_SHELL) $(srctree)/scripts/kconfig/check-pkgconfig.sh; \
225 $(CONFIG_SHELL) $< 224 $(CONFIG_SHELL) $<
226endef 225endef
227 226
diff --git a/scripts/kconfig/check-pkgconfig.sh b/scripts/kconfig/check-pkgconfig.sh
deleted file mode 100644
index 7a1c40bfb58c..000000000000
--- a/scripts/kconfig/check-pkgconfig.sh
+++ /dev/null
@@ -1,8 +0,0 @@
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# Check for pkg-config presence
4
5if [ -z $(command -v pkg-config) ]; then
6 echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
7 exit 1
8fi
diff --git a/scripts/kconfig/gconf-cfg.sh b/scripts/kconfig/gconf-cfg.sh
index 533b3d8f8f08..480ecd8b9f41 100755
--- a/scripts/kconfig/gconf-cfg.sh
+++ b/scripts/kconfig/gconf-cfg.sh
@@ -3,6 +3,13 @@
3 3
4PKG="gtk+-2.0 gmodule-2.0 libglade-2.0" 4PKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
5 5
6if [ -z "$(command -v pkg-config)" ]; then
7 echo >&2 "*"
8 echo >&2 "* 'make gconfig' requires 'pkg-config'. Please install it."
9 echo >&2 "*"
10 exit 1
11fi
12
6if ! pkg-config --exists $PKG; then 13if ! pkg-config --exists $PKG; then
7 echo >&2 "*" 14 echo >&2 "*"
8 echo >&2 "* Unable to find the GTK+ installation. Please make sure that" 15 echo >&2 "* Unable to find the GTK+ installation. Please make sure that"
diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
index e6f9facd0077..c812872d7f9d 100755
--- a/scripts/kconfig/mconf-cfg.sh
+++ b/scripts/kconfig/mconf-cfg.sh
@@ -4,20 +4,23 @@
4PKG="ncursesw" 4PKG="ncursesw"
5PKG2="ncurses" 5PKG2="ncurses"
6 6
7if pkg-config --exists $PKG; then 7if [ -n "$(command -v pkg-config)" ]; then
8 echo cflags=\"$(pkg-config --cflags $PKG)\" 8 if pkg-config --exists $PKG; then
9 echo libs=\"$(pkg-config --libs $PKG)\" 9 echo cflags=\"$(pkg-config --cflags $PKG)\"
10 exit 0 10 echo libs=\"$(pkg-config --libs $PKG)\"
11fi 11 exit 0
12 fi
12 13
13if pkg-config --exists $PKG2; then 14 if pkg-config --exists $PKG2; then
14 echo cflags=\"$(pkg-config --cflags $PKG2)\" 15 echo cflags=\"$(pkg-config --cflags $PKG2)\"
15 echo libs=\"$(pkg-config --libs $PKG2)\" 16 echo libs=\"$(pkg-config --libs $PKG2)\"
16 exit 0 17 exit 0
18 fi
17fi 19fi
18 20
19# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses 21# Check the default paths in case pkg-config is not installed.
20# by pkg-config. 22# (Even if it is installed, some distributions such as openSUSE cannot
23# find ncurses by pkg-config.)
21if [ -f /usr/include/ncursesw/ncurses.h ]; then 24if [ -f /usr/include/ncursesw/ncurses.h ]; then
22 echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\" 25 echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
23 echo libs=\"-lncursesw\" 26 echo libs=\"-lncursesw\"
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 83b5836615fb..143c05fec161 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -490,7 +490,6 @@ static void build_conf(struct menu *menu)
490 switch (prop->type) { 490 switch (prop->type) {
491 case P_MENU: 491 case P_MENU:
492 child_count++; 492 child_count++;
493 prompt = prompt;
494 if (single_menu_mode) { 493 if (single_menu_mode) {
495 item_make("%s%*c%s", 494 item_make("%s%*c%s",
496 menu->data ? "-->" : "++>", 495 menu->data ? "-->" : "++>",
diff --git a/scripts/kconfig/nconf-cfg.sh b/scripts/kconfig/nconf-cfg.sh
index 42f5ac73548e..001559ef0a60 100644
--- a/scripts/kconfig/nconf-cfg.sh
+++ b/scripts/kconfig/nconf-cfg.sh
@@ -4,20 +4,23 @@
4PKG="ncursesw menuw panelw" 4PKG="ncursesw menuw panelw"
5PKG2="ncurses menu panel" 5PKG2="ncurses menu panel"
6 6
7if pkg-config --exists $PKG; then 7if [ -n "$(command -v pkg-config)" ]; then
8 echo cflags=\"$(pkg-config --cflags $PKG)\" 8 if pkg-config --exists $PKG; then
9 echo libs=\"$(pkg-config --libs $PKG)\" 9 echo cflags=\"$(pkg-config --cflags $PKG)\"
10 exit 0 10 echo libs=\"$(pkg-config --libs $PKG)\"
11fi 11 exit 0
12 fi
12 13
13if pkg-config --exists $PKG2; then 14 if pkg-config --exists $PKG2; then
14 echo cflags=\"$(pkg-config --cflags $PKG2)\" 15 echo cflags=\"$(pkg-config --cflags $PKG2)\"
15 echo libs=\"$(pkg-config --libs $PKG2)\" 16 echo libs=\"$(pkg-config --libs $PKG2)\"
16 exit 0 17 exit 0
18 fi
17fi 19fi
18 20
19# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses 21# Check the default paths in case pkg-config is not installed.
20# by pkg-config. 22# (Even if it is installed, some distributions such as openSUSE cannot
23# find ncurses by pkg-config.)
21if [ -f /usr/include/ncursesw/ncurses.h ]; then 24if [ -f /usr/include/ncursesw/ncurses.h ]; then
22 echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\" 25 echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
23 echo libs=\"-lncursesw -lmenuw -lpanelw\" 26 echo libs=\"-lncursesw -lmenuw -lpanelw\"
diff --git a/scripts/kconfig/qconf-cfg.sh b/scripts/kconfig/qconf-cfg.sh
index 0862e1562536..02ccc0ae1031 100755
--- a/scripts/kconfig/qconf-cfg.sh
+++ b/scripts/kconfig/qconf-cfg.sh
@@ -4,6 +4,13 @@
4PKG="Qt5Core Qt5Gui Qt5Widgets" 4PKG="Qt5Core Qt5Gui Qt5Widgets"
5PKG2="QtCore QtGui" 5PKG2="QtCore QtGui"
6 6
7if [ -z "$(command -v pkg-config)" ]; then
8 echo >&2 "*"
9 echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it."
10 echo >&2 "*"
11 exit 1
12fi
13
7if pkg-config --exists $PKG; then 14if pkg-config --exists $PKG; then
8 echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\" 15 echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\"
9 echo libs=\"$(pkg-config --libs $PKG)\" 16 echo libs=\"$(pkg-config --libs $PKG)\"
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index fe06e77c15eb..f599031260d5 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -389,6 +389,9 @@ if ($arch eq "x86_64") {
389 $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$"; 389 $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$";
390 $type = ".quad"; 390 $type = ".quad";
391 $alignment = 2; 391 $alignment = 2;
392} elsif ($arch eq "nds32") {
393 $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_NDS32_HI20_RELA\\s+_mcount\$";
394 $alignment = 2;
392} else { 395} else {
393 die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; 396 die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
394} 397}
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 71f39410691b..79f7dd57d571 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -74,7 +74,7 @@ scm_version()
74 fi 74 fi
75 75
76 # Check for uncommitted changes 76 # Check for uncommitted changes
77 if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then 77 if git status -uno --porcelain | grep -qv '^.. scripts/package'; then
78 printf '%s' -dirty 78 printf '%s' -dirty
79 fi 79 fi
80 80