From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Evan Klitzke Newsgroups: gmane.emacs.devel Subject: [PATCH 1/1] Stop using legacy -ffat-lto-objects flag Date: Sun, 08 Nov 2020 12:05:28 -0800 Message-ID: <878sbby5pz.fsf@eklitzke.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3008"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 28.0.50 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 08 21:22:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbrCV-0000bS-UO for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Nov 2020 21:22:11 +0100 Original-Received: from localhost ([::1]:41142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbrCU-0004DT-W1 for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Nov 2020 15:22:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbrBG-0003Jm-AK for emacs-devel@gnu.org; Sun, 08 Nov 2020 15:20:54 -0500 Original-Received: from outmail148114.authsmtp.net ([62.13.148.114]:47488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbrB6-0005lL-Mh for emacs-devel@gnu.org; Sun, 08 Nov 2020 15:20:53 -0500 Original-Received: from punt20.authsmtp.com (punt20.authsmtp.com [62.13.128.164]) by punt17.authsmtp.com. (8.15.2/8.15.2) with ESMTP id 0A8K5WJx015693 for ; Sun, 8 Nov 2020 20:05:32 GMT (envelope-from evan@eklitzke.org) Original-Received: from mail-c233.authsmtp.com (mail-c233.authsmtp.com [62.13.128.233]) by punt20.authsmtp.com. (8.15.2/8.15.2) with ESMTP id 0A8K5VEh035496 for ; Sun, 8 Nov 2020 20:05:31 GMT (envelope-from evan@eklitzke.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eklitzke.org; s=authsmtp; t=1604865931; bh=rLqeW8Pwc+bfDXYa7pCijslE5IEtqtoyDpClGBVF4KY=; h=Date:From:To:Subject; b=XLPV4F+jBkDeW/7R+5P5XgrbpMv56oIQJXejhmznDnpCBbJaPQU/RBgMQlyim0BUH eHh71+bdmJJEptonvV7bAMf3dRmYprr6LAAPQR+tI67JkAJZHNSRHd8sTjHXMZx6Oe vqNR3O0lSPMMcBHlL/7tYIBVs6hPhnsimLoVC9DQ= Original-Received: from bitcoin (157-131-168-118.fiber.dynamic.sonic.net [157.131.168.118]) (authenticated bits=0) by mail.authsmtp.com (8.15.2/8.15.2) with ESMTPSA id 0A8K5TA1063323 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 8 Nov 2020 20:05:30 GMT (envelope-from evan@eklitzke.org) X-Server-Quench: c0ff08b0-21fd-11eb-80b5-84349711df28 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd0ZA8UC1ZYUg0c Ii4HCC5cWwYoYBpW DgkOKAJROx8FWBpc Nm5VKEcVN0cTUwkJ HBhUHUtWUF9xSWF1 YQpUZwZcLEtLWBtr U0lXQ1RaCgRpCQMD AxwbTRg8d3ROA3sU FEdiWHNYXkc0d0B7 RQAHFTtQZW8yaH0d URYMagJVJVFXdh8X b013UHAJaGIGZy42 RV8lDAgYAR5/YH0S GzRFFk4VWQ4WBT86 SFgGEDomFlxNAis9 JgBjLkIbWUEbMEg5 LUBpV1YRPHcn X-Authentic-SMTP: 61633734373138.1021:7600 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Received-SPF: pass client-ip=62.13.148.114; envelope-from=evan@eklitzke.org; helo=outmail148114.authsmtp.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/08 15:05:32 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258925 Archived-At: --=-=-= Content-Type: text/plain; format=flowed 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Stop-using-legacy-ffat-lto-objects-option-in-LTO-bui.patch Content-Description: stop using -ffat-lto-objects flag >From b04dec1d217a82985e5d8e47fc2c305900ae68d7 Mon Sep 17 00:00:00 2001 From: Evan Klitzke 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 --=-=-= Content-Type: text/plain; format=flowed -- Evan Klitzke pgp: 0x157EFCACBC648422 e: evan@eklitzke.org w: https://eklitzke.org --=-=-=--