summaryrefslogtreecommitdiff
path: root/tests/soname
blob: ccc75f616fe7015512d96e16932baad20768bd19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e

srcdir=${srcdir:-.}
top_builddir=${top_builddir:-.}
build_triplet=${build_triplet:-.}
host_triplet=${host_triplet:-.}


if [ "${build_triplet}" != "${host_triplet}" ]; then
	echo "cross-compiling, not running soname check." 2>&1
	exit 77
fi
if ! echo "${build_triplet}" | grep linux > /dev/null ; then
	exit 77
fi
if ! [ -x "$(command -v objdump)" ]; then
	echo "objdump not available" 1>&2
	exit 77
fi

newsoname=$(objdump -p ${top_builddir}/lib/.libs/libtasn1.so | sed -n '/^ *SONAME /s/^ *SONAME *//p')

[ "${newsoname}" = "libtasn1.so.6" ]