1.1 --- a/common/autoconf/toolchain.m4 Tue Jun 04 10:23:37 2013 +0200 1.2 +++ b/common/autoconf/toolchain.m4 Tue Jun 04 10:36:00 2013 +0200 1.3 @@ -36,7 +36,7 @@ 1.4 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null 1.5 if test $? -ne 0; then 1.6 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` 1.7 - 1.8 + 1.9 AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler.]) 1.10 AC_MSG_NOTICE([The result from running with -V was: "$COMPILER_VERSION_TEST" and with --version: "$GCC_VERSION_TEST"]) 1.11 AC_MSG_ERROR([Sun Studio compiler is required. Try setting --with-tools-dir.]) 1.12 @@ -69,7 +69,7 @@ 1.13 AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"]) 1.14 AC_MSG_ERROR([GCC compiler is required. Try setting --with-tools-dir.]) 1.15 fi 1.16 - 1.17 + 1.18 # First line typically looks something like: 1.19 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 1.20 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/p"` 1.21 @@ -142,7 +142,7 @@ 1.22 BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) 1.23 AC_MSG_RESULT([$TEST_COMPILER]) 1.24 AC_MSG_CHECKING([if $1 is disguised ccache]) 1.25 - 1.26 + 1.27 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` 1.28 if test "x$COMPILER_BASENAME" = "xccache"; then 1.29 AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) 1.30 @@ -226,11 +226,11 @@ 1.31 ], 1.32 []) 1.33 1.34 -if test "x$SYS_ROOT" != "x/" ; then 1.35 +if test "x$SYS_ROOT" != "x/" ; then 1.36 CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" 1.37 CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" 1.38 - OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 1.39 - OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 1.40 + OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 1.41 + OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 1.42 CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" 1.43 LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" 1.44 fi 1.45 @@ -330,7 +330,7 @@ 1.46 COMPILER_NAME=gcc 1.47 COMPILER_TYPE=CC 1.48 AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [ 1.49 - # For now, assume that we are always compiling using cl.exe. 1.50 + # For now, assume that we are always compiling using cl.exe. 1.51 CC_OUT_OPTION=-Fo 1.52 EXE_OUT_OPTION=-out: 1.53 LD_OUT_OPTION=-out: 1.54 @@ -491,7 +491,7 @@ 1.55 1.56 ############################################################################### 1.57 # 1.58 -# How to compile shared libraries. 1.59 +# How to compile shared libraries. 1.60 # 1.61 1.62 if test "x$GCC" = xyes; then 1.63 @@ -525,7 +525,7 @@ 1.64 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 1.65 SHARED_LIBRARY_SUFFIX='.dylib' 1.66 EXE_SUFFIX='' 1.67 - SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' 1.68 + SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' 1.69 SET_SHARED_LIBRARY_MAPFILE='' 1.70 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 1.71 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 1.72 @@ -676,7 +676,7 @@ 1.73 # Use single precision floating point with 'float' 1.74 CC_HIGHEST="$CC_HIGHEST -fsingle" 1.75 # Assume memory references via basic pointer types do not alias 1.76 - # (Source with excessing pointer casting and data access with mixed 1.77 + # (Source with excessing pointer casting and data access with mixed 1.78 # pointer types are not recommended) 1.79 CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" 1.80 # Use intrinsic or inline versions for math/std functions 1.81 @@ -892,7 +892,7 @@ 1.82 fi 1.83 if test "x$OPENJDK_TARGET_OS" = xmacosx; then 1.84 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" 1.85 - # Setting these parameters makes it an error to link to macosx APIs that are 1.86 + # Setting these parameters makes it an error to link to macosx APIs that are 1.87 # newer than the given OS version and makes the linked binaries compatible even 1.88 # if built on a newer version of the OS. 1.89 # The expected format is X.Y.Z 1.90 @@ -940,12 +940,12 @@ 1.91 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 1.92 # is identical for client and server? Yes. Which is picked at runtime (client or server)? 1.93 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 1.94 -# libraries will link to whatever is in memory. Yuck. 1.95 +# libraries will link to whatever is in memory. Yuck. 1.96 # 1.97 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 1.98 if test "x$COMPILER_NAME" = xcl; then 1.99 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" 1.100 - if test "x$OPENJDK_TARGET_CPU" = xx86; then 1.101 + if test "x$OPENJDK_TARGET_CPU" = xx86; then 1.102 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" 1.103 fi 1.104 # TODO: make -debug optional "--disable-full-debug-symbols" 1.105 @@ -965,7 +965,7 @@ 1.106 if test -n "$HAS_GNU_HASH"; then 1.107 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " 1.108 fi 1.109 - if test "x$OPENJDK_TARGET_OS" = xlinux; then 1.110 + if test "x$OPENJDK_TARGET_OS" = xlinux; then 1.111 # And since we now know that the linker is gnu, then add -z defs, to forbid 1.112 # undefined symbols in object files. 1.113 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" 1.114 @@ -1006,7 +1006,7 @@ 1.115 1.116 # Adjust flags according to debug level. 1.117 case $DEBUG_LEVEL in 1.118 - fastdebug ) 1.119 + fastdebug ) 1.120 CFLAGS="$CFLAGS $D_FLAG" 1.121 JAVAC_FLAGS="$JAVAC_FLAGS -g" 1.122 ;; 1.123 @@ -1018,9 +1018,9 @@ 1.124 CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 1.125 JAVAC_FLAGS="$JAVAC_FLAGS -g" 1.126 ;; 1.127 -esac 1.128 +esac 1.129 1.130 - 1.131 + 1.132 AC_SUBST(CFLAGS_JDKLIB) 1.133 AC_SUBST(CFLAGS_JDKEXE) 1.134 1.135 @@ -1092,28 +1092,45 @@ 1.136 AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG) 1.137 ]) 1.138 1.139 -# Setup the JTREG paths 1.140 -AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG], 1.141 -[ 1.142 - AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg], 1.143 - [Regression Test Harness @<:@probed@:>@])]) 1.144 - 1.145 - AC_MSG_CHECKING([for JTReg Regression Test Harness]) 1.146 - 1.147 - if test "x$with_jtreg" != x; then 1.148 - JT_HOME="$with_jtreg" 1.149 - BASIC_FIXUP_PATH([JT_HOME]) 1.150 - AC_MSG_RESULT($JT_HOME) 1.151 - 1.152 - # jtreg win32 script works for everybody 1.153 - JTREGEXE="$JT_HOME/win32/bin/jtreg" 1.154 - if test ! -f "$JTREGEXE"; then 1.155 - AC_MSG_ERROR([JTReg executable does not exist: $JTREGEXE]) 1.156 +# Setup the JTREG paths 1.157 +AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG], 1.158 +[ 1.159 + AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg], 1.160 + [Regression Test Harness @<:@probed@:>@])], 1.161 + [], 1.162 + [with_jtreg=no]) 1.163 + 1.164 + if test "x$with_jtreg" = xno; then 1.165 + # jtreg disabled 1.166 + AC_MSG_CHECKING([for jtreg]) 1.167 + AC_MSG_RESULT(no) 1.168 + else 1.169 + if test "x$with_jtreg" != xyes; then 1.170 + # with path specified. 1.171 + JT_HOME="$with_jtreg" 1.172 fi 1.173 - else 1.174 - AC_MSG_RESULT(no) 1.175 - fi 1.176 - 1.177 - AC_SUBST(JT_HOME) 1.178 - AC_SUBST(JTREGEXE) 1.179 + 1.180 + if test "x$JT_HOME" != x; then 1.181 + AC_MSG_CHECKING([for jtreg]) 1.182 + 1.183 + # use JT_HOME enviroment var. 1.184 + BASIC_FIXUP_PATH([JT_HOME]) 1.185 + 1.186 + # jtreg win32 script works for everybody 1.187 + JTREGEXE="$JT_HOME/win32/bin/jtreg" 1.188 + 1.189 + if test ! -f "$JTREGEXE"; then 1.190 + AC_MSG_ERROR([JTReg executable does not exist: $JTREGEXE]) 1.191 + fi 1.192 + 1.193 + AC_MSG_RESULT($JTREGEXE) 1.194 + else 1.195 + # try to find jtreg on path 1.196 + BASIC_REQUIRE_PROG(JTREGEXE, jtreg) 1.197 + JT_HOME="`$DIRNAME $JTREGEXE`" 1.198 + fi 1.199 + fi 1.200 + 1.201 + AC_SUBST(JT_HOME) 1.202 + AC_SUBST(JTREGEXE) 1.203 ])