[RFC] Fix Zero and Shark builds
Roman Kennke
rkennke at redhat.com
Wed Feb 20 13:32:49 PST 2013
> > These changes introduce the necessary configure- and make-foo to make
> > Zero and Shark builds work with the build-infra machinery. With this,
> > Zero and Shark builds are as easy as:
> >
> > bash configure --with-jvm-variants=zero[shark]
> > make
> >
> > it will check for existence of libffi and llvm, and use pkg-config and
> > llvm-config to figure out all required variables. This is basically
> > adopted from jdk/make/jdk_generic_profile.sh, and now integrated into
> > the build.
> >
> A couple of comments:
>
> ARCH_DATA_MODEL is considered a legacy variable outside of hotspot. If
> you look in hotspot-spec.gmk.in, we set it there specifically for the
> hotspot build. The source for this value is in
> common/autoconf/platform.m4 and it seems to me that several of the
> values you are calculating should rather be set there (endian, libarch
> etc). Do any of these need special treatment because of the ZERO[SHARK]
> compiler? If not, I would like to have as many of them as possible just
> translated from existing variables in hotspot-spec.gmk and if possible
> handle the special cases in platform.m4.
Thanks for the review! I made the following changes:
- I moved all platform-foo to platform.m4, in
PLATFORM_SETUP_LEGACY_VARS. Little problem: in this section I don't know
about JVM_VARIANTS_ZERO yet, therefore I set those vars unconditionally.
(But I propagate them to Make conditionally, see below). *However* those
variables might actually be useful for non-Zero builds, if you look at
the places where they're used, in non-Zero builds we find hardcoded
values/strings for the various platforms, where the Zero way seems more
elegant here.
- I replaced ZERO_ENDIANNESS with the equivalent
OPENJDK_TARGET_CPU_ENDIAN.
- I replaced ARCH_DATA_MODEL with OPENJDK_TARGET_CPU_BITS.
- I replaced ZERO_LIBARCH with OPENJDK_TARGET_CPU_LEGACY_LIB.
- ZERO_ARCHFLAG is still needed for build on s390, to enable the correct
ABI (by setting -m31).
- ZERO_ARCHDEF is needed to get in the correct -DAMD64 or whatever
setting (which are otherwise hardcoded in the various platform_XXX.in
files in non-zero builds -- you/we might want to re-think this).
Those changes also require some changes in the hotspot tree. See webrevs
below.
Re: Mike's suggestion: I set the variables in spec.gmk conditionally
now. However, the resulting spec.gmk does have the conditions and
var-setting code still in it, i.e. the zero-related code does not
disappear.
> Where is INCLUDE_SA supposed to be set? I know it was handled in
> Defs-[os].gmk files in the old build, but in the new I would assume
> configure should be setting it.
it is set in jdk/common/Defs-$PLATFORM.gmk. As per David's suggestion, I
will not touch this for now. It is only required for images-builds... so
not super-critical - for the time being.
Webrevs:
http://cr.openjdk.java.net/~rkennke/zero-build-infra/webrev.03/
http://cr.openjdk.java.net/~rkennke/zero_build_infra_hotspot/webrev.01/
How's this now?
Best regards,
Roman
More information about the build-infra-dev
mailing list