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

+7 -6
+1 -1
scripts/check-function-names.sh
··· 13 13 exit 1 14 14 fi 15 15 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)(\.|$)') 17 17 18 18 if [ -n "$bad_symbols" ]; then 19 19 echo "$bad_symbols" | while read -r sym; do
+6 -5
scripts/kconfig/nconf-cfg.sh
··· 6 6 cflags=$1 7 7 libs=$2 8 8 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" 11 12 12 13 if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then 13 14 if ${HOSTPKG_CONFIG} --exists $PKG; then ··· 29 28 # find ncurses by pkg-config.) 30 29 if [ -f /usr/include/ncursesw/ncurses.h ]; then 31 30 echo -D_GNU_SOURCE -I/usr/include/ncursesw > ${cflags} 32 - echo -lncursesw -lmenuw -lpanelw > ${libs} 31 + echo -lmenuw -lpanelw -lncursesw > ${libs} 33 32 exit 0 34 33 fi 35 34 36 35 if [ -f /usr/include/ncurses/ncurses.h ]; then 37 36 echo -D_GNU_SOURCE -I/usr/include/ncurses > ${cflags} 38 - echo -lncurses -lmenu -lpanel > ${libs} 37 + echo -lmenu -lpanel -lncurses > ${libs} 39 38 exit 0 40 39 fi 41 40 42 41 if [ -f /usr/include/ncurses.h ]; then 43 42 echo -D_GNU_SOURCE > ${cflags} 44 - echo -lncurses -lmenu -lpanel > ${libs} 43 + echo -lmenu -lpanel -lncurses > ${libs} 45 44 exit 0 46 45 fi 47 46