From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: -znocombreloc? Date: Sat, 3 Dec 2016 21:36:49 -0800 Organization: UCLA Computer Science Department Message-ID: <2f0ed5df-5818-3d68-f52d-f73660b689d3@cs.ucla.edu> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5F0E0F0DF1341873675D210B" X-Trace: blaine.gmane.org 1480829834 22561 195.159.176.226 (4 Dec 2016 05:37:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Dec 2016 05:37:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: Daniel Colascione , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 04 06:37:06 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDPU2-0004hl-8T for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2016 06:37:06 +0100 Original-Received: from localhost ([::1]:48610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDPU5-0007GW-TR for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2016 00:37:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDPTx-0007Fv-4g for emacs-devel@gnu.org; Sun, 04 Dec 2016 00:37:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDPTs-0000cB-EX for emacs-devel@gnu.org; Sun, 04 Dec 2016 00:37:01 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35144) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cDPTs-0000bv-5H for emacs-devel@gnu.org; Sun, 04 Dec 2016 00:36:56 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 24D40160088; Sat, 3 Dec 2016 21:36:54 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id BuLyFyf29hWZ; Sat, 3 Dec 2016 21:36:50 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6815116008C; Sat, 3 Dec 2016 21:36:50 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VaXxTpEFI36p; Sat, 3 Dec 2016 21:36:50 -0800 (PST) Original-Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 46EC0160088; Sat, 3 Dec 2016 21:36:50 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210010 Archived-At: This is a multi-part message in MIME format. --------------5F0E0F0DF1341873675D210B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Daniel Colascione wrote: > Does anyone remember _why_ temacs segfaults on startup unless we give l= d this > option? It doesn't segfault for me, even when I build with -zcombreloc. I think=20 -znocombreloc worked around bugs in now-obsolete versions of the GNU link= er.=20 See, for example: https://lists.gnu.org/archive/html/bug-gnu-emacs/2004-02/msg00278.html https://lists.gnu.org/archive/html/help-gnu-emacs/2003-05/msg00627.html Looking at recent GCC documentation it appears that this old hack should = not=20 matter now, so I'm inclined to remove it, as in the proposed patch (attac= hed),=20 which I tested on Fedora 24 x86-64 but have not installed. --------------5F0E0F0DF1341873675D210B Content-Type: text/x-diff; name="0001-Remove-old-znocombreloc-hack.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Remove-old-znocombreloc-hack.patch" =46rom fe4a24b33bb72610cf6703143cf910d7eef547b6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 3 Dec 2016 21:29:06 -0800 Subject: [PATCH] Remove old -znocombreloc hack It no longer seems relevant. See the thread starting at: http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00142.html * configure.ac (LDFLAGS_NOCOMBRELOC): Remove. (LD_SWITCH_SYSTEM_TEMACS): Do not test for -znocombreloc. * etc/PROBLEMS: Update problem description. --- configure.ac | 32 -------------------------------- etc/PROBLEMS | 7 +++---- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/configure.ac b/configure.ac index 2d116de..65b963c 100644 --- a/configure.ac +++ b/configure.ac @@ -1272,36 +1272,6 @@ AC_DEFUN ac_link=3D"$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi =20 -dnl We need -znocombreloc if we're using a relatively recent GNU ld. -dnl If we can link with the flag, it shouldn't do any harm anyhow. -dnl Treat GCC specially since it just gives a non-fatal 'unrecognized op= tion' -dnl if not built to support GNU ld. - -dnl For a long time, -znocombreloc was added to LDFLAGS rather than -dnl LD_SWITCH_SYSTEM_TEMACS. That is: -dnl * inappropriate, as LDFLAGS is a user option but this is essential. -dnl Eg "make LDFLAGS=3D... all" could run into problems, -dnl http://bugs.debian.org/684788 -dnl * unnecessary, since temacs is the only thing that actually needs it= =2E -dnl Indeed this is where it was originally, prior to: -dnl http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg001= 70.html -late_LDFLAGS=3D"$LDFLAGS" -if test x$GCC =3D xyes; then - LDFLAGS_NOCOMBRELOC=3D"-Wl,-znocombreloc" -else - LDFLAGS_NOCOMBRELOC=3D"-znocombreloc" -fi - -LDFLAGS=3D"$LDFLAGS $LDFLAGS_NOCOMBRELOC" - -AC_MSG_CHECKING([for -znocombreloc]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [AC_MSG_RESULT(yes)], - LDFLAGS_NOCOMBRELOC=3D - [AC_MSG_RESULT(no)]) - -LDFLAGS=3D"$late_LDFLAGS" - AC_CACHE_CHECK([whether addresses are sanitized], [emacs_cv_sanitize_address], [AC_COMPILE_IFELSE( @@ -5176,8 +5146,6 @@ AC_DEFUN esac fi =20 -LD_SWITCH_SYSTEM_TEMACS=3D"$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS= " - AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) =20 ## Common for all window systems diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c9b11fbc5..82c727f 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -196,10 +196,9 @@ as Xming or Cygwin/X. =20 It crashes on X, but runs fine when called with option "-nw". =20 -This has been observed when Emacs is linked with GNU ld but without pass= ing -the -z nocombreloc flag. Emacs normally knows to pass the -z nocombrelo= c -flag when needed, so if you come across a situation where the flag is -necessary but missing, please report it via M-x report-emacs-bug. +This was observed when Emacs was linked with old versions of GNU ld. +If this happens, please file a bug report and mention the ld version. +Configuring with LDFLAGS=3D"-Wl,-znocombreloc" may fix the problem. =20 On platforms such as Solaris, you can also work around this problem by configuring your compiler to use the native linker instead of GNU ld. --=20 2.7.4 --------------5F0E0F0DF1341873675D210B--