Second Zero review request
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Tue Oct 6 14:06:34 PDT 2009
On Sep 24, 2009, at 5:56 AM, Gary Benson wrote:
> Hi all,
>
> Zero is an interpreter-only port of HotSpot that uses no assembler and
> can trivially be built on any Linux system. The following webrev adds
> Zero support to OpenJDK:
>
> http://cr.openjdk.java.net/~gbenson/zero-10/
>
> Building is largely the same as the previous webrev (zero-07) except
> for the following changes:
>
> - The variable CORE_BUILD is no longer used.
> - The variable ZERO_BITSPERWORD has been replaced with
> ARCH_DATA_MODEL
>
> Summary of changes
> ==================
>
This all looks fine.
>
> Summary of non-changes
> ======================
>
> - The variable ZERO_ENDIANNESS remains unchanged. I haven't renamed
> it as ENDIANNESS because it's only used during Zero builds. It's
> possible that the makefiles could be refactored such that, for
> example, existing platforms set ENDIANNESS (leaving Zero requiring
> it to be set externally) but I wasn't sure I should be doing this
> in this patch.
ok.
>
> - The build directory is linux_zero_zero (or linux_zero_shark) rather
> than linux_$(ARCH)_zero. There is no variable defining the name of
> the build directory as such, it's always referenced as
> $(OSNAME)_$(BUILDARCH)_whatever, and in addition to specifiying the
> build directory, BUILDARCH is used in conditionals in various
> makefiles to add extra compiler flags, etc. If BUILDARCH is set to
> "i486", for example, then extra compiler flags are added which are
> unnecessary (and possibly problematic) for Zero.
I'll assume you're ok with my change to make work, combined with you
change to make i386 be i486.
>
> - The variable ZERO_LIBARCH remains. It's used in several different
> places, and I couldn't figure out a place to put the logic to
> convert a uname string to the correct ZERO_LIBARCH value where the
> result would be accessible everywhere it is required.
That's fine.
So I'm fine with the hotspot parts and assume others have no
complaints since we haven't heard any. Have you gotten reviews of the
other parts from their respective owners?
tom
>
> Build Instructions
> ==================
>
> There are a number of environment variables that need setting before
> running make, but if you are using jdk/make/jdk_generic_profile.sh
> to set up your environment then you only need to set one, and a build
> can be as simple as:
>
> export ZERO_BUILD=true
> . jdk/make/jdk_generic_profile.sh
> gmake sanity && gmake
>
> The mandatory environment variable does the following:
>
> ZERO_BUILD
> Setting ZERO_BUILD to "true" will cause the Zero interpreter to
> be used. If ZERO_BUILD is unset, or set to any other value than
> "true", the standard, platform-specific interpreter will be used.
>
> Of the other environment variables the following are required when
> ZERO_BUILD is set to "true". These are set by
> jdk/make/jdk_generic_profile.sh based on the result of uname -m:
>
> ZERO_LIBARCH
> This is the name of the architecture-specific subdirectory under
> $JAVA_HOME/jre/lib. Typically this will be the same as the
> output
> of uname -m, although there are some exceptions: "amd64" instead
> of "x86_64", for example, and "i386" instead of "i686".
>
> ZERO_ARCHDEF
> The value of ZERO_ARCHDEF will be passed to the C++ compiler
> using
> -D${ZERO_ARCHDEF} to allow conditionalized platform-specific
> code.
> This is typically set to ZERO_LIBARCH converted to uppercase but,
> again, there are exceptions. "i386" becomes "IA32", to match
> what
> HotSpot already does, and on platforms with both 32- and 64-bit
> variants ZERO_ARCHDEF corresponds to the 32-bit version, so both
> ppc and ppc64 have ZERO_ARCHDEF set to "PPC".
>
> ZERO_ENDIANNESS
> This is set to "little" or "big".
>
> ARCH_DATA_MODEL
> This is set to "32" or "64".
>
> ZERO_ARCHFLAG
> This is a flag that will be passed to the C++ compiler and to the
> linker to instruct them to generate code for the particular
> platform. This is required for platforms with both 32- and 64-
> bit
> variants where the compiler needs to be told which variant to
> build for. ZERO_ARCHFLAG will typically be set to "-m32" or
> "-m64", except on 31-bit zSeries where it will be set to "-m31".
>
> Zero uses one external library, libffi, for JNI method invocation.
> The following two variables are used to tell the compiler and linker
> how to find libffi. These can be set by the user, but if left unset
> then jdk/make/jdk_generic_profile.sh will attempt to set them using
> pkg-config or, failing that, by supplying defaults pointing to the
> standard locations:
>
> LIBFFI_CFLAGS
> Flags to be passed to the C++ compiler to build against libffi.
> If unset (and pkg-config is not installed, or if libffi is not
> built with pkg-config) then this defaults to "".
>
> LIBFFI_LIBS
> Flags to be passed to the linker to link against libffi. If
> unset (and pkg-config is not installed, or if libffi is not
> built with pkg-config) then this defaults to "-lffi".
>
> --
> http://gbenson.net/
More information about the hotspot-dev
mailing list