(unknown)

Romain Geissler <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <CAF+LTecJ=HEQF6_8JxR3TK9zQvf6-u0ptYTMQebdeQWgTrqurw@mail.gmail.com>
Hi,

I am hitting some issues when trying to build a project with
CLFAGS="-flto -ffat-lto-objects" (to generate objects with both LTO
information and regular code), but without using LTO at link time
(because I don't want to use just now, but I want to still allow me to
use it later). For that I link with LDFLAGS="-fno-lto".

However libtool doesn't pass this "-fno-lto" to the linker. This patch
fixes this. (I hope gmail.com will not transform my attachment as
base64 attachment, sorry for the inconvenience if it happens...).

Cheers,
Romain
0001-Allow-linking-with-fno-lto.patch (application/octet-stream, 1.6 KB)
From 108c3e1bd70f5226d6a2bfadc0b8e4d837e38623 Mon Sep 17 00:00:00 2001
From: Romain Geissler <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.