From 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="$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