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
This commit is contained in:
Linus Torvalds
2026-01-23 14:58:51 -08:00
2 changed files with 7 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ if [ ! -f "$objfile" ]; then
exit 1
fi
bad_symbols=$(nm "$objfile" | awk '$2 ~ /^[TtWw]$/ {print $3}' | grep -E '^(startup|exit|split|unlikely|hot|unknown)(\.|$)')
bad_symbols=$(${NM:-nm} "$objfile" | awk '$2 ~ /^[TtWw]$/ {print $3}' | grep -E '^(startup|exit|split|unlikely|hot|unknown)(\.|$)')
if [ -n "$bad_symbols" ]; then
echo "$bad_symbols" | while read -r sym; do

View File

@@ -6,8 +6,9 @@ set -eu
cflags=$1
libs=$2
PKG="ncursesw menuw panelw"
PKG2="ncurses menu panel"
# Keep library order for static linking (HOSTCC='cc -static')
PKG="menuw panelw ncursesw"
PKG2="menu panel ncurses"
if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then
if ${HOSTPKG_CONFIG} --exists $PKG; then
@@ -28,19 +29,19 @@ fi
# find ncurses by pkg-config.)
if [ -f /usr/include/ncursesw/ncurses.h ]; then
echo -D_GNU_SOURCE -I/usr/include/ncursesw > ${cflags}
echo -lncursesw -lmenuw -lpanelw > ${libs}
echo -lmenuw -lpanelw -lncursesw > ${libs}
exit 0
fi
if [ -f /usr/include/ncurses/ncurses.h ]; then
echo -D_GNU_SOURCE -I/usr/include/ncurses > ${cflags}
echo -lncurses -lmenu -lpanel > ${libs}
echo -lmenu -lpanel -lncurses > ${libs}
exit 0
fi
if [ -f /usr/include/ncurses.h ]; then
echo -D_GNU_SOURCE > ${cflags}
echo -lncurses -lmenu -lpanel > ${libs}
echo -lmenu -lpanel -lncurses > ${libs}
exit 0
fi