mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-06-03 08:10:50 +00:00
Use POSIX constructs in the DUMA wrapper installed on the target.
/trunk/scripts/build/debug/duma.in | 13 12 1 0 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
This commit is contained in:
parent
e2568395a4
commit
709299f291
@ -13,7 +13,18 @@ case "$1" in
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-off)
|
-off)
|
||||||
LD_PRELOAD="${LD_PRELOAD//${LIBDUMA_SO}/}"
|
# We use a suposedly POSIX-compliant shell: /bin/sh
|
||||||
|
# -> we can't use "${LD_PRELOAD//${LIBDUMA_SO}/}", it's not POSIX
|
||||||
|
# We don't know if sed will be present on the target
|
||||||
|
# -> we can't use $(echo "${LD_PRELOAD}" |sed -r -e "s|${LIBDUMA_SO}||;")
|
||||||
|
# So, iterate through LD_PRELOAD, and keep only those libs that
|
||||||
|
# are not "${LIBDUMA_SO}"
|
||||||
|
old_LD_PRELOAD="${LD_PRELOAD}"
|
||||||
|
LD_PRELOAD=
|
||||||
|
for lib in ${old_LD_PRELOAD}; do
|
||||||
|
[ "${lib}" = "${LIBDUMA_SO}" ] || LD_PRELOAD="${LD_PRELOAD} ${lib}"
|
||||||
|
done
|
||||||
|
unset old_LD_PRELOAD
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-show)
|
-show)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user