[test] Use 'otool -L' where ldd doesn't exist (macOS) (#732)
This commit is contained in:
parent
2ec7dd1f6c
commit
55cae0d72e
|
@ -9,10 +9,15 @@ stat=0
|
||||||
|
|
||||||
|
|
||||||
if which ldd 2>/dev/null >/dev/null; then
|
if which ldd 2>/dev/null >/dev/null; then
|
||||||
:
|
LDD=ldd
|
||||||
else
|
else
|
||||||
echo "check-libstdc++.sh: 'ldd' not found; skipping test"
|
# macOS specific tool
|
||||||
exit 77
|
if which otool 2>/dev/null >/dev/null; then
|
||||||
|
LDD="otool -L"
|
||||||
|
else
|
||||||
|
echo "check-libstdc++.sh: 'ldd' not found; skipping test"
|
||||||
|
exit 77
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tested=false
|
tested=false
|
||||||
|
@ -21,7 +26,7 @@ for suffix in so dylib; do
|
||||||
if ! test -f "$so"; then continue; fi
|
if ! test -f "$so"; then continue; fi
|
||||||
|
|
||||||
echo "Checking that we are not linking to libstdc++ or libc++"
|
echo "Checking that we are not linking to libstdc++ or libc++"
|
||||||
if ldd $so | grep 'libstdc[+][+]\|libc[+][+]'; then
|
if $LDD $so | grep 'libstdc[+][+]\|libc[+][+]'; then
|
||||||
echo "Ouch, linked to libstdc++ or libc++"
|
echo "Ouch, linked to libstdc++ or libc++"
|
||||||
stat=1
|
stat=1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue