From 6af493ba4615e48056d40743298be935e49893d2 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 10 Dec 2014 13:53:13 +1100 Subject: [PATCH] build: disable LTO for MinGW Avoids a probably compiler error whereby LTO static libraries cannot be linked to applications. --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 03a8f234..2e77a76d 100644 --- a/configure.ac +++ b/configure.ac @@ -176,10 +176,12 @@ AS_IF([test "x$enable_debugging" = "xyes"], [ AX_APPEND_COMPILE_FLAGS([-O0], [], [-Werror]) ], [ AX_APPEND_COMPILE_FLAGS([-O2], [], [-Werror]) - AX_APPEND_COMPILE_FLAGS([-flto], [], [-Werror]) - AX_APPEND_COMPILE_FLAGS([-flto-partition=none], [], [-Werror]) - AX_APPEND_LINK_FLAGS([-fuse-linker-plugin], [], [-Werror]) + # mingw LTO support currently appears to be broken + AS_IF([test x"${host_os}" != x"mingw32"], [ + AX_APPEND_COMPILE_FLAGS([-flto]) + AX_APPEND_LINK_FLAGS([-fuse-linker-plugin], [], [-Werror]) + ]) ]) AS_CASE([$host_os],