From: Eric Engestrom Date: Fri, 23 Feb 2018 17:02:08 +0000 (+0000) Subject: *-symbol-check: use correct `nm` path when cross-compiling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11d45304fd20bbdf07222830e76d3f9977e803b4;p=mesa.git *-symbol-check: use correct `nm` path when cross-compiling Inspired-by: a similar patch for libdrm by Heiko Becker Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov --- diff --git a/configure.ac b/configure.ac index 346c8130352..d8093597dd0 100644 --- a/configure.ac +++ b/configure.ac @@ -116,6 +116,7 @@ dnl other CC/CXX flags related help AC_ARG_VAR([CXX11_CXXFLAGS], [Compiler flag to enable C++11 support (only needed if not enabled by default and different from -std=c++11)]) AM_PROG_CC_C_O +AC_PROG_NM AM_PROG_AS AX_CHECK_GNU_MAKE AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python]) diff --git a/meson.build b/meson.build index 8cf67b81715..6f2615f9d17 100644 --- a/meson.build +++ b/meson.build @@ -1256,6 +1256,9 @@ endif pkg = import('pkgconfig') +env_test = environment() +env_test.set('NM', find_program('nm').path()) + subdir('include') subdir('bin') subdir('src') diff --git a/src/egl/egl-symbols-check b/src/egl/egl-symbols-check index ae867d04bca..460e61a357c 100755 --- a/src/egl/egl-symbols-check +++ b/src/egl/egl-symbols-check @@ -8,7 +8,7 @@ then exit 1 fi -FUNCS=$(nm -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do +FUNCS=$($NM -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do ( grep -q "^$func$" || echo $func ) <