public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Problems building libgcj...
  2000-04-01  0:00   ` Scott Bambrough
@ 2000-04-01  0:00     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Scott Bambrough; +Cc: Java/Libgcj Mailing List, Tom Tromey

>>>>> "Scott" == Scott Bambrough <scottb@netwinder.org> writes:

Scott> Thanks, this seems to have gotten me by that problem.  I
Scott> attached a patch for the change I made to Makefile.in.

I'll check in a similar patch.  Yours is subtly wrong on non-multilib
builds, and you have to patch Makefile.am as well.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problems building libgcj...
  2000-04-01  0:00 Problems building libgcj Scott Bambrough
@ 2000-04-01  0:00 ` Tom Tromey
  2000-04-01  0:00   ` Scott Bambrough
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Scott Bambrough; +Cc: Java/Libgcj Mailing List

>>>>> "Scott" == Scott Bambrough <scottb@netwinder.org> writes:

Scott> The problem seems to be the multilibbing.  The include paths
Scott> for libffi are not correct on the compiler command line (they
Scott> need another ../) when building in soft-float/libjava.  Hence
Scott> ffi.h cannot be found.  I had a look at the makefiles, but I
Scott> was hoping someone here might be more familiar with the
Scott> Makefile so the fix could be made without me having to analyze
Scott> the Makefile.

Look for -I../ffi/include in Makefile.
Try changing it to -I$(MULTIBUILDTOP)/../ffi/include

If that works, tell me and I will check in the appropriate change.

Unfortunately nobody builds libgcj multilibbed on a regular basis...

Scott> 1) The version of Double.h generated by gcj.h has 5 static
Scott> jdouble constants at the end of the class.  Only the first two
Scott> get initialized with values (on x86 and ARM).  Is this correct?

Yes.  As I recall we don't have a real way to print infinity (or NaN)
in a way that C++ would like.

Scott> 2) I had to modify the sources in the compilers gcc/java
Scott> directory to get the above file generated correctly.  ARM sets
Scott> FLOAT_WORDS_BIG_ENDIAN to 1, and I had to tweak it in a couple
Scott> of places.  Should I submit the patches for this here, or on
Scott> gcc-patches?  I have a copyright assignment on file for gcc.
Scott> These changes for the compiler should be covered by that
Scott> copyright assignment right?

What files did you have to change?

Anyway, all gcc patches should be sent to gcc-patches.
If they are patches for gcc/java, mention "java" in the subject (or
else we might skip them by mistake).

I imagine your changes will be covered by your existing assignment,
but it depends on exactly what you said in that assignment.

Scott> 3) I had a look at the copyright assignment for libgcj.  Is it
Scott> affected by RedHat's purchase of Cygnus?

I'm not positive.  We're currently trying to merge libgcj and
Classpath under a different license, under the ownership of the FSF.
If this works out then things will change.

If you're planning to sign papers for libgcj I can find out the real
answer.  If you're just curious, I won't.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Problems building libgcj...
@ 2000-04-01  0:00 Scott Bambrough
  2000-04-01  0:00 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Bambrough @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Java/Libgcj Mailing List

Hi,

I've been porting libgcj to run on our ARM based NetWinder for a while now. 
I've patched gcc-2.95.2 with Bryce McKinlay's patches and have been moderately
successful.

I've run into a bug in the Makefiles however:

c++ -DHAVE_CONFIG_H -I. -I../../../../libgcj/libjava -I./include
-I../../../../libgcj/libjava -Iinclude
-I../../../../libgcj/libjava/include -I../../../../libgcj/libjava/../boehm-gc
-I./../boehm-gc -DSILENT=1 -DNO_SIGNALS=1
-DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1 -I../../../../libgcj/libjava/libltdl
-I./libltdl
-I../../../../libgcj/libjava/../compat-include
-I../../../../libgcj/libjava/../zlib
-I../../../../libgcj/libjava/../libffi/include -I../libffi/include -fno-rtti
-fvtable-thunks -fsjlj-exceptions -W -Wall
-D_GNU_SOURCE -g -O2 -fvtable-thunks -D_GNU_SOURCE -msoft-float -c  -fPIC -DPIC
../../../../libgcj/libjava/java/lang/reflect/natMethod.cc -o
java/lang/reflect/.libs/natMethod.lo
../../../../libgcj/libjava/java/lang/reflect/natMethod.cc:44: ffi.h: No such
file or directory
make[4]: *** [java/lang/reflect/natMethod.lo] Error 1
make[4]: Leaving directory
`/home/scottb/cvstree/libgcj-build/armv4l-unknown-linux-gnu/soft-float/libjava'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/scottb/cvstree/libgcj-build/armv4l-unknown-linux-gnu/soft-float/libjava'
make[2]: *** [multi-do] Error 1
make[2]: Leaving directory
`/home/scottb/cvstree/libgcj-build/armv4l-unknown-linux-gnu/libjava'
make[1]: *** [all-multi] Error 2
make[1]: Leaving directory
`/home/scottb/cvstree/libgcj-build/armv4l-unknown-linux-gnu/libjava'
make: *** [all-target-libjava] Error 2

