On Oct 2, 2009, at 6:06 PM, John Rose wrote:
On Oct 1, 2009, at 12:01 PM, John Rose wrote:
On Oct 1, 2009, at 4:12 AM, Michael Franz wrote:
Snow Leopard has gcc-4.0 and gcc-4.2. You can switch for the build
by specifying CC=gcc-4.0 and CXX=g++-4.0 before/when calling make.
Yippee! Looks like I'm back in business on 10.6. -- John
With the current bsd-port plus unrelated MLVM patches I got a clean
Snow Leopard build. It passed the MLVM regression tests.
I had to use GCC 4.0 as Michael suggested.
The 4.2 compiler is offering some porting resistance. I put a patch
into MLVM which copes with the new "printf" warnings it generates:
http://hg.openjdk.java.net/mlvm/mlvm/hotspot/raw-file/f9a6cda5b465/snowleopard.patch
This patch is a bunch of lint-type fixes, and works fine on GCC
4.0. (Haven't tested on Solaris, etc, but s.b. OK.) It's probably
not worth the effort of pushing this patch upstream until we have a
working GCC 4.2 build.
The current problem with GCC 4.2 is that when I build on x86_32, the
JVM crashes in at least two places: Under -Xint mode, the JVMG mode
throws an assert on exit, and otherwise it throws asserts or crashes
in compiler-related code. The 64-bit version of the JVM appears to
work, but I haven't exercised it much.
Since I'm chasing other problems, I'm going to leave GCC 4.2 alone
for now. If anyone wants to pick up this issue, help yourself to
snowleopard.patch above.
It might also be worth giving llvm-gcc a try, since that is what we
use to compile the Java SE 6 in Snow Leopard. It uses gcc's front-end,
and llvm's code generating back-end. I encountered similar crashes
using GCC 4.2, and they don't look obvious to isolate, let alone
resolve.
Mike Swingler
Java Runtime Engineer
Apple Inc.