aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu <[email protected]>2010-09-21 01:35:37 +0300
committerDan Nicolaescu <[email protected]>2010-09-21 01:35:37 +0300
commitf5ea3ba7ccf9174cbb1c115cf185632cfe44f655 (patch)
tree8f1268550b6d437a785f7aea69ae0317a3bc0178
parent984edd2215e74d54d387c7e8fa2fd14ee43ff5f0 (diff)
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.
-rwxr-xr-xconfigure21
-rw-r--r--configure.in21
-rw-r--r--src/Makefile.in5
3 files changed, 22 insertions, 25 deletions
diff --git a/configure b/configure
index f1ae71f73a..d3df6233e5 100755
--- a/configure
+++ b/configure
@@ -599,7 +599,7 @@ WINDOW_SUPPORT
TOOLTIP_SUPPORT
MOUSE_SUPPORT
LIB_GCC
-LINKER
+LD_FIRSTFLAG
LD_SWITCH_SYSTEM_TEMACS
POST_ALLOC_OBJ
PRE_ALLOC_OBJ
@@ -14703,7 +14703,7 @@ fi
-LINKER=
+LD_FIRSTFLAG=
ORDINARY_LINK=
case "$opsys" in
## gnu: GNU needs its own crt0.
@@ -14713,14 +14713,14 @@ case "$opsys" in
## 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 <[email protected]> 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 @@ esac
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 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
## 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
diff --git a/configure.in b/configure.in
index b814b1a023..47f3e0d753 100644
--- a/configure.in
+++ b/configure.in
@@ -3373,7 +3373,7 @@ fi
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
-LINKER=
+LD_FIRSTFLAG=
ORDINARY_LINK=
case "$opsys" in
## gnu: GNU needs its own crt0.
@@ -3383,14 +3383,14 @@ case "$opsys" in
## 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 <[email protected]> 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 @@ esac
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 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
## 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
diff --git a/src/Makefile.in b/src/Makefile.in
index d91b95d86e..7fe3fe0ae8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -35,6 +35,7 @@ CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
+LD_FIRSTFLAG=@LD_FIRSTFLAG@
EXEEXT = @EXEEXT@
version = @version@
# Substitute an assignment for the MAKE variable, because
@@ -124,8 +125,6 @@ LIBS_SYSTEM=@LIBS_SYSTEM@
## Where to find libgcc.a, if using gcc and necessary.
LIB_GCC=@LIB_GCC@
-LD=@LINKER@
-
## May use $CRT_DIR.
LIB_STANDARD=@LIB_STANDARD@
@@ -646,7 +645,7 @@ buildobj.h: Makefile
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