diff options
author | Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de> | 2024-03-13 13:07:13 +0100 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2024-03-15 17:30:50 +0200 |
commit | 096bc0e3f8fb4bfc4d2f3f64a7f219401ffb4c31 (patch) | |
tree | d1a6d0140dddc4fef50ce4ecf125fbcd47e5de9b /src/liblzma/delta/delta_decoder.c | |
parent | CMake: Disable symbol versioning on non-glibc Linux. (diff) | |
download | xz-096bc0e3f8fb4bfc4d2f3f64a7f219401ffb4c31.tar.xz |
liblzma: Fix building with NVHPC (NVIDIA HPC SDK).
NVHPC compiler has several issues that make it impossible to
build liblzma:
- the compiler cannot handle unions that contain pointers that
are not the first members;
- the compiler cannot handle the assembler code in range_decoder.h
(LZMA_RANGE_DECODER_CONFIG has to be set to zero);
- the compiler fails to produce valid code for delta_decode if the
vectorization is enabled, which results in failed tests.
This introduces NVHPC-specific workarounds that address the issues.
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/delta/delta_decoder.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/liblzma/delta/delta_decoder.c b/src/liblzma/delta/delta_decoder.c index 10d53687..142fe6de 100644 --- a/src/liblzma/delta/delta_decoder.c +++ b/src/liblzma/delta/delta_decoder.c @@ -25,6 +25,9 @@ decode_buffer(lzma_delta_coder *coder, uint8_t *buffer, size_t size) } +#ifdef __NVCOMPILER +# pragma routine novector +#endif static lzma_ret delta_decode(void *coder_ptr, const lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, |