From: Paul Eggert <eggert@cs.ucla.edu>
To: Daniel Colascione <dancol@dancol.org>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: -znocombreloc?
Date: Sat, 3 Dec 2016 21:36:49 -0800 [thread overview]
Message-ID: <2f0ed5df-5818-3d68-f52d-f73660b689d3@cs.ucla.edu> (raw)
In-Reply-To: <dfb2c8b3-4080-3a40-07a4-3ca4b1d9d418@dancol.org>
[-- Attachment #1: Type: text/plain, Size: 661 bytes --]
Daniel Colascione wrote:
> Does anyone remember _why_ temacs segfaults on startup unless we give ld this
> option?
It doesn't segfault for me, even when I build with -zcombreloc. I think
-znocombreloc worked around bugs in now-obsolete versions of the GNU linker.
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
matter now, so I'm inclined to remove it, as in the proposed patch (attached),
which I tested on Fedora 24 x86-64 but have not installed.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-old-znocombreloc-hack.patch --]
[-- Type: text/x-diff; name="0001-Remove-old-znocombreloc-hack.patch", Size: 3179 bytes --]
From fe4a24b33bb72610cf6703143cf910d7eef547b6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
fi
-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 option'
-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=... all" could run into problems,
-dnl http://bugs.debian.org/684788
-dnl * unnecessary, since temacs is the only thing that actually needs it.
-dnl Indeed this is where it was originally, prior to:
-dnl http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
-late_LDFLAGS="$LDFLAGS"
-if test x$GCC = xyes; then
- LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
-else
- LDFLAGS_NOCOMBRELOC="-znocombreloc"
-fi
-
-LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
-
-AC_MSG_CHECKING([for -znocombreloc])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
- [AC_MSG_RESULT(yes)],
- LDFLAGS_NOCOMBRELOC=
- [AC_MSG_RESULT(no)])
-
-LDFLAGS="$late_LDFLAGS"
-
AC_CACHE_CHECK([whether addresses are sanitized],
[emacs_cv_sanitize_address],
[AC_COMPILE_IFELSE(
@@ -5176,8 +5146,6 @@ AC_DEFUN
esac
fi
-LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
-
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
## 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.
It crashes on X, but runs fine when called with option "-nw".
-This has been observed when Emacs is linked with GNU ld but without passing
-the -z nocombreloc flag. Emacs normally knows to pass the -z nocombreloc
-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="-Wl,-znocombreloc" may fix the problem.
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.
--
2.7.4
next prev parent reply other threads:[~2016-12-04 5:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 0:12 -znocombreloc? Daniel Colascione
2016-12-04 5:36 ` Paul Eggert [this message]
2016-12-04 10:36 ` -znocombreloc? Richard Copley
2016-12-04 11:24 ` -znocombreloc? Richard Copley
2016-12-04 15:34 ` -znocombreloc? Eli Zaretskii
2016-12-04 17:14 ` -znocombreloc? Daniel Colascione
2016-12-05 2:47 ` -znocombreloc? Paul Eggert
2016-12-07 23:58 ` -znocombreloc? Jeremie Courreges-Anglas
2016-12-08 1:19 ` -znocombreloc? Paul Eggert
-- strict thread matches above, loose matches on Subject: below --
2016-12-05 3:23 -znocombreloc? Ali Bahrami
2016-12-05 15:50 ` -znocombreloc? 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=2f0ed5df-5818-3d68-f52d-f73660b689d3@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=dancol@dancol.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.