From: Evan Klitzke <evan@eklitzke.org>
To: emacs-devel@gnu.org
Subject: [PATCH 1/1] Stop using legacy -ffat-lto-objects flag
Date: Sun, 08 Nov 2020 12:05:28 -0800 [thread overview]
Message-ID: <878sbby5pz.fsf@eklitzke.org> (raw)
[-- 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
next reply other threads:[~2020-11-08 20:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 20:05 Evan Klitzke [this message]
2020-11-09 3:23 ` [PATCH 1/1] Stop using legacy -ffat-lto-objects flag Eli Zaretskii
2020-11-09 8:57 ` Andrea Corallo via Emacs development discussions.
2020-11-09 15:59 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sbby5pz.fsf@eklitzke.org \
--to=evan@eklitzke.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.