* 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>
dnl Treat GCC specially since it just gives a non-fatal `unrecognized option'
dnl if not built to support GNU ld.
-late_LDFLAGS=$LDFLAGS
+dnl For a long time, this was added to LDFLAGS rather than
+dnl LD_SWITCH_SYSTEM_TEMACS. That is: i) inappropriate, since
+dnl LDFLAGS is supposed to be a user option, and this flag is
+dnl essential. It can leads to problems if the user overrides
+dnl LDFLAGS at _build_ time (make LDFLAGS=... all), eg
+dnl http://bugs.debian.org/684788.
+dnl ii) unnecessary, since temacs is the only thing
+dnl that actually needs this option - this is where it was orginally:
+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=
[AC_MSG_RESULT(no)])
-LDFLAGS=$late_LDFLAGS
+LDFLAGS="$late_LDFLAGS"
dnl The function dump-emacs will not be defined and temacs will do
dnl (load "loadup") automatically unless told otherwise.