public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Jeff Sturm <jsturm@one-point.com>
Cc: Bryce McKinlay <bryce@waitaki.otago.ac.nz>,
	Phil Edwards <phil@jaj.com>,
	Nic Ferrier <nferrier@tapsellferrier.co.uk>,
	java@gcc.gnu.org, gcc@gcc.gnu.org
Subject: Re: Get rid of libtool? [was Re: Makefile problems]
Date: Mon, 25 Feb 2002 09:10:00 -0000	[thread overview]
Message-ID: <orelj9wlhi.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: Jeff Sturm's message of "Mon, 25 Feb 2002 00:45:11 -0500 (EST)"

On Feb 25, 2002, Jeff Sturm <jsturm@one-point.com> wrote:

> On 25 Feb 2002, Alexandre Oliva wrote:
>> There are a lot of small details that, when
>> added up, may turn into enough of a hassle that a lot of libtool's
>> built-in intelligence ends up having to be duplicated, and poorly.

> Isn't that happening already for libgcc_s?

Yup.  I find it quite unfortunate, if you ask me.

>> The only advantage I see for GCC in keep on using libtool is the
>> abstraction.

> But when we need a great deal of control over how the shared lib is
> built we have to get past the abstraction layer anyway.

Like what?

> Things I'd like to see (in no particular order):

> - symbol versioning (libgcj doesn't currently do this, but it could, and
> probably should).  This is platform and tool specific, and to my knowledge
> libtool doesn't provide any assistance.

It goes only as far as letting you pass flags to the linker.  It
definitely doesn't help you in any way, because symbol versioning is
very system-specific.  It definitely goes beyond the portable behavior
of libraries (static and shared), and libtool doesn't try to get into
this business.

Which means nothing, if you ask me.  The important thing is that it
doesn't get in your way to implement this feature.  Just like automake
doesn't get in your way (contrary to many's claims) when you need
custom Makefile rules that don't look like those that automake
generates by default.

> - real incremental linking (*not* convenience libraries, which are a lousy
> substitute).

Which of the definitions of incremental linking are you talking about?

> - better performance (why couldn't some rules be baked into the makefile
> rather than evaluated for each compilation?).

That's a possibility, but how much additional garbage are you willing
to tolerate in Makefiles?  When is it going to be too much?  When make
starts to run out of command-line space when trying to link libraries?
Why not go ahead and skip the overhead of the gcc driver and fold the
cc1 && as invocations into the Makefile?

Ok, perhaps I'm pushing too much.  I'm sympathetic to complains about
the performance of libtool.  It's dog slow.  I know it.  Folding stuff
into Makefiles might help, but I'm not convinced this would speed it
up significantly.  Perhaps I'm mistaken.

Anyway, IMO, the way to fix this in libtool (whether or not GCC uses
it) is to rewrite libtool in a more efficient language.  This has been
the subject of debates in the libtool mailing lists.  The main problem
with this rewrite is that any scripting language would become yet
another bootstrap requirement for libtool (currently, libtool only
depends on Bourne Shell and a small set of portable Unix utilities
approved for use in configure scripts); OTOH, any compiled language
would require a compiler capable of generating code for the build
machine, which is something for which there is no precedent in
autoconf, automake and libtool, and that is known to require some
shall I say interesting hacks in GCC to get Canadian cross builds
right.

> For libgcj, we could always fall back to static-only on targets where we
> don't know how to build shared libs.

And give up dynamic linking entirely.  Remember that libtool comes
with libltdl, a library that emulates dlopen even in the total absence
of dynamic linking.  You have to use libtool to link the executables
and tell they're going to attempt to dlopen certain libraries, but it
works, and I think it's worth it.  Of course, one can reinvent the
wheel and do it all without libtool.  But, again, is it worth it?

> For instance, libgcj assumes public data symbols are exported by
> default, which certainly isn't true on windows at least.

Are you talking of -export-dynamic or something entirely different?
Libtool makes -export-dynamic portable.  It's enough to link using
this option or the -module option, and libtool will know what you
mean.

> That sort of detail isn't hidden by libtool's abstraction.

If you're sure about this, perhaps you meant something else?

-- 
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                Professional serial bug killer

  parent reply	other threads:[~2002-02-25 16:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C78B3B6.5000303@waitaki.otago.ac.nz>
     [not found] ` <87it8mbse7.fsf@tf1.tapsellferrier.co.uk>
2002-02-24 16:21   ` Bryce McKinlay
2002-02-24 19:16     ` Brian Jones
2002-02-24 19:35     ` Phil Edwards
2002-02-24 19:45       ` Alexandre Oliva
2002-02-24 19:59         ` Bryce McKinlay
2002-02-24 21:22           ` Alexandre Oliva
2002-02-24 22:05             ` Jeff Sturm
2002-02-24 22:17               ` Phil Edwards
2002-02-24 22:24                 ` Alexandre Oliva
2002-02-24 23:20                   ` Phil Edwards
2002-02-25  5:36                     ` Alexandre Oliva
2002-02-25  9:10               ` Alexandre Oliva [this message]
2002-02-26 18:41                 ` Jeff Sturm
2002-02-26 18:47                   ` Richard Henderson
     [not found]                     ` <3C7C4E67.6050001@waitaki.otago.ac.nz>
2002-02-27  2:41                       ` Richard Henderson
2002-02-27 17:55                   ` Alexandre Oliva
2002-02-25 16:56               ` Richard Henderson
2002-02-25 17:00             ` Richard Henderson
2002-02-27 18:06               ` Alexandre Oliva
2002-02-27 20:17                 ` Albert Chin
2002-02-28  0:02                 ` Marc Espie
2002-02-28  0:49                   ` Alexandre Oliva
2002-02-28 17:35                   ` Phil Edwards
2002-07-03 15:41 Nathanael Nerode
2002-12-28  5:08 ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=orelj9wlhi.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=bryce@waitaki.otago.ac.nz \
    --cc=gcc@gcc.gnu.org \
    --cc=java@gcc.gnu.org \
    --cc=jsturm@one-point.com \
    --cc=nferrier@tapsellferrier.co.uk \
    --cc=phil@jaj.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).