Building OpenJDK 1.7.0 for Mac OS X 10.6 (Snow Leopard)


Building OpenJDK 1.7.0 for Mac OS X 10.6 (Snow Leopard)

I’m basing this blog entry on this reference page. There are only a few different things that you need to do so I will spell those out cleanly relative to what was previously needed:

  1. Grab the dependencies except for JIBX, it is no longer needed for the build.
  2. Checkout the code as described.
  3. export JAVA_HOME=$SOYLATTE_HOME
  4. The build script is somewhat different:
env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin \
make \
CC=gcc-4.0 CXX=g++-4.0 \
ALT_BOOTDIR=$SOYLATTE_HOME \
JAVA_TOOLS_DIR=$SOYLATTE_HOME/bin \
ALT_FREETYPE_HEADERS_PATH=/usr/X11R6/include \
ALT_FREETYPE_LIB_PATH=/usr/X11R6/lib \
ANT_HOME=/usr/share/ant \
NO_DOCS=true \
HOTSPOT_BUILD_JOBS=1

That should then result in a build/bsd-i586/j2sdk-image directory containing the JDK.