Second round of Kbuild fixes for 6.19

- Reduce possible complications when cross-compiling by increasing use
    of ${NM} in check-function-names.sh
 
  - Fix static linking of nconf
 
 Cc: Carlos Llamas <cmllamas@google.com>
 Cc: Arkadiusz Kozdra <floss@arusekk.pl>
 Cc: Nathan Chancellor <nathan@kernel.org>
 Cc: linux-kbuild@vger.kernel.org
 Signed-off-by: Nicolas Schier <nsc@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEh0E3p4c3JKeBvsLGB1IKcBYmEmkFAmlz5YcACgkQB1IKcBYm
 EmlwfhAAsMLMfwviC8s47QPhsZfBSmMDCRbJBib9w5ARD19bQNe8WknxV30YOJsT
 vquxAZQx5ZZrKow9uPPaaoRMSh31ooljcthXDNIJylPOXQrytsnWutTPh0gcvTHE
 1whNLhrtaZ3L3E5IyD+WrXwGGzZzuXNiUnVU5TdAeO+DeRz1tZf9x3ejLW1yw7p5
 zTeEHWTzDbWLXw2AxkYxgjt908K+DYsFz/dCeDS752t37ZUXJ/SdxVsY5BespXoo
 lpBABRsGJTg1xOyMElvRvAQL5il1lKZVgr2LrnI4hhWndsc8otcqxFo8QhynenYi
 BncJEjqxjehkEjeoQRBooWReGmytxvqOc7AhTT0k2sHoCMd01RSRnWLOIGi8iix1
 2B6lNXTqOW71U4R/0OzcPYq/Xwy6mDFzRFn9VQ4LyQ2yK/8yc63gOX9Z6XgXbO7C
 sBZy1HzEn6xVac6U+o4IRxYPuRfkjJPf25E1pWStkNfslJ+zUpER64t4hyucCcDu
 QwMLIfbdmczLPj4pJaiwWj40qSPvmykqJAmA2O2VrN8wYbQetgy/H1LDJu3l7gXY
 v09OPSDc2PFbuAWNkSgIBftvrgtQGkwZ3WopgSPVdw7ZFs/EmftejBrngJXPDJpM
 5JpbTYeqj5CaD1ZcSswdRqiuaV8o2N36Bk4ySbMhDhvpidvAJwg=
 =ExIb
 -----END PGP SIGNATURE-----

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
commit 62085877ae
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