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: libgcj versus libtool


[ About passing -B/pathname/ to gcc when linking ]

On Jun 30, 1999, tromey@cygnus.com (Tom Tromey) wrote:

>>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

>>> On Jun 29, 1999, Tom Tromey <tromey@cygnus.com> wrote:

>>> In the Cygnus tree we use a short patch to libtool instead.  This
>>> works everywhere that libtool works.

Alexandre> Would you have that patch handy?  It might speed things up :-)

> Here is the rather ugly patch.  You'd probably want to remove the
> "CYGNUS LOCAL" markers.

Hmm, the problem is that it assumes gcc.  -B may have other meanings,
and we don't always want to pass it down.  The ``blessed'' way to pass
arbitrary flags to the compiler, using libtool, is -Wc,-flag or
-Xcompiler -flag (libtool will strip -Wc, and -Xcompiler, if it uses
$CC to link, and will ignore the argument if it calls ld directly).
It also handles -Wl, and -Xlinker, removing them if calling the linker
directly, or keeping -Wl, if running $CC.

This is already implemented in libtool 1.3b, that is likely to be
released today.  I understand it might be cumbersome to add -Wc,
before -B, but I don't see any other portable way to go :-(


Well, another option is to arrange that ltconfig stores with_gcc in
the libtool script it generates, and conditionalize the special
handling of -B to with_gcc=yes.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists


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