Mercurial > pub > dyncall > dyncall
changeset 594:0bb9c03ff617
- test/dynload_plain: workaround for shell incompatibilities on some platforms
author | Tassilo Philipp |
---|---|
date | Tue, 20 Sep 2022 10:20:32 +0200 |
parents | 806e415df417 |
children | 82aa83f09264 |
files | test/dynload_plain/Makefile.generic |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test/dynload_plain/Makefile.generic Mon Sep 19 18:24:40 2022 +0200 +++ b/test/dynload_plain/Makefile.generic Tue Sep 20 10:20:32 2022 +0200 @@ -12,7 +12,7 @@ # deduce path to default libc.so file, easier to do via shell than in code # (see main() in dynload_plain.c); get from what ${TEST_C_LD} is linked # against, then reinvoke make with actual build - export X=`((ldd ${TEST_C_LD} | grep -o '/.*/libc.so[^ ]*' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1`; \ + export X=`((ldd ${TEST_C_LD} | awk '/libc\.so/{for(i=0;i<NF;++i){if($$i ~ "^/")print $$i}}' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1`; \ ${MAKE} DEF_C_DYLIB="$$X" ${APP} ${TEST_C_LD}: # dummy bin built with same toolchain and flags to deduce default c lib this is linked with