Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
110448:0e1478bb5f00 | 110449:45304f108596 |
---|---|
3371 fi | 3371 fi |
3372 | 3372 |
3373 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) | 3373 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) |
3374 | 3374 |
3375 | 3375 |
3376 LINKER= | 3376 LD_FIRSTFLAG= |
3377 ORDINARY_LINK= | 3377 ORDINARY_LINK= |
3378 case "$opsys" in | 3378 case "$opsys" in |
3379 ## gnu: GNU needs its own crt0. | 3379 ## gnu: GNU needs its own crt0. |
3380 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | 3380 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; |
3381 | 3381 |
3382 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | 3382 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the |
3383 ## library search parth, i.e. it won't search /usr/lib for libc and | 3383 ## library search parth, i.e. it won't search /usr/lib for libc and |
3384 ## friends. Using -nostartfiles instead avoids this problem, and | 3384 ## friends. Using -nostartfiles instead avoids this problem, and |
3385 ## will also work on earlier NetBSD releases. | 3385 ## will also work on earlier NetBSD releases. |
3386 netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; | 3386 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; |
3387 | 3387 |
3388 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says | 3388 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says |
3389 ## MkLinux/LinuxPPC needs this. | 3389 ## MkLinux/LinuxPPC needs this. |
3390 ## ibms390x only supports opsys = gnu-linux so it can be added here. | 3390 ## ibms390x only supports opsys = gnu-linux so it can be added here. |
3391 gnu-*) | 3391 gnu-*) |
3392 case "$machine" in | 3392 case "$machine" in |
3393 macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; | 3393 macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; |
3394 esac | 3394 esac |
3395 ;; | 3395 ;; |
3396 esac | 3396 esac |
3397 | 3397 |
3398 | 3398 |
3399 if test "x$ORDINARY_LINK" = "xyes"; then | 3399 if test "x$ORDINARY_LINK" = "xyes"; then |
3400 | 3400 |
3401 LINKER="\$(CC)" | 3401 LD_FIRSTFLAG="" |
3402 AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) | 3402 AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) |
3403 | 3403 |
3404 ## The system files defining neither ORDINARY_LINK nor LINKER are: | 3404 ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: |
3405 ## freebsd, gnu-* not on macppc|ibms390x. | 3405 ## freebsd, gnu-* not on macppc|ibms390x. |
3406 elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then | 3406 elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then |
3407 | 3407 |
3408 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | 3408 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure |
3409 ## places that are difficult to figure out at make time. Fortunately, | 3409 ## places that are difficult to figure out at make time. Fortunately, |
3410 ## these same versions allow you to pass arbitrary flags on to the | 3410 ## these same versions allow you to pass arbitrary flags on to the |
3411 ## linker, so there is no reason not to use it as a linker. | 3411 ## linker, so there is no reason not to use it as a linker. |
3412 ## | 3412 ## |
3413 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | 3413 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from |
3414 ## searching for libraries in its internal directories, so we have to | 3414 ## searching for libraries in its internal directories, so we have to |
3415 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | 3415 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). |
3416 LINKER="\$(CC) -nostdlib" | 3416 LD_FIRSTFLAG="-nostdlib" |
3417 fi | 3417 fi |
3418 | 3418 |
3419 test "x$LINKER" = "x" && LINKER=ld | |
3420 ## FIXME? What setting of EDIT_LDFLAGS should this have? | 3419 ## FIXME? What setting of EDIT_LDFLAGS should this have? |
3421 test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" | 3420 test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" |
3422 | 3421 |
3423 AC_SUBST(LINKER) | 3422 AC_SUBST(LD_FIRSTFLAG) |
3424 | 3423 |
3425 | 3424 |
3426 ## FIXME? The logic here is not precisely the same as that above. | 3425 ## FIXME? The logic here is not precisely the same as that above. |
3427 ## There is no check here for a pre-defined LINKER. | 3426 ## There is no check here for a pre-defined LD_FIRSTFLAG. |
3428 ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | 3427 ## Should we only be setting LIB_GCC if LD ~ -nostdlib? |
3429 LIB_GCC= | 3428 LIB_GCC= |
3430 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | 3429 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then |
3431 | 3430 |
3432 case "$opsys" in | 3431 case "$opsys" in |