* [PATCH 1/1] Stop using legacy -ffat-lto-objects flag
@ 2020-11-08 20:05 Evan Klitzke
2020-11-09 3:23 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Evan Klitzke @ 2020-11-08 20:05 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
Currently when Emacs is configured using the
--enable-link-time-optimization configure flag, the build will use the
-ffat-lto-objects flag if the host compiler is GCC (but not Clang).
According to the comments in configure.ac this is to work around an
issue with LTO builds in GCC 4.9.0. This flag makes builds take much
longer (and produces much larger object files), so I suggest removing it
as GCC 4.x is quite old at this point and doesn't have great LTO support
anyway.
Patch to remove this logic from configure.ac is attached inline below
(generated using git format-patch). I agree to copyright assignment of
this change to the FSF.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: stop using -ffat-lto-objects flag --]
[-- Type: text/x-patch, Size: 1279 bytes --]
From b04dec1d217a82985e5d8e47fc2c305900ae68d7 Mon Sep 17 00:00:00 2001
From: Evan Klitzke <evan@eklitzke.org>
Date: Sun, 8 Nov 2020 11:46:30 -0800
Subject: [PATCH] Stop using legacy -ffat-lto-objects option in LTO builds
This change stops using the -ffat-lto-objects flag with GCC for builds
that use --enable-link-time-optimization. This option was originally
added to support GCC 4.9 which is very old, and makes compiling LTO
builds on modern versions of GCC significantly slower.
---
configure.ac | 7 -------
1 file changed, 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index f0c8e5210f..71a931da9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1171,13 +1171,6 @@ AC_DEFUN
# command, so plugin name is appended to ARFLAGS.
ARFLAGS="cru --plugin $GOLD_PLUGIN"
RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
- else
- dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes
- dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
- dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
- dnl dump core on Fedora 20, so play it safe for now.
- gl_COMPILER_OPTION_IF([-ffat-lto-objects],
- [CFLAGS="$CFLAGS -ffat-lto-objects"])
fi
fi
fi)
--
2.28.0
[-- Attachment #3: Type: text/plain, Size: 120 bytes --]
--
Evan Klitzke pgp: 0x157EFCACBC648422
e: evan@eklitzke.org w: https://eklitzke.org
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Stop using legacy -ffat-lto-objects flag
2020-11-08 20:05 [PATCH 1/1] Stop using legacy -ffat-lto-objects flag Evan Klitzke
@ 2020-11-09 3:23 ` Eli Zaretskii
2020-11-09 8:57 ` Andrea Corallo via Emacs development discussions.
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2020-11-09 3:23 UTC (permalink / raw)
To: Evan Klitzke; +Cc: emacs-devel
> From: Evan Klitzke <evan@eklitzke.org>
> Date: Sun, 08 Nov 2020 12:05:28 -0800
>
> Currently when Emacs is configured using the
> --enable-link-time-optimization configure flag, the build will use the
> -ffat-lto-objects flag if the host compiler is GCC (but not Clang).
> According to the comments in configure.ac this is to work around an
> issue with LTO builds in GCC 4.9.0. This flag makes builds take much
> longer (and produces much larger object files), so I suggest removing it
> as GCC 4.x is quite old at this point and doesn't have great LTO support
> anyway.
I think this is too soon: fencepost.gnu.org, which runs Trisquel LTS,
still has GCC 4.8.4.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Stop using legacy -ffat-lto-objects flag
2020-11-09 3:23 ` Eli Zaretskii
@ 2020-11-09 8:57 ` Andrea Corallo via Emacs development discussions.
2020-11-09 15:59 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Corallo via Emacs development discussions. @ 2020-11-09 8:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Evan Klitzke, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Evan Klitzke <evan@eklitzke.org>
>> Date: Sun, 08 Nov 2020 12:05:28 -0800
>>
>> Currently when Emacs is configured using the
>> --enable-link-time-optimization configure flag, the build will use the
>> -ffat-lto-objects flag if the host compiler is GCC (but not Clang).
>> According to the comments in configure.ac this is to work around an
>> issue with LTO builds in GCC 4.9.0. This flag makes builds take much
>> longer (and produces much larger object files), so I suggest removing it
>> as GCC 4.x is quite old at this point and doesn't have great LTO support
>> anyway.
>
> I think this is too soon: fencepost.gnu.org, which runs Trisquel LTS,
> still has GCC 4.8.4.
>
> Thanks.
Couldn't we check and decide based on the GCC version? IIUC we already
do something like this using gl_GCC_VERSION_IFELSE.
Andrea
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Stop using legacy -ffat-lto-objects flag
2020-11-09 8:57 ` Andrea Corallo via Emacs development discussions.
@ 2020-11-09 15:59 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2020-11-09 15:59 UTC (permalink / raw)
To: Andrea Corallo; +Cc: evan, emacs-devel
> From: Andrea Corallo <akrl@sdf.org>
> Cc: Evan Klitzke <evan@eklitzke.org>, emacs-devel@gnu.org
> Date: Mon, 09 Nov 2020 08:57:51 +0000
>
> >> Currently when Emacs is configured using the
> >> --enable-link-time-optimization configure flag, the build will use the
> >> -ffat-lto-objects flag if the host compiler is GCC (but not Clang).
> >> According to the comments in configure.ac this is to work around an
> >> issue with LTO builds in GCC 4.9.0. This flag makes builds take much
> >> longer (and produces much larger object files), so I suggest removing it
> >> as GCC 4.x is quite old at this point and doesn't have great LTO support
> >> anyway.
> >
> > I think this is too soon: fencepost.gnu.org, which runs Trisquel LTS,
> > still has GCC 4.8.4.
> >
> > Thanks.
>
> Couldn't we check and decide based on the GCC version? IIUC we already
> do something like this using gl_GCC_VERSION_IFELSE.
That'd be fine with me, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-09 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-08 20:05 [PATCH 1/1] Stop using legacy -ffat-lto-objects flag Evan Klitzke
2020-11-09 3:23 ` Eli Zaretskii
2020-11-09 8:57 ` Andrea Corallo via Emacs development discussions.
2020-11-09 15:59 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.