add libasan to the LD_PRELOAD path if it was in gnunet-config
This commit is contained in:
parent
13707999f1
commit
f552d0c8fb
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
if ! type gnunet-config >/dev/null; then
|
||||
echo "$0 needs gnunet-config to be installed"
|
||||
exit 1
|
||||
@ -8,5 +10,8 @@ fi
|
||||
# FIXME: not very portable ...
|
||||
# FIXME: should use "libdir" instead of prefix/lib, but somehow
|
||||
# the recursive expansion does not work ;-(.
|
||||
export LD_PRELOAD=@prefix@/lib/libtalerutil.so
|
||||
GC=`which gnunet-config`
|
||||
ASAN=""
|
||||
A=`ldd $GC | grep libasan` && ASAN=`echo $A | awk '{print $3 ":"}'`
|
||||
export LD_PRELOAD=${ASAN}${LD_PRELOAD:-}:@prefix@/lib/libtalerutil.so
|
||||
exec gnunet-config "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user