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