[Mesa-dev] [PATCH mesa 03/11] gbm: fail symbol check if lib is missing
Eric Engestrom
eric.engestrom at imgtec.com
Tue Oct 31 11:20:00 UTC 2017
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
src/gbm/gbm-symbols-check | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check
index 2444131e990228513d8f..cf57a08d5728cfff480c 100755
--- a/src/gbm/gbm-symbols-check
+++ b/src/gbm/gbm-symbols-check
@@ -1,6 +1,15 @@
#!/bin/sh
+set -eu
-FUNCS=$(nm -D --defined-only ${1-.libs/libgbm.so} | grep -o "T .*" | cut -c 3- | while read func; do
+LIB=${1-.libs/libgbm.so}
+
+if ! [ -f "$LIB" ]
+then
+ exit 1
+fi
+
+
+FUNCS=$(nm -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
gbm_device_get_fd
gbm_device_get_backend_name
--
Cheers,
Eric
More information about the mesa-dev
mailing list