]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix treatment of ld's nocombreloc option
authorGlenn Morris <rgm@gnu.org>
Mon, 9 Sep 2013 07:34:15 +0000 (00:34 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 9 Sep 2013 07:34:15 +0000 (00:34 -0700)
* configure.ac (LDFLAGS_NOCOMBRELOC): New variable.
(LDFLAGS): Move nocombreloc option from here...
(LD_SWITCH_SYSTEM_TEMACS): ... to here.
This is an essential option that should not be in LDFLAGS,
because the user may override that at build time; eg
http://bugs.debian.org/684788.  temacs is the only thing
that actually needs this option; this is where it was orginally:
http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html

ChangeLog
configure.ac

index 03a04c6367c5af1c9f3d9ef256e9e120607dc92f..2100041e9fe0c95821617fe681d862c68fba0ba4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-09-09  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (LDFLAGS_NOCOMBRELOC): New variable.
+       (LDFLAGS): Move nocombreloc option from here...
+       (LD_SWITCH_SYSTEM_TEMACS): ... to here.
+       This is an essential option that should not be in LDFLAGS,
+       because the user may override that at build time; eg
+       http://bugs.debian.org/684788.  temacs is the only thing
+       that actually needs this option; this is where it was orginally:
+       http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
+
 2013-09-08  Glenn Morris  <rgm@gnu.org>
 
        * configure.ac (--without-compress-install):
index 2e90f5fb7b5681ec80c44f6e9424bbfda23cdb4f..b18eeb90de11a0d2326b1e052b3d9831fea8519c 100644 (file)
@@ -1028,17 +1028,20 @@ dnl if not built to support GNU ld.
 
 late_LDFLAGS=$LDFLAGS
 if test x$GCC = xyes; then
-  LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
+  LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
 else
-  LDFLAGS="$LDFLAGS -znocombreloc"
+  LDFLAGS_NOCOMBRELOC="-znocombreloc"
 fi
 
+LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
+
 AC_MSG_CHECKING([for -znocombreloc])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
   [AC_MSG_RESULT(yes)],
-  LDFLAGS=$late_LDFLAGS
+  LDFLAGS_NOCOMBRELOC=
   [AC_MSG_RESULT(no)])
 
+LDFLAGS=$late_LDFLAGS
 
 dnl The function dump-emacs will not be defined and temacs will do
 dnl (load "loadup") automatically unless told otherwise.
@@ -4740,6 +4743,8 @@ if test x$ac_enable_profiling != x ; then
   esac
 fi
 
+LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
+
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
 ## MinGW-specific post-link processing of temacs.