diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-08-18 15:50:42 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2017-08-18 23:16:00 +0200 |
commit | 4a3330a918c3647c9d5c9211410628b872d7a194 (patch) | |
tree | 9c4a16464c26e834dc30bdbb172b45c2336a0ffe /configure.ac | |
parent | a5ea080ce52aac1cdcd447d30091a572c489dcd9 (diff) | |
download | elfutils-4a3330a918c3647c9d5c9211410628b872d7a194.tar.gz |
Detect if symbol versioning is supported
If not, throw an error unless symbol versioning was explicitly
disabled.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c4fc7e3d..fb18dfc8 100644 --- a/configure.ac +++ b/configure.ac @@ -373,6 +373,21 @@ 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 + if test "x$enable_symbol_versioning" != "xno"; then + AC_MSG_ERROR([Symbol versioning is not supported. + Use --disable-symbol-versioning to build without.]) + fi +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.]) |