This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Bizarre test for main in libm
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Phil Edwards <phil at jaj dot com>
- Cc: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>, libstdc++ at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Fri, 02 May 2003 09:42:55 +0100
- Subject: Re: Bizarre test for main in libm
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> On Thu, May 01, 2003 at 04:01:53PM -0500, Loren James Rittle wrote:
> > In article <200305011038.h41AcJm15772@pc960.cambridge.arm.com> you write:
> > >
> > > Does anyone know why that test is there in the first place?
> >
> > Mark, mentioned that the patch was sort-a-ugly. Are there any systems
> > where there is no -lm? The above test would not link if -lm was not
> > found. Correct?
>
> Right. It might just be a semi-convenient way of getting -lm added to
> LIBS if-and-only-if libm is available. The theory, I think, is that if
> libm is available at all, it's probably also required (for us).
>
Ah. I get it. I would have said this was non-obvious enough to warrant a
comment, but then I'm not an autoconf expert. It somewhat surprised me to
see
checking for main in -lm ... yes
scroll past on the screen (yes, they go slowly enough to read on one
machine I use).
R.