--- jdk8/jdk/makefiles/Profiles.gmk 2013-03-28 16:57:56.137703554 -0400 +++ jdk8/jdk/makefiles/Profiles.gmk 2013-03-28 16:57:55.674699054 -0400 @@ -94,8 +94,11 @@ $(IMAGES_OUTPUTDIR)/lib/tools.jar \ $(IMAGES_OUTPUTDIR)/lib/ct.sym \ $(IMAGES_OUTPUTDIR)/src.zip \ - $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar \ - $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar + $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar + +ifeq ($(INCLUDE_SA),true) + ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar +endif ifeq ($(OPENJDK_TARGET_OS),solaris) ifndef OPENJDK --- jdk8/common/autoconf/hotspot-spec.gmk.in 2013-03-28 17:00:44.110332528 -0400 +++ jdk8/common/autoconf/hotspot-spec.gmk.in 2013-03-28 17:00:43.915330640 -0400 @@ -75,6 +75,19 @@ # If yes then this expands to _LP64:=1 @LP64@ +# Legacy settings for zero +ZERO_ENDIANNESS=$(OPENJDK_TARGET_CPU_ENDIAN) +ZERO_LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) +ZERO_ARCHDEF=@ZERO_ARCHDEF@ +ZERO_ARCHFLAG=@ZERO_ARCHFLAG@ +LIBFFI_CFLAGS=@LIBFFI_CFLAGS@ +LIBFFI_LIBS=@LIBFFI_LIBS@ + +# Legacy settings for zeroshark +LLVM_CFLAGS=@LLVM_CFLAGS@ +LLVM_LIBS=@LLVM_LIBS@ +LLVM_LDFLAGS=@LLVM_LDFLAGS@ + ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) ALT_EXPORT_PATH=$(HOTSPOT_DIST) --- jdk8/common/autoconf/libraries.m4 2013-03-28 17:00:45.905349901 -0400 +++ jdk8/common/autoconf/libraries.m4 2013-03-28 17:00:45.632347258 -0400 @@ -662,7 +662,7 @@ AC_MSG_CHECKING([how to link with libstdc++]) # If dynamic was requested, it's available since it would fail above otherwise. # If dynamic wasn't requested, go with static unless it isn't available. - if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then + if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then LIBCXX="$LIBCXX -lstdc++" LDCXX="$CXX" STATIC_CXX_SETTING="STATIC_CXX=false" @@ -676,6 +676,59 @@ fi AC_SUBST(STATIC_CXX_SETTING) +if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then + # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS + PKG_CHECK_MODULES([LIBFFI], [libffi]) + +fi + +if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then + AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config]) + + if test "x$LLVM_CONFIG" != xllvm-config; then + AC_MSG_ERROR([llvm-config not found in $PATH.]) + fi + + llvm_components="jit mcjit engine nativecodegen native" + unset LLVM_CFLAGS + for flag in $("$LLVM_CONFIG" --cxxflags); do + if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then + if test "${flag}" != "-D_DEBUG" ; then + if test "${LLVM_CFLAGS}" != "" ; then + LLVM_CFLAGS="${LLVM_CFLAGS} " + fi + LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" + fi + fi + done + llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') + LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" + + unset LLVM_LDFLAGS + for flag in $("${LLVM_CONFIG}" --ldflags); do + if echo "${flag}" | grep -q '^-L'; then + if test "${LLVM_LDFLAGS}" != ""; then + LLVM_LDFLAGS="${LLVM_LDFLAGS} " + fi + LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" + fi + done + + unset LLVM_LIBS + for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do + if echo "${flag}" | grep -q '^-l'; then + if test "${LLVM_LIBS}" != ""; then + LLVM_LIBS="${LLVM_LIBS} " + fi + LLVM_LIBS="${LLVM_LIBS}${flag}" + fi + done + + AC_SUBST(LLVM_CFLAGS) + AC_SUBST(LLVM_LDFLAGS) + AC_SUBST(LLVM_LIBS) +fi + # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" --- jdk8/common/autoconf/platform.m4 2013-03-28 17:00:47.585366160 -0400 +++ jdk8/common/autoconf/platform.m4 2013-03-28 17:00:47.389364263 -0400 @@ -332,6 +332,29 @@ DEFINE_CROSS_COMPILE_ARCH="" fi AC_SUBST(DEFINE_CROSS_COMPILE_ARCH) + + # Some Zero and Shark settings. + # ZERO_ARCHFLAG tells the compiler which mode to build for + case "${OPENJDK_TARGET_CPU}" in + s390) + ZERO_ARCHFLAG="-m31" + ;; + *) + ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" + esac + AC_SUBST(ZERO_ARCHFLAG) + + # ZERO_ARCHDEF is used to enable architecture-specific code + case "${OPENJDK_TARGET_CPU}" in + ppc*) ZERO_ARCHDEF=PPC ;; + s390*) ZERO_ARCHDEF=S390 ;; + sparc*) ZERO_ARCHDEF=SPARC ;; + x86_64*) ZERO_ARCHDEF=AMD64 ;; + x86) ZERO_ARCHDEF=IA32 ;; + *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) + esac + AC_SUBST(ZERO_ARCHDEF) + ]) AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], --- jdk8/common/autoconf/spec.gmk.in 2013-03-28 17:00:49.065380483 -0400 +++ jdk8/common/autoconf/spec.gmk.in 2013-03-28 17:00:48.870378596 -0400 @@ -634,6 +634,14 @@ # Name of Service Agent library SALIB_NAME=@SALIB_NAME@ +INCLUDE_SA:=true +ifeq ($(JVM_VARIANT_ZERO),true) + INCLUDE_SA:=false +endif +ifeq ($(JVM_VARIANT_ZEROSHARK),true) + INCLUDE_SA:=false +endif + OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@ OS_VERSION_MINOR:=@OS_VERSION_MINOR@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@