diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-02-24 17:29:14 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-04-28 11:00:19 +0000 |
commit | c45721453334ede854bdc9e57a929a2e118b5cb0 (patch) | |
tree | 529d889846be184727eb74222bd196af96f85db2 /configure.ac | |
parent | b665cd7c344a7ae86b2dea9f8a8974725f8946ef (diff) |
Disable symbol versioning if .symver doesn't work
Change-Id: I5fcb8184f0e8f3ee95684f3d4d83410387d9cf51
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0266a364..efcd3c0b 100644 --- a/configure.ac +++ b/configure.ac @@ -376,6 +376,18 @@ AS_IF([test "x$enable_textrelcheck" != "xno"], AC_ARG_ENABLE([symbol-versioning], AS_HELP_STRING([--disable-symbol-versioning], [Disable symbol versioning in shared objects])) + +AC_CACHE_CHECK([whether symbol versioning is supported], ac_cv_symbol_versioning, [dnl +AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl +#define NEW_VERSION(name, version) \ + asm (".symver " #name "," #name "@@@" #version); +int foo(int x) { return x + 1; } +NEW_VERSION (foo, ELFUTILS_12.12) +])], ac_cv_symbol_versioning=yes, ac_cv_symbol_versioning=no)]) +if test "$ac_cv_symbol_versioning" = "no"; then + enable_symbol_versioning=no +fi + AM_CONDITIONAL(SYMBOL_VERSIONING, [test "x$enable_symbol_versioning" != "xno"]) AS_IF([test "x$enable_symbol_versioning" = "xno"], [AC_MSG_WARN([Disabling symbol versioning breaks ABI compatibility.]) |