From 108c3e1bd70f5226d6a2bfadc0b8e4d837e38623 Mon Sep 17 00:00:00 2001
From: Romain Geissler <romain.geissler@gmail.com>
Date: Tue, 27 Feb 2018 00:27:24 +0100
Subject: [PATCH] Allow linking with -fno-lto.

---
 build-aux/ltmain.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index bbc76433..7b20c48a 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5375,15 +5375,16 @@ func_mode_link ()
       # @file                GCC response files
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
-      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin,
+      # -fno-lto             GCC link-time optimization
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
       # -fuse-ld=*           Linker select flags for GCC
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*|-fuse-ld=*)
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fno-lto|-fstack-protector*| \
+      -stdlib=*|-specs=*|-fsanitize=*|-fuse-ld=*)
         func_quote_arg pretty "$arg"
 	arg=$func_quote_arg_result
         func_append compile_command " $arg"
-- 
2.13.0

