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] |
| Other format: | [Raw text] | |
Hi People,
>> >If you have the C/C++ source code, it runs on POSIXy OSes, and doesn't
>> >assume little endian, the answer is probably "yes".
>> >
>> >
>> This might be crazy, but did you try mips2java with GCC sources?
>> I would love to have a classfile-based, portable, cross-compiler...
>Hey that's a really, really good idea. It should work, too.
Okay. This was intriguing enough that I took the bait. I'm probably
posting the gory details of this to the wrong list, but I'm too lazy
to figure out what the right list is.
I figured the first step in this insanity was to build a (mips,mingw)
binutils cross. My initial target milestone was to do:
gij -cp <something> i686_pc_mingw_ld --help
...and get the help text.
I got mips2java from CVS and built it and ran some tests. Way cool!
If nothing else, I want to try making the TRS-80 emulator written in
C I ported from DTRS years ago run as a Java applet.
I used the attached scripts. which attempt to build cross binutils first.
There was a glitch with make install due to the CFLAGS_FOR_BUILD / CFLAGS
incompatibility, but it was pretty easily overcome. I also needed to add
the following stubs to support_aux.c that are in the attached
support_aux_stubs.c and do a remake before building binutils.
This gave me (among other things) a crippled i686-pc-mingw32-ld
(mips,mingw) cross.
I then attempted to convert this executable to a .class file. The generated
.java file was 15,452,106 bytes and javac ran out of memory when I tried
building this on the Linux box. I then tried this on my P733/1024M machine
with this command:
d:\j2sdk1.4.1_01\bin\javac -classpath l:\mips2java\mips\build -J-Xmx300m l:\mips2java\mips\build\tests\i686_pc_mingw32_ld.java
...after javac chewed up up 120M of memory, I got this error:
l:\mips2java\mips\build\tests\i686_pc_mingw32_ld.java:4: error while writing tests.i686_pc_mingw32_ld: too many constants
public class i686_pc_mingw32_ld extends org.xwt.mips.Runtime {
^
1 error
So I'm abandoning this experiment.
None of this is meant to detract in anyway from mips2java - like I
said before, I think it's really cool and I'm looking forward
to playing with it more.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
Attachment:
support_aux_stubs.c
Description: Binary data
Attachment:
build_mips_mingw.tar.bz2
Description: application/bzip2
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |