Commit 62085877 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 3a622041 baaecfca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+6 −5
Original line number Diff line number Diff line
@@ -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