*-symbol-check: use correct nm path when cross-compiling

Inspired-by: a similar patch for libdrm by Heiko Becker
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Eric Engestrom 2018-02-23 17:02:08 +00:00
parent ef308d4007
commit 11d45304fd
12 changed files with 14 additions and 6 deletions

View file

@ -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 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)]) enabled by default and different from -std=c++11)])
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_NM
AM_PROG_AS AM_PROG_AS
AX_CHECK_GNU_MAKE AX_CHECK_GNU_MAKE
AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python]) AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python])

View file

@ -1256,6 +1256,9 @@ endif
pkg = import('pkgconfig') pkg = import('pkgconfig')
env_test = environment()
env_test.set('NM', find_program('nm').path())
subdir('include') subdir('include')
subdir('bin') subdir('bin')
subdir('src') subdir('src')

View file

@ -8,7 +8,7 @@ then
exit 1 exit 1
fi 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 ) <<EOF ( grep -q "^$func$" || echo $func ) <<EOF
eglBindAPI eglBindAPI
eglBindTexImage eglBindTexImage

View file

@ -204,6 +204,7 @@ if with_tests
else else
test('egl-symbols-check', test('egl-symbols-check',
find_program('egl-symbols-check'), find_program('egl-symbols-check'),
env : env_test,
args : libegl args : libegl
) )
endif endif

View file

@ -40,6 +40,7 @@ pkg.generate(
if with_tests if with_tests
test('wayland-egl-symbols-check', test('wayland-egl-symbols-check',
find_program('wayland-egl-symbols-check'), find_program('wayland-egl-symbols-check'),
env : env_test,
args : libwayland_egl args : libwayland_egl
) )
test( test(

View file

@ -8,7 +8,7 @@ then
exit 1 exit 1
fi 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 ) <<EOF ( grep -q "^$func$" || echo $func ) <<EOF
wl_egl_window_resize wl_egl_window_resize
wl_egl_window_create wl_egl_window_create

View file

@ -8,8 +8,7 @@ then
exit 1 exit 1
fi 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 ) <<EOF ( grep -q "^$func$" || echo $func ) <<EOF
gbm_device_get_fd gbm_device_get_fd
gbm_device_get_backend_name gbm_device_get_backend_name

View file

@ -74,6 +74,7 @@ if with_tests
test( test(
'gbm-symbols-check', 'gbm-symbols-check',
find_program('gbm-symbols-check'), find_program('gbm-symbols-check'),
env : env_test,
args : libgbm args : libgbm
) )
endif endif

View file

@ -26,7 +26,7 @@ then
exit 1 exit 1
fi fi
FUNCS=$(nm -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do FUNCS=$($NM -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF ( grep -q "^$func$" || echo $func ) <<EOF
glActiveTexture glActiveTexture
glAlphaFunc glAlphaFunc

View file

@ -55,6 +55,7 @@ if with_tests
test( test(
'es1-ABI-check', 'es1-ABI-check',
find_program('ABI-check'), find_program('ABI-check'),
env : env_test,
args : libglesv1_cm args : libglesv1_cm
) )
endif endif

View file

@ -23,7 +23,7 @@ then
exit 1 exit 1
fi fi
FUNCS=$(nm -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do FUNCS=$($NM -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF ( grep -q "^$func$" || echo $func ) <<EOF
glActiveShaderProgram glActiveShaderProgram
glActiveTexture glActiveTexture

View file

@ -55,6 +55,7 @@ if with_tests
test( test(
'es2-ABI-check', 'es2-ABI-check',
find_program('ABI-check'), find_program('ABI-check'),
env : env_test,
args : libgles2 args : libgles2
) )
endif endif