Revert commit 82c51a8a (liblzma: Disable XL compiler optimizations in
one source to avoid crash, 2015-04-02) and instead add a compiler flag
to disable optimizations in every source of liblzma. Somehow the XL
compiler optimizations create incorrect behavior in liblzma and lead
to crashes or truncated output during compression.
Somehow optimizations of lzma_lzma_optimum_normal by the IBM XL C
compiler cause it to crash. Simply disable optimizations of this source
file with a pragma.
Any "#define restrict ..." line may conflict with MSVC header files
that use "__declspec(restrict)". Define our own LZMA_RESTRICT macro
in "Utilities/cmliblzma/config.h.in" and transform liblzma code to
use it:
git grep -lE '\<restrict\>' Utilities/cmliblzma/liblzma |
xargs sed -i 's/\<restrict\>/LZMA_RESTRICT/g'