liblzma: Disable XL compiler optimizations

Somehow the XL compiler optimizations create incorrect behavior in
liblzma and lead to crashes or truncated output during compression.
This commit is contained in:
Brad King 2015-04-02 13:16:23 -04:00
parent af61d6cb60
commit d8126d3784

View File

@ -211,4 +211,10 @@ ENDIF()
ADD_LIBRARY(cmliblzma ${LZMA_SRCS}) 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) INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmliblzma)