This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: Check if -lc is needed.


On Jul 18, 2000, "H . J . Lu" <hjl@valinux.com> wrote:

>> I'm not sure this wouldn't be rejected by some tool-chain.  I'd rather
>> go with regular shared library names.

> We can use libconftest.so for both. But

Nope, libconftest.so is not a regular shared library names on all
platforms supported by libtool.  And then, there are platforms that
don't support shared libraries at all.

> I just want to set something to archive_cmds so that it will run.

But you want verbose output, so `-v' must make it to the compiler
invocation.

> I don't know enough about it. If it fails, it won't hurt. The worest
> can happen is -lc is added even if it is not needed.

Indeed.  But are you volunteering to answer the questions about the
weird errors that will show up in config.log? :-)

>> But you had mentioned that `-lc' was needed for older versions of GCC.
>> Are you sure about that?

> Yes, I created those old versions gcc for Linux :-)

:-)

Ok, back to plan A.  How about only running this test when (i) the
compiler in use is GCC; (ii) archive_cmds starts with `$CC ' and (iii)
archive_cmds does not contain any `~'?  This would probably solve 90%
of the problems.


You may also have to set variables that are referenced in archive_cmds
of other systems to avoid having them prevent the success of the test.
For example, $verstring and $output_objdir are referenced in irix' and
osf's archive_cmds, $allow_undefined_flag is referenced on a couple of
systems.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]