[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool and gcj

From: Per Bothner
Subject: Re: libtool and gcj
Date: Fri, 01 Mar 2002 00:19:29 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8+) Gecko/20020215

Anthony Green wrote:

> I've been using a hacked version of libtool to build shared libraries
> of java code in with gcj.  The one problem I had to work around is
> that libtool insists on adding "-DPIC" to the compilation line.  gcj's
> -D is different from gcc and g++.  My hack is to simply strip out the
> "-D". However - now my tree contains a mix of java and c code and I
> need to use -DPIC with gcc.

> How do we change libtool to only use -DPIC where appropriate?

Well, the generated libtool script is close - you just need to
fix the pic_mode definition that is in the GCJ TAG section.

The following kludge seems to solve this problem:

mv libtool libtool.tmp && \
sed -e '/BEGIN LIBTOOL TAG CONFIG: GCJ/,/END LIBTOOL TAG CONFIG: GCJ/s/-DPIC/-fPIC/' <libtool.tmp >libtool && chmod +x libtool

Of course the real fix involves fixing, but that goes
beyond my ability to peer into the bowels of libtool.
        --Per Bothner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]