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]

Re: building gcj on OS X (also AWT)


Hi John,

John Gabriele wrote:


So, since I guess I'm building what the directions
refer to as a "native compiler" (?), is it correct that my
procedure should be:

cd ~/src/gcc_build_dir

../gcc-3.4.0/configure --prefix=/usr/local/gcj \
--enable-threads=posix --enable-shared

make CC='cc -no-cpp-precomp' bootstrap

As Andrew pointed out, not everything is needed here. This is how I do it.

In the created build dir:

/Volumes/xufs/gcc-cvs-dylib/gcc/configure --prefix=/Volumes/xufs/gcc-cvs-dylib/testbin --enable-languages=c,c++,java --disable-checking --enable-debug

--disable-checking just gives you a faster build, but it should be disabled anyway on 3.4. --enable-debug is also not necessary for regular builds, just for me :)

make bootstrap.

This way you get a compiler which has c,c++ and gcj + libraries.


Also, is GCJ's AWT currently the best option (vs. Swing) to do
a simple GUI? Are there any special ./configure options I need
to use? The instructions
http://gcc.gnu.org/install/configure.html
hint at --with-x and --enable-java-awt=xlib
and although I *do* have Apple's X11 installed, I'm not sure
what to do here. Will gcj's awt use OS X's Quartz by default
if I leave those arguments out?

Atm, xlib does not work, due to java issues we have to figure out first.
I tried --enable-java-awt=gtk which allowed me to run the TestAWT.java native and interpreted.


But it needs quite a bit work until you see the first window :)
You need the gtk stuff built with a gcc which allows dylibs (3.4 does)
Then you have to build gcc again with the gtk included. Also, before you need to tweak gcc that it supports signal handling.
Libjava needs then this signal handling enabled.


(just a fyi, I do not fink, I have to build the gtk & friends on my own.)

I hope to be able to give you more instructions soon. Atm, I have no build machine around. But I guess I have one soon:)
Then I can post the instructions to build --enable-java-awt=gtk.


Until then I suggest you just try to build gcc on your own without any tweaks to just get the feeling.

Will AWT only work with X (and not Quartz)?

Unfortunately yes, and only with gtk. Xlib may come later. Also I think native bindings will have to wait a bit. (Quartz)
We first have to integrate all the tweaks to gcc and friends until we can start with this.



Andreas a Mac OS X user and a GCC contributor

P.S attached a screen shot from how it looks like :)



Attachment: TestAWT.pdf
Description: Adobe PDF document


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