Skip to content

Commit 6208587

Browse files
committed
Merge tag 'kbuild-fixes-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull kbuild fixes from Nicolas Schier: - Reduce possible complications when cross-compiling by increasing use of ${NM} in check-function-names.sh - Fix static linking of nconf * tag 'kbuild-fixes-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: kconfig: fix static linking of nconf kbuild: prefer ${NM} in check-function-names.sh
2 parents 3a62204 + baaecfc commit 6208587

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

scripts/check-function-names.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [ ! -f "$objfile" ]; then
1313
exit 1
1414
fi
1515

16-
bad_symbols=$(nm "$objfile" | awk '$2 ~ /^[TtWw]$/ {print $3}' | grep -E '^(startup|exit|split|unlikely|hot|unknown)(\.|$)')
16+
bad_symbols=$(${NM:-nm} "$objfile" | awk '$2 ~ /^[TtWw]$/ {print $3}' | grep -E '^(startup|exit|split|unlikely|hot|unknown)(\.|$)')
1717

1818
if [ -n "$bad_symbols" ]; then
1919
echo "$bad_symbols" | while read -r sym; do

scripts/kconfig/nconf-cfg.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ set -eu
66
cflags=$1
77
libs=$2
88

9-
PKG="ncursesw menuw panelw"
10-
PKG2="ncurses menu panel"
9+
# Keep library order for static linking (HOSTCC='cc -static')
10+
PKG="menuw panelw ncursesw"
11+
PKG2="menu panel ncurses"
1112

1213
if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then
1314
if ${HOSTPKG_CONFIG} --exists $PKG; then
@@ -28,19 +29,19 @@ fi
2829
# find ncurses by pkg-config.)
2930
if [ -f /usr/include/ncursesw/ncurses.h ]; then
3031
echo -D_GNU_SOURCE -I/usr/include/ncursesw > ${cflags}
31-
echo -lncursesw -lmenuw -lpanelw > ${libs}
32+
echo -lmenuw -lpanelw -lncursesw > ${libs}
3233
exit 0
3334
fi
3435

3536
if [ -f /usr/include/ncurses/ncurses.h ]; then
3637
echo -D_GNU_SOURCE -I/usr/include/ncurses > ${cflags}
37-
echo -lncurses -lmenu -lpanel > ${libs}
38+
echo -lmenu -lpanel -lncurses > ${libs}
3839
exit 0
3940
fi
4041

4142
if [ -f /usr/include/ncurses.h ]; then
4243
echo -D_GNU_SOURCE > ${cflags}
43-
echo -lncurses -lmenu -lpanel > ${libs}
44+
echo -lmenu -lpanel -lncurses > ${libs}
4445
exit 0
4546
fi
4647

0 commit comments

Comments
 (0)