This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Re: problem compileing jni.cc on solaris 2.8


Tom Tromey wrote:

> Alexandre> Remove sparc-sun-solaris2.8/{config.cache,libjava} and it
> Alexandre> should proceed.
>
> Do we know what causes this?
> If not I'm inclined to simply add --tag to libjava/Makefile.am.
> That way at least we won't see the bug reports any more.

My guess that it has something to do with the definition of CXX
changing between the time libjava is configured and the time it gets
passed down from the top level on the "make" command line, with the
libstdc++.INC being appended to it after v3 gets built. I don't know
why it causes problems for some people and not others though.

Here's a comment from libstdc++-v3's src/Makefile.am:

# 2) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured.  However, when no
# such flag is given in the command line, libtool attempts to figure
# it out by matching the compiler name in each configuration section
# against a prefix of the command line.  The problem is that, if the
# compiler name and its initial flags stored in the libtool
# configuration file don't match those in the command line, libtool
# can't decide which configuration to use, and it gives up.  The
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \

        $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)

So, yeah, I think we ought to do that too?

regards

  [ bryce ]



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