emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101511: Link temacs using $(CC) not


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101511: Link temacs using $(CC) not $(LD).
Date: Tue, 21 Sep 2010 01:35:37 +0300
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101511
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Tue 2010-09-21 01:35:37 +0300
message:
  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.
modified:
  configure
  configure.in
  src/Makefile.in
=== modified file 'configure'
--- a/configure 2010-09-14 00:04:48 +0000
+++ b/configure 2010-09-20 22:35:37 +0000
@@ -599,7 +599,7 @@
 TOOLTIP_SUPPORT
 MOUSE_SUPPORT
 LIB_GCC
-LINKER
+LD_FIRSTFLAG
 LD_SWITCH_SYSTEM_TEMACS
 POST_ALLOC_OBJ
 PRE_ALLOC_OBJ
@@ -14703,7 +14703,7 @@
 
 
 
-LINKER=
+LD_FIRSTFLAG=
 ORDINARY_LINK=
 case "$opsys" in
   ## gnu: GNU needs its own crt0.
@@ -14713,14 +14713,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 <address@hidden> 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
@@ -14728,14 +14728,14 @@
 
 if test "x$ORDINARY_LINK" = "xyes"; then
 
-  LINKER="\$(CC)"
+  LD_FIRSTFLAG=""
 
 $as_echo "#define ORDINARY_LINK 1" >>confdefs.h
 
 
-## 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,
@@ -14745,18 +14745,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"
+test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
 
 
 
 
 ## 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

=== modified file 'configure.in'
--- a/configure.in      2010-09-13 19:50:30 +0000
+++ b/configure.in      2010-09-20 22:35:37 +0000
@@ -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 <address@hidden> 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"
+test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
 
-AC_SUBST(LINKER)
+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

=== modified file 'src/Makefile.in'
--- a/src/Makefile.in   2010-09-10 16:44:35 +0000
+++ b/src/Makefile.in   2010-09-20 22:35:37 +0000
@@ -35,6 +35,7 @@
 CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
address@hidden@
 EXEEXT = @EXEEXT@
 version = @version@
 # Substitute an assignment for the MAKE variable, because
@@ -124,8 +125,6 @@
 ## Where to find libgcc.a, if using gcc and necessary.
 address@hidden@
 
address@hidden@
-
 ## May use $CRT_DIR.
 address@hidden@
 
@@ -646,7 +645,7 @@
 
 
 temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj}
-       $(LD) ${TEMACS_LDFLAGS} ${TEMACS_LDFLAGS2} \
+       $(CC) $(LD_FIRSTFLAG) ${TEMACS_LDFLAGS} ${TEMACS_LDFLAGS2} \
          -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES}
 
 ## The following oldxmenu-related rules are only (possibly) used if


reply via email to

[Prev in Thread] Current Thread [Next in Thread]