changeset 609:f2f0e53d8b02

- test/dynload_plain: fix to make rule for old ksh93 versions, which segfault on nested, forked subshells
author Tassilo Philipp
date Tue, 27 Sep 2022 16:38:24 +0200
parents b1f2b574d772
children fea865cd1305
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 27 15:34:45 2022 +0200
+++ b/test/dynload_plain/Makefile.embedded	Tue Sep 27 16:38:24 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} | awk '/libc\.so/{for(i=1;i<=NF;++i){if($$i~"^/"){print $$i;++r}}}END{exit !r}' || 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;++r}}}END{exit !r}' || 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 27 15:34:45 2022 +0200
+++ b/test/dynload_plain/Makefile.generic	Tue Sep 27 16:38:24 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=1;i<=NF;++i){if($$i~"^/"){print $$i;++r}}}END{exit !r}' || 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;++r}}}END{exit !r}' || 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