mirror of https://git.tukaani.org/xz.git
Build: Let the users override the symbol versioning variant.
There are cases when the users want to decide themselves whether they want to have the generic (even on GNU/Linux) or the linux (even if we do not recommend that) symbol versioning variant. The former might be needed to circumvent compiler issues (i.e. the compiler does not support all features that are required for the linux versioning), the latter might help in overriding the assumptions made in the configure script. (This commit was contributed under 0BSD but the author confirmed that it is fine to backport it to the public domain branches. See https://github.com/tukaani-project/xz/pull/90#issuecomment-2100185936 and the next two messages.) (cherry picked from commitf56ed6fac6
) (cherry picked from commitce3a9fa94d
)
This commit is contained in:
parent
be29fac96d
commit
2dbc0fc5c2
21
configure.ac
21
configure.ac
|
@ -667,6 +667,7 @@ elif test "x$enable_shared" = xno ; then
|
||||||
enable_symbol_versions=no
|
enable_symbol_versions=no
|
||||||
AC_MSG_RESULT([no (not building a shared library)])
|
AC_MSG_RESULT([no (not building a shared library)])
|
||||||
else
|
else
|
||||||
|
if test "x$enable_symbol_versions" = xyes ; then
|
||||||
case "$host_cpu-$host_os" in
|
case "$host_cpu-$host_os" in
|
||||||
microblaze*)
|
microblaze*)
|
||||||
# GCC 12 on MicroBlaze doesn't support __symver__
|
# GCC 12 on MicroBlaze doesn't support __symver__
|
||||||
|
@ -677,6 +678,15 @@ else
|
||||||
enable_symbol_versions=generic
|
enable_symbol_versions=generic
|
||||||
;;
|
;;
|
||||||
*-linux*)
|
*-linux*)
|
||||||
|
enable_symbol_versions=linux
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
enable_symbol_versions=generic
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_symbol_versions" = xlinux ; then
|
||||||
case "$pic_mode-$enable_static" in
|
case "$pic_mode-$enable_static" in
|
||||||
default-*)
|
default-*)
|
||||||
# Use symvers if PIC is defined.
|
# Use symvers if PIC is defined.
|
||||||
|
@ -697,7 +707,6 @@ else
|
||||||
possibly picking only src/liblzma/.libs/liblzma.a from the static build.])
|
possibly picking only src/liblzma/.libs/liblzma.a from the static build.])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
enable_symbol_versions=linux
|
|
||||||
AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX],
|
AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX],
|
||||||
[$have_symbol_versions_linux],
|
[$have_symbol_versions_linux],
|
||||||
[Define to 1 to if GNU/Linux-specific details
|
[Define to 1 to if GNU/Linux-specific details
|
||||||
|
@ -708,11 +717,11 @@ else
|
||||||
time with Libtool if neither --with-pic nor
|
time with Libtool if neither --with-pic nor
|
||||||
--without-pic is used). This define must be
|
--without-pic is used). This define must be
|
||||||
used together with liblzma_linux.map.])
|
used together with liblzma_linux.map.])
|
||||||
;;
|
elif test "x$enable_symbol_versions" != xgeneric ; then
|
||||||
*)
|
AC_MSG_RESULT([])
|
||||||
enable_symbol_versions=generic
|
AC_MSG_ERROR(
|
||||||
;;
|
[unknown symbol versioning variant '$enable_symbol_versions'])
|
||||||
esac
|
fi
|
||||||
AC_MSG_RESULT([yes ($enable_symbol_versions)])
|
AC_MSG_RESULT([yes ($enable_symbol_versions)])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue