diff options
Diffstat (limited to 'libctf/configure')
-rwxr-xr-x | libctf/configure | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/libctf/configure b/libctf/configure index 778c141..1faadef 100755 --- a/libctf/configure +++ b/libctf/configure @@ -16952,7 +16952,10 @@ fi # Use a version script, if possible, or an -export-symbols-regex otherwise. +# First figure out the version script flag: then massage the script, if +# needed. decommented_version_script= +no_version_script= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker versioning flags" >&5 $as_echo_n "checking for linker versioning flags... " >&6; } if ${ac_cv_libctf_version_script+:} false; then : @@ -16969,7 +16972,7 @@ int ctf_foo (void) { return 0; } int main (void) { return ctf_foo(); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_libctf_version_script="-Wl,--version-script='$srcdir/libctf.ver'" + ac_cv_libctf_version_script="-Wl,--version-script" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -16994,22 +16997,30 @@ rm -f core conftest.err conftest.$ac_objext \ if test -z "$ac_cv_libctf_version_script"; then ac_cv_libctf_version_script='-export-symbols-regex ctf_.*' + no_version_script=t fi rm -f conftest.ver fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libctf_version_script" >&5 $as_echo "$ac_cv_libctf_version_script" >&6; } + +# Ensure that no symbols exist in the version script for libctf-nobfd.so +# that do not exist in the shared library itself, since some linkers (Solaris) +# add such symbols with type NOTYPE, and others (LLVM) complain loudly +# and fail to link. +grep -v 'libctf only' $srcdir/libctf.ver > libctf-nobfd.ver + if test -n "$decommented_version_script"; then # Solaris's version scripts use shell-style comments rather than the C-style # used by GNU ld. Use cpp to strip the comments out. (cpp exists under this # name on all platforms that support ld -z gnu-version-script.) - # Also ensure that no symbols exist in the version script for libctf-nobfd.so - # that do not exist in the shared library itself, since some linkers add such - # symbols with type NOTYPE. /lib/cpp < $srcdir/libctf.ver > libctf-decommented.ver - grep -v 'libctf only' $srcdir/libctf.ver | /lib/cpp > libctf-nobfd-decommented.ver + /lib/cpp < $srcdir/libctf-nobfd.ver > libctf-nobfd-decommented.ver VERSION_FLAGS="$ac_cv_libctf_version_script='libctf-decommented.ver'" VERSION_FLAGS_NOBFD="$ac_cv_libctf_version_script='libctf-nobfd-decommented.ver'" +elif test -z "$no_version_script"; then + VERSION_FLAGS="$ac_cv_libctf_version_script='$srcdir/libctf.ver'" + VERSION_FLAGS_NOBFD="$ac_cv_libctf_version_script='libctf-nobfd.ver'" else VERSION_FLAGS="$ac_cv_libctf_version_script" VERSION_FLAGS_NOBFD="$ac_cv_libctf_version_script" |