diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2023-02-17 20:48:28 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2023-03-11 21:45:26 +0200 |
commit | 3cc8ece2dcd7bd60835b4a7b0619254d9f75e164 (patch) | |
tree | 11b06ccd9eae8f27ef5c5f5353f3f781b3112a61 /src/common/tuklib_mbstr.h | |
parent | liblzma: Fix documentation for LZMA_MEMLIMIT_ERROR. (diff) | |
download | xz-3cc8ece2dcd7bd60835b4a7b0619254d9f75e164.tar.xz |
Build: Use only the generic symbol versioning on MicroBlaze.
On MicroBlaze, GCC 12 is broken in sense that
__has_attribute(__symver__) returns true but it still doesn't
support the __symver__ attribute even though the platform is ELF
and symbol versioning is supported if using the traditional
__asm__(".symver ...") method. Avoiding the traditional method is
good because it breaks LTO (-flto) builds with GCC.
See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
For now the only extra symbols in liblzma_linux.map are the
compatibility symbols with the patch that spread from RHEL/CentOS 7.
These require the use of __symver__ attribute or __asm__(".symver ...")
in the C code. Compatibility with the patch from CentOS 7 doesn't
seem valuable on MicroBlaze so use liblzma_generic.map on MicroBlaze
instead. It doesn't require anything special in the C code and thus
no LTO issues either.
An alternative would be to detect support for __symver__
attribute in configure.ac and CMakeLists.txt and fall back
to __asm__(".symver ...") but then LTO would be silently broken
on MicroBlaze. It sounds likely that MicroBlaze is a special
case so let's treat it as a such because that is simpler. If
a similar issue exists on some other platform too then hopefully
someone will report it and this can be reconsidered.
(This doesn't do the same fix in CMakeLists.txt. Perhaps it should
but perhaps CMake build of liblzma doesn't matter much on MicroBlaze.
The problem breaks the build so it's easy to notice and can be fixed
later.)
Thanks to Vincent Fazio for reporting the problem and proposing
a patch (in the end that solution wasn't used):
https://github.com/tukaani-project/xz/pull/32
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions