Initialize Tizen 2.3
[external/prelink.git] / testsuite / functions.sh
1 #!/bin/bash
2 CC="${CC:-gcc} ${LINKOPTS}"
3 CCLINK=${CCLINK:-${CC} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
4 CXX="${CXX:-g++} ${LINKOPTS}"
5 CXXLINK=${CXXLINK:-${CXX} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
6 PRELINK=${PRELINK:-../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`}
7 srcdir=${srcdir:-`dirname $0`}
8 savelibs() {
9   for i in $LIBS $BINS; do cp -p $i $i.orig; done
10 }
11 comparelibs() {
12   for i in $LIBS $BINS; do
13     cp -p $i $i.new
14     echo $PRELINK -u $i.new
15     $PRELINK -u $i.new || exit
16     cmp -s $i.orig $i.new || exit
17     rm -f $i.new
18     echo $PRELINK -y $i \> $i.new
19     $PRELINK -y $i > $i.new || exit
20     cmp -s $i.orig $i.new || exit
21     rm -f $i.new
22   done
23 }