File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,7 @@ cp libbar.so "${SCRATCH}"/
1111
1212cd " ${SCRATCH} "
1313
14- # QEMU & ldd are not playing well together in certain cases
15- CHECK_QEMU=0
16- libcldd=$( ldd ./simple | awk ' / => / { print $3 }' | grep -E " (libc(-[0-9.]*)*.so|ld-musl)" ) || CHECK_QEMU=1
17- if [ " ${CHECK_QEMU} " -ne 0 ]; then
18- if [ -f /lib64/libc.so.6 ] && grep qemu /proc/1/cmdline > /dev/null 2>&1 ; then
19- libcldd=/lib64/libc.so.6
20- else
21- echo " ldd ./simple failed"
22- exit 1
23- fi
24- fi
14+ libcldd=$( ldd ./simple | awk ' / => / { print $3 }' | grep -E " (libc(-[0-9.]*)*.so|ld-musl)" )
2515
2616# We have to set the soname on these libraries
2717${PATCHELF} --set-soname libbar.so ./libbar.so
Original file line number Diff line number Diff line change @@ -6,12 +6,7 @@ SCRATCH=scratch/$(basename "$0" .sh)
66oldInterpreter=$( ../src/patchelf --print-interpreter ./simple)
77echo " current interpreter is $oldInterpreter "
88
9- RUN_EXPLICIT_INTERPRETER=0
10- if [ " $( uname) " = Linux ] && ! grep qemu /proc/1/cmdline > /dev/null 2>&1 ; then # QEMU & ldd/ld.so are not playing well together in certain cases
11- RUN_EXPLICIT_INTERPRETER=1
12- fi
13-
14- if [ " ${RUN_EXPLICIT_INTERPRETER} " -ne 0 ]; then
9+ if test " $( uname) " = Linux; then
1510 echo " running with explicit interpreter..."
1611 " $oldInterpreter " ./simple
1712fi
@@ -33,7 +28,7 @@ echo "running with new interpreter..."
3328ln -s " $oldInterpreter " " $newInterpreter "
3429" ${SCRATCH} " /simple
3530
36- if [ " ${RUN_EXPLICIT_INTERPRETER} " -ne 0 ] ; then
31+ if test " $( uname ) " = Linux ; then
3732 echo " running with explicit interpreter..."
3833 " $oldInterpreter " " ${SCRATCH} /simple"
3934fi
You can’t perform that action at this time.
0 commit comments