[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool and gcj
From: |
Albert Chin |
Subject: |
Re: libtool and gcj |
Date: |
Fri, 1 Mar 2002 02:57:22 -0600 |
User-agent: |
Mutt/1.2.5i |
On Sat, Feb 23, 2002 at 08:08:53AM -0800, 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?
This gets added by libtool.m4 here (line 4311):
case "$host_os" in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
*)
_LT_AC_TAGVAR(lt_prog_compiler_pic,
$1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
;;
esac
This seems quite wrong. Why do we assume the compiler will grok -DPIC?
Why isn't this handled in the tag-specific and os-specific portions of
libtool.m4? If the tag/os combo says -KPIC is needed, why do we -KPIC
-DPIC?
--
albert chin (address@hidden)
- Re: libtool and gcj, (continued)
Re: libtool and gcj (patch), Per Bothner, 2002/03/01
Re: libtool and gcj,
Albert Chin <=