summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Becker <heirecka@exherbo.org>2018-02-19 15:13:15 +0000
committerEric Engestrom <eric.engestrom@imgtec.com>2018-02-23 17:53:08 +0000
commit4f08bfe96da1542f336589edf310d06ebce3cf20 (patch)
tree189d03ab810f7fba8993fcbab638cddae5f2bf3b
parent009634e493097afae95d190fc26cb04a1664648a (diff)
downloadlibdrm-4f08bfe96da1542f336589edf310d06ebce3cf20.tar.gz
libdrm-4f08bfe96da1542f336589edf310d06ebce3cf20.tar.bz2
libdrm-4f08bfe96da1542f336589edf310d06ebce3cf20.zip
*-symbol-check: Don't hard-code nm executable
Helpful if your nm executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Cc: Timo Gurr <timo.gurr@gmail.com> [Eric: v2: rebase and add Meson support] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-rwxr-xr-xamdgpu/amdgpu-symbol-check2
-rw-r--r--amdgpu/meson.build1
-rw-r--r--configure.ac1
-rwxr-xr-xexynos/exynos-symbol-check2
-rw-r--r--exynos/meson.build1
-rwxr-xr-xfreedreno/freedreno-symbol-check2
-rw-r--r--freedreno/meson.build1
-rwxr-xr-xintel/intel-symbol-check2
-rw-r--r--intel/meson.build1
-rwxr-xr-xlibkms/kms-symbol-check2
-rw-r--r--libkms/meson.build1
-rw-r--r--meson.build3
-rw-r--r--nouveau/meson.build1
-rwxr-xr-xnouveau/nouveau-symbol-check2
-rw-r--r--omap/meson.build1
-rwxr-xr-xomap/omap-symbol-check2
-rw-r--r--radeon/meson.build1
-rwxr-xr-xradeon/radeon-symbol-check2
-rw-r--r--tegra/meson.build1
-rwxr-xr-xtegra/tegra-symbol-check2
20 files changed, 22 insertions, 9 deletions
diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
index 17de0c3b..90b7a1d6 100755
--- a/amdgpu/amdgpu-symbol-check
+++ b/amdgpu/amdgpu-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.am/libdrm_amdgpuinclude_HEADERS
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/amdgpu/meson.build b/amdgpu/meson.build
index 8b045205..518b8504 100644
--- a/amdgpu/meson.build
+++ b/amdgpu/meson.build
@@ -61,5 +61,6 @@ ext_libdrm_amdgpu = declare_dependency(
test(
'amdgpu-symbol-check',
prog_bash,
+ env : env_test,
args : [files('amdgpu-symbol-check'), libdrm_amdgpu]
)
diff --git a/configure.ac b/configure.ac
index 68270004..02644a66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Check for programs
AC_PROG_CC
AC_PROG_CC_C99
+AC_PROG_NM
if test "x$ac_cv_prog_cc_c99" = xno; then
AC_MSG_ERROR([Building libdrm requires C99 enabled compiler])
diff --git a/exynos/exynos-symbol-check b/exynos/exynos-symbol-check
index 9692caa6..e9f1b04d 100755
--- a/exynos/exynos-symbol-check
+++ b/exynos/exynos-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.am/libdrm_exynos*_HEADERS
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/exynos/meson.build b/exynos/meson.build
index c96ad4e0..30d36405 100644
--- a/exynos/meson.build
+++ b/exynos/meson.build
@@ -49,5 +49,6 @@ pkg.generate(
test(
'exynos-symbol-check',
prog_bash,
+ env : env_test,
args : [files('exynos-symbol-check'), libdrm_exynos]
)
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
index 6b81040c..56e3d3ee 100755
--- a/freedreno/freedreno-symbol-check
+++ b/freedreno/freedreno-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/freedreno/meson.build b/freedreno/meson.build
index de6a413f..741b3b6a 100644
--- a/freedreno/meson.build
+++ b/freedreno/meson.build
@@ -72,5 +72,6 @@ pkg.generate(
test(
'freedreno-symbol-check',
prog_bash,
+ env : env_test,
args : [files('freedreno-symbol-check'), libdrm_freedreno]
)
diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
index 2aa2d819..4d30a4b1 100755
--- a/intel/intel-symbol-check
+++ b/intel/intel-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_INTEL_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/intel/meson.build b/intel/meson.build
index ad877274..aa5a1349 100644
--- a/intel/meson.build
+++ b/intel/meson.build
@@ -101,5 +101,6 @@ test(
test(
'intel-symbol-check',
prog_bash,
+ env : env_test,
args : [files('intel-symbol-check'), libdrm_intel]
)
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
index 658b2692..a5c2120d 100755
--- a/libkms/kms-symbol-check
+++ b/libkms/kms-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/libkms/meson.build b/libkms/meson.build
index 9eff4313..86d1a4ee 100644
--- a/libkms/meson.build
+++ b/libkms/meson.build
@@ -70,5 +70,6 @@ pkg.generate(
test(
'kms-symbol-check',
prog_bash,
+ env : env_test,
args : [files('kms-symbol-check'), libkms]
)
diff --git a/meson.build b/meson.build
index f6b1a432..15a2b084 100644
--- a/meson.build
+++ b/meson.build
@@ -332,6 +332,9 @@ pkg.generate(
description : 'Userspace interface to kernel DRM services',
)
+env_test = environment()
+env_test.set('NM', find_program('nm').path())
+
if with_libkms
subdir('libkms')
endif
diff --git a/nouveau/meson.build b/nouveau/meson.build
index f031cd63..80a8678c 100644
--- a/nouveau/meson.build
+++ b/nouveau/meson.build
@@ -54,5 +54,6 @@ pkg.generate(
test(
'nouveau-symbol-check',
prog_bash,
+ env : env_test,
args : [files('nouveau-symbol-check'), libdrm_nouveau]
)
diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
index b265cea4..b3a24101 100755
--- a/nouveau/nouveau-symbol-check
+++ b/nouveau/nouveau-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_NOUVEAU_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/omap/meson.build b/omap/meson.build
index 1881087f..8adb2213 100644
--- a/omap/meson.build
+++ b/omap/meson.build
@@ -49,5 +49,6 @@ pkg.generate(
test(
'omap-symbol-check',
prog_bash,
+ env : env_test,
args : [files('omap-symbol-check'), libdrm_omap]
)
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
index 759c84bd..0fb4a0f2 100755
--- a/omap/omap-symbol-check
+++ b/omap/omap-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.am/libdrm_omap*HEADERS
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/radeon/meson.build b/radeon/meson.build
index b02166fe..a4171b41 100644
--- a/radeon/meson.build
+++ b/radeon/meson.build
@@ -59,5 +59,6 @@ pkg.generate(
test(
'radeon-symbol-check',
prog_bash,
+ env : env_test,
args : [files('radeon-symbol-check'), libdrm_radeon]
)
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
index 0bf2ffcb..7d79d901 100755
--- a/radeon/radeon-symbol-check
+++ b/radeon/radeon-symbol-check
@@ -3,7 +3,7 @@
# The following symbols (past the first five) are taken from the public headers.
# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_start
_edata
diff --git a/tegra/meson.build b/tegra/meson.build
index 99fdd194..7c671cd5 100644
--- a/tegra/meson.build
+++ b/tegra/meson.build
@@ -48,5 +48,6 @@ pkg.generate(
test(
'tegra-symbol-check',
prog_bash,
+ env : env_test,
args : [files('tegra-symbol-check'), libdrm_tegra]
)
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
index 420469f4..509b678c 100755
--- a/tegra/tegra-symbol-check
+++ b/tegra/tegra-symbol-check
@@ -2,7 +2,7 @@
# The following symbols (past the first nine) are taken from tegra.h.
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
+FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_end__
__bss_start__