From cfe6e85eb6814387d0e32d46653f098672f8a01f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 22 Dec 2016 17:50:57 +0100 Subject: [PATCH] build system: don't use -fipa-icf optimization on i686 mingw target The result are segfaulting executables. --- ac/debugging_profiling.m4 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ac/debugging_profiling.m4 b/ac/debugging_profiling.m4 index 61fd4b8f1..ab1ca4bca 100644 --- a/ac/debugging_profiling.m4 +++ b/ac/debugging_profiling.m4 @@ -36,18 +36,17 @@ fi if test x"$enable_optimization" = xyes; then if test x"$ac_cv_compiler_is_clang" = xyes; then opt_features_no="$opt_features_no\n * full optimization: due to bug 11962 in LLVM/clang only -O1 will be used for optimization" - opt_features_yes="$opt_features_yes\n * compiler optimizations (-O1)" OPTIMIZATION_CFLAGS="-O1" elif test "x$ac_cv_mingw32" = "xyes" -a "x$MINGW_PROCESSOR_ARCH" = "xx86" && check_version 5.1.0 $ac_cv_gcc_version; then - OPTIMIZATION_CFLAGS="-O2" - opt_features_no="$opt_features_no\n * full optimization: due to an issue in mingw g++ only -O2 will be used for optimization" - opt_features_yes="$opt_features_yes\n * compiler optimizations (-O2)" + OPTIMIZATION_CFLAGS="-O2 -fno-ipa-icf" + opt_features_no="$opt_features_no\n * full optimization: due to an issue in mingw g++ full optimization cannot be used" else OPTIMIZATION_CFLAGS="-O3" - opt_features_yes="$opt_features_yes\n * compiler optimizations (-O3)" fi + + opt_features_yes="$opt_features_yes\n * compiler optimizations ($OPTIMIZATION_CFLAGS)" else opt_features_no="$opt_features_no\n * compiler optimizations" fi