diff configure.in @ 110449:45304f108596

Link temacs using $(CC) not $(LD). * configure.in (LINKER): Rename to LD_FIRSTFLAG, do not include $(CC). * src/Makefile.in (temacs): Link using $(CC) not $(LD). (LD_FIRSTFLAG): Define using autoconf. (LD): Remove.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 21 Sep 2010 01:35:37 +0300
parents ec11d41deaa6
children 52590453d4f9
line wrap: on
line diff
--- a/configure.in	Mon Sep 20 23:45:09 2010 +0200
+++ b/configure.in	Tue Sep 21 01:35:37 2010 +0300
@@ -3373,7 +3373,7 @@
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
 
-LINKER=
+LD_FIRSTFLAG=
 ORDINARY_LINK=
 case "$opsys" in
   ## gnu: GNU needs its own crt0.
@@ -3383,14 +3383,14 @@
   ## library search parth, i.e. it won't search /usr/lib for libc and
   ## friends.  Using -nostartfiles instead avoids this problem, and
   ## will also work on earlier NetBSD releases.
-  netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
+  netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
 
   ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
   ##   MkLinux/LinuxPPC needs this.
   ## ibms390x only supports opsys = gnu-linux so it can be added here.
   gnu-*)
     case "$machine" in
-      macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
+      macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
     esac
     ;;
 esac
@@ -3398,12 +3398,12 @@
 
 if test "x$ORDINARY_LINK" = "xyes"; then
 
-  LINKER="\$(CC)"
+  LD_FIRSTFLAG=""
   AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.])
 
-## The system files defining neither ORDINARY_LINK nor LINKER are:
+## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
 ## freebsd, gnu-* not on macppc|ibms390x.
-elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
+elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
 
   ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
   ## places that are difficult to figure out at make time.  Fortunately,
@@ -3413,18 +3413,17 @@
   ## Well, it is not quite perfect.  The "-nostdlib" keeps GCC from
   ## searching for libraries in its internal directories, so we have to
   ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
-  LINKER="\$(CC) -nostdlib"
+  LD_FIRSTFLAG="-nostdlib"
 fi
 
-test "x$LINKER" = "x" && LINKER=ld
 ## FIXME? What setting of EDIT_LDFLAGS should this have?
-test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
-
-AC_SUBST(LINKER)
+test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
+
+AC_SUBST(LD_FIRSTFLAG)
 
 
 ## FIXME? The logic here is not precisely the same as that above.
-## There is no check here for a pre-defined LINKER.
+## There is no check here for a pre-defined LD_FIRSTFLAG.
 ## Should we only be setting LIB_GCC if LD ~ -nostdlib?
 LIB_GCC=
 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then