1.1 --- a/common/autoconf/generated-configure.sh Fri Apr 05 09:38:54 2013 +0200 1.2 +++ b/common/autoconf/generated-configure.sh Mon Apr 08 14:07:32 2013 -0400 1.3 @@ -609,6 +609,12 @@ 1.4 HOTSPOT_MAKE_ARGS 1.5 FIXPATH 1.6 LIBCXX 1.7 +LLVM_LIBS 1.8 +LLVM_LDFLAGS 1.9 +LLVM_CFLAGS 1.10 +LLVM_CONFIG 1.11 +LIBFFI_LIBS 1.12 +LIBFFI_CFLAGS 1.13 STATIC_CXX_SETTING 1.14 LIBDL 1.15 LIBM 1.16 @@ -811,6 +817,7 @@ 1.17 VARIANT 1.18 DEBUG_LEVEL 1.19 MACOSX_UNIVERSAL 1.20 +INCLUDE_SA 1.21 JVM_VARIANT_ZEROSHARK 1.22 JVM_VARIANT_ZERO 1.23 JVM_VARIANT_KERNEL 1.24 @@ -826,6 +833,8 @@ 1.25 SYS_ROOT 1.26 PATH_SEP 1.27 SRC_ROOT 1.28 +ZERO_ARCHDEF 1.29 +ZERO_ARCHFLAG 1.30 DEFINE_CROSS_COMPILE_ARCH 1.31 LP64 1.32 OPENJDK_TARGET_OS_API_DIR 1.33 @@ -1039,7 +1048,9 @@ 1.34 FREETYPE2_CFLAGS 1.35 FREETYPE2_LIBS 1.36 ALSA_CFLAGS 1.37 -ALSA_LIBS' 1.38 +ALSA_LIBS 1.39 +LIBFFI_CFLAGS 1.40 +LIBFFI_LIBS' 1.41 1.42 1.43 # Initialize some variables set by options. 1.44 @@ -1809,6 +1820,9 @@ 1.45 linker flags for FREETYPE2, overriding pkg-config 1.46 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config 1.47 ALSA_LIBS linker flags for ALSA, overriding pkg-config 1.48 + LIBFFI_CFLAGS 1.49 + C compiler flags for LIBFFI, overriding pkg-config 1.50 + LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config 1.51 1.52 Use these variables to override the choices made by `configure' or to help 1.53 it to find libraries and programs with nonstandard names/locations. 1.54 @@ -7084,6 +7098,29 @@ 1.55 fi 1.56 1.57 1.58 + # Some Zero and Shark settings. 1.59 + # ZERO_ARCHFLAG tells the compiler which mode to build for 1.60 + case "${OPENJDK_TARGET_CPU}" in 1.61 + s390) 1.62 + ZERO_ARCHFLAG="-m31" 1.63 + ;; 1.64 + *) 1.65 + ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" 1.66 + esac 1.67 + 1.68 + 1.69 + # ZERO_ARCHDEF is used to enable architecture-specific code 1.70 + case "${OPENJDK_TARGET_CPU}" in 1.71 + ppc*) ZERO_ARCHDEF=PPC ;; 1.72 + s390*) ZERO_ARCHDEF=S390 ;; 1.73 + sparc*) ZERO_ARCHDEF=SPARC ;; 1.74 + x86_64*) ZERO_ARCHDEF=AMD64 ;; 1.75 + x86) ZERO_ARCHDEF=IA32 ;; 1.76 + *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) 1.77 + esac 1.78 + 1.79 + 1.80 + 1.81 1.82 1.83 # Continue setting up basic stuff. Most remaining code require fundamental tools. 1.84 @@ -7694,6 +7731,15 @@ 1.85 1.86 1.87 1.88 +INCLUDE_SA=true 1.89 +if test "x$JVM_VARIANT_ZERO" = xtrue ; then 1.90 + INCLUDE_SA=false 1.91 +fi 1.92 +if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then 1.93 + INCLUDE_SA=false 1.94 +fi 1.95 + 1.96 + 1.97 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 1.98 MACOSX_UNIVERSAL="true" 1.99 fi 1.100 @@ -31693,7 +31739,7 @@ 1.101 $as_echo_n "checking how to link with libstdc++... " >&6; } 1.102 # If dynamic was requested, it's available since it would fail above otherwise. 1.103 # If dynamic wasn't requested, go with static unless it isn't available. 1.104 - if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then 1.105 + if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 1.106 LIBCXX="$LIBCXX -lstdc++" 1.107 LDCXX="$CXX" 1.108 STATIC_CXX_SETTING="STATIC_CXX=false" 1.109 @@ -31709,6 +31755,180 @@ 1.110 fi 1.111 1.112 1.113 +if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 1.114 + # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 1.115 + 1.116 +pkg_failed=no 1.117 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 1.118 +$as_echo_n "checking for LIBFFI... " >&6; } 1.119 + 1.120 +if test -n "$LIBFFI_CFLAGS"; then 1.121 + pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 1.122 + elif test -n "$PKG_CONFIG"; then 1.123 + if test -n "$PKG_CONFIG" && \ 1.124 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 1.125 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 1.126 + ac_status=$? 1.127 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1.128 + test $ac_status = 0; }; then 1.129 + pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 1.130 +else 1.131 + pkg_failed=yes 1.132 +fi 1.133 + else 1.134 + pkg_failed=untried 1.135 +fi 1.136 +if test -n "$LIBFFI_LIBS"; then 1.137 + pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 1.138 + elif test -n "$PKG_CONFIG"; then 1.139 + if test -n "$PKG_CONFIG" && \ 1.140 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 1.141 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 1.142 + ac_status=$? 1.143 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1.144 + test $ac_status = 0; }; then 1.145 + pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 1.146 +else 1.147 + pkg_failed=yes 1.148 +fi 1.149 + else 1.150 + pkg_failed=untried 1.151 +fi 1.152 + 1.153 + 1.154 + 1.155 +if test $pkg_failed = yes; then 1.156 + 1.157 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1.158 + _pkg_short_errors_supported=yes 1.159 +else 1.160 + _pkg_short_errors_supported=no 1.161 +fi 1.162 + if test $_pkg_short_errors_supported = yes; then 1.163 + LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 1.164 + else 1.165 + LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 1.166 + fi 1.167 + # Put the nasty error message in config.log where it belongs 1.168 + echo "$LIBFFI_PKG_ERRORS" >&5 1.169 + 1.170 + as_fn_error $? "Package requirements (libffi) were not met: 1.171 + 1.172 +$LIBFFI_PKG_ERRORS 1.173 + 1.174 +Consider adjusting the PKG_CONFIG_PATH environment variable if you 1.175 +installed software in a non-standard prefix. 1.176 + 1.177 +Alternatively, you may set the environment variables LIBFFI_CFLAGS 1.178 +and LIBFFI_LIBS to avoid the need to call pkg-config. 1.179 +See the pkg-config man page for more details. 1.180 +" "$LINENO" 5 1.181 +elif test $pkg_failed = untried; then 1.182 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1.183 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1.184 +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 1.185 +is in your PATH or set the PKG_CONFIG environment variable to the full 1.186 +path to pkg-config. 1.187 + 1.188 +Alternatively, you may set the environment variables LIBFFI_CFLAGS 1.189 +and LIBFFI_LIBS to avoid the need to call pkg-config. 1.190 +See the pkg-config man page for more details. 1.191 + 1.192 +To get pkg-config, see <http://pkg-config.freedesktop.org/>. 1.193 +See \`config.log' for more details" "$LINENO" 5; } 1.194 +else 1.195 + LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 1.196 + LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 1.197 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 1.198 +$as_echo "yes" >&6; } 1.199 + : 1.200 +fi 1.201 + 1.202 +fi 1.203 + 1.204 +if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 1.205 + # Extract the first word of "llvm-config", so it can be a program name with args. 1.206 +set dummy llvm-config; ac_word=$2 1.207 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1.208 +$as_echo_n "checking for $ac_word... " >&6; } 1.209 +if ${ac_cv_prog_LLVM_CONFIG+:} false; then : 1.210 + $as_echo_n "(cached) " >&6 1.211 +else 1.212 + if test -n "$LLVM_CONFIG"; then 1.213 + ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 1.214 +else 1.215 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1.216 +for as_dir in $PATH 1.217 +do 1.218 + IFS=$as_save_IFS 1.219 + test -z "$as_dir" && as_dir=. 1.220 + for ac_exec_ext in '' $ac_executable_extensions; do 1.221 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 1.222 + ac_cv_prog_LLVM_CONFIG="llvm-config" 1.223 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 1.224 + break 2 1.225 + fi 1.226 +done 1.227 + done 1.228 +IFS=$as_save_IFS 1.229 + 1.230 +fi 1.231 +fi 1.232 +LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 1.233 +if test -n "$LLVM_CONFIG"; then 1.234 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 1.235 +$as_echo "$LLVM_CONFIG" >&6; } 1.236 +else 1.237 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1.238 +$as_echo "no" >&6; } 1.239 +fi 1.240 + 1.241 + 1.242 + 1.243 + if test "x$LLVM_CONFIG" != xllvm-config; then 1.244 + as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 1.245 + fi 1.246 + 1.247 + llvm_components="jit mcjit engine nativecodegen native" 1.248 + unset LLVM_CFLAGS 1.249 + for flag in $("$LLVM_CONFIG" --cxxflags); do 1.250 + if echo "${flag}" | grep -q '^-[ID]'; then 1.251 + if test "${flag}" != "-D_DEBUG" ; then 1.252 + if test "${LLVM_CFLAGS}" != "" ; then 1.253 + LLVM_CFLAGS="${LLVM_CFLAGS} " 1.254 + fi 1.255 + LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 1.256 + fi 1.257 + fi 1.258 + done 1.259 + llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 1.260 + LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 1.261 + 1.262 + unset LLVM_LDFLAGS 1.263 + for flag in $("${LLVM_CONFIG}" --ldflags); do 1.264 + if echo "${flag}" | grep -q '^-L'; then 1.265 + if test "${LLVM_LDFLAGS}" != ""; then 1.266 + LLVM_LDFLAGS="${LLVM_LDFLAGS} " 1.267 + fi 1.268 + LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 1.269 + fi 1.270 + done 1.271 + 1.272 + unset LLVM_LIBS 1.273 + for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 1.274 + if echo "${flag}" | grep -q '^-l'; then 1.275 + if test "${LLVM_LIBS}" != ""; then 1.276 + LLVM_LIBS="${LLVM_LIBS} " 1.277 + fi 1.278 + LLVM_LIBS="${LLVM_LIBS}${flag}" 1.279 + fi 1.280 + done 1.281 + 1.282 + 1.283 + 1.284 + 1.285 +fi 1.286 + 1.287 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 1.288 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 1.289 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"