diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-11 18:47:19 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-11 20:27:23 +0000 |
commit | 8a6a0b43dc249acb0ad8cb9c6f16360294bcfdc3 (patch) | |
tree | 8bad2da44c69344dc808e294f9d413df31829070 /src/check-plt.sh | |
parent | 982f65081f987e2c44f05942411c031bd32fd968 (diff) |
[check] Replace compiled symbol visibility checker with shell script.
Behdad Esfahbod objected to the execution of a compiled program to check
symbol visibility as it makes cross-compilation more difficult.
Instead of executing the program, this method conditionally exports
a variable if cairo uses symbol hiding and scans the executable for
that symbol in a similar manner to check-def.sh. This has the slight
advantage of using the Makefile for performing the compilation, rather
than attempting to invoke $(CPP) from a shell script within the test
environment.
Diffstat (limited to 'src/check-plt.sh')
-rwxr-xr-x | src/check-plt.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/check-plt.sh b/src/check-plt.sh index 05cde35f..3007fb94 100755 --- a/src/check-plt.sh +++ b/src/check-plt.sh @@ -2,15 +2,17 @@ LANG=C -status=0 - -if ! ./compiler-supports-visibility; then - echo "Compiler doesn't support symbol visibility; skipping test" +if ! which readelf 2>/dev/null >/dev/null; then + echo "'readelf' not found; skipping test" exit 0 fi -if ! which readelf 2>/dev/null >/dev/null; then - echo "'readelf' not found; skipping test" +test -z "$srcdir" && srcdir=. +status=0 + +has_hidden_symbols=`cat .check-has-hidden-symbols` +if test "x$has_hidden_symbols" != "x1"; then + echo "Compiler doesn't support symbol visibility; skipping test" exit 0 fi |