changeset 595:82aa83f09264

- test/dynload_plain build fixes: * erroneously used zero based loop in awk which is one based * missed embedded makefile changes
author Tassilo Philipp
date Tue, 20 Sep 2022 10:29:23 +0200
parents 0bb9c03ff617
children 1586812f8eed
files test/dynload_plain/Makefile.embedded test/dynload_plain/Makefile.generic
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/dynload_plain/Makefile.embedded	Tue Sep 20 10:20:32 2022 +0200
+++ b/test/dynload_plain/Makefile.embedded	Tue Sep 20 10:29:23 2022 +0200
@@ -13,7 +13,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=1;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}
 
 .PHONY: all clean
--- a/test/dynload_plain/Makefile.generic	Tue Sep 20 10:20:32 2022 +0200
+++ b/test/dynload_plain/Makefile.generic	Tue Sep 20 10:29:23 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} | 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`; \
+	export X=`((ldd ${TEST_C_LD} | awk '/libc\.so/{for(i=1;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