autoconf
[Top][All Lists]
Advanced

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

Re: LD not precious?


From: Ralf Wildenhues
Subject: Re: LD not precious?
Date: Thu, 14 Jan 2010 21:10:04 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Philip,

* Philip A. Prindeville wrote on Thu, Jan 14, 2010 at 02:43:49AM CET:
> Silly question, but I was working on a particular project
> (dahdi-tools) and I noticed that the value of LD that was passed to
> "configure" didn't get saved into "makeopts".
> 
> I hacked the configure.ac file as:
[...]
> +AC_SUBST(LD)
> +
[...]
> and this seems to work, but this left me wondering why "LD" isn't a
> precious variable, just like "CC" is.

First off, a naming nit: in the Autoconf lingo, AC_SUBST makes a
variable be "substituted", i.e., occurrences of @LD@ in <file>.in for
<file> listed in an AC_CONFIG_FILES macro are replaced by config.status
with the value of $LD.  "Precious" variables on the other hand are those
substituted variables which are also saved and restored for an eventual
`./config.status --recheck' triggering another configure run.

Now, by default, LD is neither precious nor substituted, because
nowadays the linker is rarely needed directly: most packages come by
with using the compiler driver for linking, who then calls the linker.

Libtool, by the way, uses $LD sometimes, and AC_PROG_LIBTOOL causes $LD
to be substituted.

> Looking at the contents of /usr/share/autoconf/autoconf/ for autoconf
> 2.63, I'm not seeing \<LD\> anywhere.
> 
> Is that an oversight? I ask because in a cross-compilation
> environment, getting CC and LD right are equally important.

Sure, but why would $LD be more important in cross compilation setups
than in native ones?  The cross-compiler usually calls the right linker.

Cheers,
Ralf




reply via email to

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