This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Check if -lc is needed.
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: Patch: Check if -lc is needed.
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 18 Jul 2000 16:24:14 -0300
- Cc: libtool-patches at gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20000718112113.A23492@valinux.com><orbszvfeyz.fsf@guarana.lsd.ic.unicamp.br><20000718120535.A23662@valinux.com>
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