autoconf
[Top][All Lists]
Advanced

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

Re: 2.59 and Explicit libc linking checks


From: Ralf Wildenhues
Subject: Re: 2.59 and Explicit libc linking checks
Date: Fri, 3 Mar 2006 17:53:00 +0100
User-agent: Mutt/1.5.11

Hi Rafael,

* Rivera, R wrote on Sun, Feb 26, 2006 at 08:38:34PM CET:
> 
> New to this list. It seems the logic behind determining whether or not libc
> should be explicitly linked is backwards (in a generated configure script).

This is a Libtool question, and as such would've fit better on one of
its mailing lists.  I understand though that this is difficult to see.
;-)

> The grep command in...
> 
> (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
> 
> ... returns a value of 1 if the string is not found. Looking a few lines
> down, you'll find...
> 
> (exit $ac_status);
> 
> ... which fails the condition test and turns on explicit linking. As one
> cannot assume grep has a -v option, I would think the
> 'archive_cmds_need_lc=no' and 'archive_cmds_need_lc=yes' statements are
> backwards.
> 
> Does that make sense? Is this a problem with my logic or autoconf's logic?

There is a comment a few lines above:
      # Test whether the compiler implicitly links with -lc since on some
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
      # to ld, don't add -lc before -lgcc.

This is what the test is supposed to achieve.  First of all, the code is
not triggered at all if archive_cmds_need_lc has been set to 'no' before.

What system are you on?  What does archive_cmds_need_lc get set to and
what would you expect instead?

Cheers,
Ralf




reply via email to

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