Skip to content
Snippets Groups Projects
Commit a2df4a3f authored by Brad King's avatar Brad King
Browse files

liblzma: Disable XL compiler optimizations altogether

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.
parent 82c51a8a
No related branches found
No related tags found
No related merge requests found
......@@ -211,4 +211,10 @@ ENDIF()
ADD_LIBRARY(cmliblzma ${LZMA_SRCS})
IF(CMAKE_C_COMPILER_ID STREQUAL "XL")
# Disable the XL compiler optimizer because it causes crashes
# and other bad behavior in liblzma code.
SET_PROPERTY(TARGET cmliblzma PROPERTY COMPILE_FLAGS "-qnooptimize")
ENDIF()
INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmliblzma)
......@@ -8,9 +8,6 @@
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#if defined(__IBMC__)
# pragma options optimize=0
#endif
#include "lzma_encoder_private.h"
#include "fastpos.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment