diff options
Diffstat (limited to 'trunk/testsuite/functions.sh')
-rwxr-xr-x | trunk/testsuite/functions.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/trunk/testsuite/functions.sh b/trunk/testsuite/functions.sh new file mode 100755 index 0000000..c351fd1 --- /dev/null +++ b/trunk/testsuite/functions.sh @@ -0,0 +1,26 @@ +#!/bin/bash +CC="${CC:-gcc} ${LINKOPTS}" +CCLINK=${CCLINK:-${CC} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`} +CXX="${CXX:-g++} ${LINKOPTS}" +CXXLINK=${CXXLINK:-${CXX} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`} +PRELINK=${PRELINK:-../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`} +LDD=${LDD:-../src/prelink-rtld} +STRIP=${STRIP:-strip} +HOST_CC=${HOST_CC:-$CC} +srcdir=${srcdir:-`dirname $0`} +savelibs() { + for i in $LIBS $BINS; do cp -p $i $i.orig; done +} +comparelibs() { + for i in $LIBS $BINS; do + cp -p $i $i.new + echo $PRELINK -u $i.new + $PRELINK -u $i.new || exit + cmp -s $i.orig $i.new || exit + rm -f $i.new + echo $PRELINK -y $i \> $i.new + $PRELINK -y $i > $i.new || exit + cmp -s $i.orig $i.new || exit + rm -f $i.new + done +} |