summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-06-08 17:43:36 +1000
committerDarren Tucker <dtucker@dtucker.net>2018-06-08 17:43:36 +1000
commitf2c06ab8dd90582030991f631a2715216bf45e5a (patch)
tree3a5d2d13b735151024ec687ab4546d7f4182f57c
parente1542a80797b4ea40a91d2896efdcc76a57056d2 (diff)
Remove ability to override $LD.
Since autoconf always uses $CC to link C programs, allowing users to override LD caused mismatches between what LD_LINK_IFELSE thought worked and what ld thought worked. If you do need to do this kind of thing you need to set a compiler flag such as gcc's -fuse-ld in LDFLAGS.
-rw-r--r--INSTALL2
-rw-r--r--configure.ac9
2 files changed, 6 insertions, 5 deletions
diff --git a/INSTALL b/INSTALL
index 7f552bf76..d5275113b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -220,7 +220,7 @@ If you need to pass special options to the compiler or linker, you
220can specify these as environment variables before running ./configure. 220can specify these as environment variables before running ./configure.
221For example: 221For example:
222 222
223CFLAGS="-O -m486" LDFLAGS="-s" LIBS="-lrubbish" LD="/usr/foo/ld" ./configure 223CC="/usr/foo/cc" CFLAGS="-O" LDFLAGS="-s" LIBS="-lrubbish" ./configure
224 224
2253. Configuration 2253. Configuration
226---------------- 226----------------
diff --git a/configure.ac b/configure.ac
index 7cf6d61dd..c5c21f06a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,9 +83,11 @@ if test ! -z "$PATH_PASSWD_PROG" ; then
83 [Full path of your "passwd" program]) 83 [Full path of your "passwd" program])
84fi 84fi
85 85
86if test -z "$LD" ; then 86dnl Since autoconf doesn't support it very well, we no longer allow users to
87 LD=$CC 87dnl override LD, however keeping the hook here for now in case there's a use
88fi 88dnl use case we overlooked and someone needs to re-enable it. Unless a good
89dnl reason is found we'll be removing this in future.
90LD="$CC"
89AC_SUBST([LD]) 91AC_SUBST([LD])
90 92
91AC_C_INLINE 93AC_C_INLINE
@@ -526,7 +528,6 @@ case "$host" in
526 [ AC_MSG_RESULT([yes]) ], 528 [ AC_MSG_RESULT([yes]) ],
527 [ AC_MSG_RESULT([no]) 529 [ AC_MSG_RESULT([no])
528 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`" 530 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
529 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
530 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`" 531 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
531 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`" 532 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
532 ] 533 ]