diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 349f7aa9..e54372ca 100755 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -37,6 +37,12 @@ endif(BUILD_tests) include(ConfigureChecks.cmake) +set(EXTRA_LINK_AND_COMPILE_FLAGS "-fno-strict-aliasing") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") + include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib) if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996) diff --git a/expat/Changes b/expat/Changes index 82910b47..a22b0de7 100644 --- a/expat/Changes +++ b/expat/Changes @@ -5,12 +5,14 @@ Release ?????????? longer tag names Other changes: + #538 Start using -fno-strict-aliasing #540 Support compilation against cloudlibc of CloudABI Special thanks to: Andy Wang Ed Schouten Karl Waclawek + Pascal Cuoq Release 2.2.0 Tue June 21 2016 Security fixes: diff --git a/expat/configure.ac b/expat/configure.ac index a06c3e49..71a2520a 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -80,6 +80,10 @@ if test "$GCC" = yes ; then if test "x$CXXFLAGS" = x ; then CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'` fi + + CFLAGS="${CFLAGS} -fno-strict-aliasing" + CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + LDFLAGS="${LDFLAGS} -fno-strict-aliasing" fi dnl Checks for header files.