The problem seems to be the multilibbing.  The include paths for libffi are not
correct on the compiler command line (they need another ../) when building in
soft-float/libjava.  Hence ffi.h cannot be found.  I had a look at the
makefiles, but I was hoping someone here might be more familiar with the
Makefile so the fix could be made without me having to analyze the Makefile.

I also have a couple of other questions:

1) The version of Double.h generated by gcj.h has 5 static jdouble constants at
the end of the class.  Only the first two get initialized with values (on x86
and ARM).  Is this correct?

  static const jdouble MIN_VALUE = 4.9406564584124654e-324;
  static const jdouble MAX_VALUE = 1.7976931348623157e+308;
  static const jdouble NEGATIVE_INFINITY;
  static const jdouble POSITIVE_INFINITY;
  static const jdouble NaN;

2) I had to modify the sources in the compilers gcc/java directory to get the
above file generated correctly.  ARM sets FLOAT_WORDS_BIG_ENDIAN to 1, and I had
to tweak it in a couple of places.  Should I submit the patches for this here,
or on gcc-patches?  I have a copyright assignment on file for gcc.  These
changes for the compiler should be covered by that copyright assignment right?

3) I had a look at the copyright assignment for libgcj.  Is it affected by
RedHat's purchase of Cygnus?

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problems building libgcj...
  2000-04-01  0:00 ` Tom Tromey
@ 2000-04-01  0:00   ` Scott Bambrough
  2000-04-01  0:00     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Bambrough @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Java/Libgcj Mailing List; +Cc: Tom Tromey

[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]

Tom Tromey wrote:
> 
> Look for -I../ffi/include in Makefile.
> Try changing it to -I$(MULTIBUILDTOP)/../ffi/include
> 
> If that works, tell me and I will check in the appropriate change.

Thanks,  this seems to have gotten me by that problem.  I attached a patch for
the change I made to Makefile.in.

> Unfortunately nobody builds libgcj multilibbed on a regular basis...

I wasn't aware I was until I looked.  It automatically configured for it.

> Scott> 2) I had to modify the sources in the compilers gcc/java
> 
> What files did you have to change?

javaop.h and gjavah.c.   WORDS_TO_DOUBLE assembled doubles incorrectly, and the
NaN mask in gjavah.c was incorrect when FLOAT_WORDS_BIG_ENDIAN is true.  I will
send the patch to gcc-patches with a proper changelog entry.

> I imagine your changes will be covered by your existing assignment,
> but it depends on exactly what you said in that assignment.

It's a futures assignment so it should be ok.

> I'm not positive.  We're currently trying to merge libgcj and
> Classpath under a different license, under the ownership of the FSF.
> If this works out then things will change.
> 
> If you're planning to sign papers for libgcj I can find out the real
> answer.  If you're just curious, I won't.

Don't bother, I was just curious.  I'm not ready to submit changes for libgcj
yet.  I need to get it to build and test it first.  I'll cross that bridge when
I come to it.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org
Makefile.in.patch


[-- Attachment #2: Makefile.in.patch --]
[-- Type: text/x-diff, Size: 673 bytes --]

Index: Makefile.in
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.in,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile.in
--- Makefile.in	2000/01/19 18:59:27	1.46
+++ Makefile.in	2000/01/28 19:04:03
@@ -170,7 +170,7 @@ AM_CXXFLAGS = -fno-rtti -fvtable-thunks 
 JCFLAGS = -g -L$(here)
 JC1FLAGS = -g -L$(here) @LIBGCJ_JAVAFLAGS@
 
-LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I../libffi/include
+LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)/../libffi/include
 
 INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
 	$(GCINCS) $(THREADINCS) $(INCLTDL) \

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-01  0:00 Problems building libgcj Scott Bambrough
2000-04-01  0:00 ` Tom Tromey
2000-04-01  0:00   ` Scott Bambrough
2000-04-01  0:00     ` Tom Tromey

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).