Fri, 23 Jan 2015 14:52:26 -0800
Merge
common/autoconf/generated-configure.sh | file | annotate | diff | comparison | revisions | |
common/autoconf/jdk-options.m4 | file | annotate | diff | comparison | revisions |
1.1 --- a/common/autoconf/basics.m4 Thu Jan 22 14:39:36 2015 +0400 1.2 +++ b/common/autoconf/basics.m4 Fri Jan 23 14:52:26 2015 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 # 1.5 -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 1.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 # 1.9 # This code is free software; you can redistribute it and/or modify it 1.10 @@ -386,6 +386,12 @@ 1.11 [TOOLS_DIR=$with_tools_dir] 1.12 ) 1.13 1.14 + # Xcode version will be validated later 1.15 + AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path], 1.16 + [explicit path to Xcode 4 (generally for building on 10.9 and later)])], 1.17 + [XCODE_PATH=$with_xcode_path] 1.18 + ) 1.19 + 1.20 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], 1.21 [use this directory as base for tools-dir and sys-root (for cross-compiling)])], 1.22 [ 1.23 @@ -634,10 +640,6 @@ 1.24 # We can build without it. 1.25 LDD="true" 1.26 fi 1.27 - AC_PATH_PROG(OTOOL, otool) 1.28 - if test "x$OTOOL" = "x"; then 1.29 - OTOOL="true" 1.30 - fi 1.31 AC_PATH_PROGS(READELF, [readelf greadelf]) 1.32 AC_PATH_PROG(HG, hg) 1.33 AC_PATH_PROG(STAT, stat)
2.1 --- a/common/autoconf/generated-configure.sh Thu Jan 22 14:39:36 2015 +0400 2.2 +++ b/common/autoconf/generated-configure.sh Fri Jan 23 14:52:26 2015 -0800 2.3 @@ -711,11 +711,11 @@ 2.4 COMPILER_NAME 2.5 JT_HOME 2.6 JTREGEXE 2.7 -LIPO 2.8 ac_ct_OBJDUMP 2.9 OBJDUMP 2.10 ac_ct_OBJCOPY 2.11 OBJCOPY 2.12 +OTOOL 2.13 MCS 2.14 STRIP 2.15 GNM 2.16 @@ -762,6 +762,9 @@ 2.17 PROPER_COMPILER_CC 2.18 POTENTIAL_CC 2.19 TOOLS_DIR_CC 2.20 +SDKPATH 2.21 +XCODEBUILD 2.22 +SET_DEVELOPER_DIR 2.23 BUILD_LD 2.24 BUILD_CXX 2.25 BUILD_CC 2.26 @@ -834,7 +837,6 @@ 2.27 STAT 2.28 HG 2.29 READELF 2.30 -OTOOL 2.31 LDD 2.32 ZIP 2.33 UNZIP 2.34 @@ -1006,6 +1008,7 @@ 2.35 with_target_bits 2.36 with_sys_root 2.37 with_tools_dir 2.38 +with_xcode_path 2.39 with_devkit 2.40 enable_openjdk_only 2.41 with_jdk_variant 2.42 @@ -1752,6 +1755,8 @@ 2.43 cross-compiling) 2.44 --with-tools-dir search this directory for compilers and tools (for 2.45 cross-compiling) 2.46 + --with-xcode-path explicit path to Xcode 4 (generally for building on 2.47 + 10.9 and later) 2.48 --with-devkit use this directory as base for tools-dir and 2.49 sys-root (for cross-compiling) 2.50 --with-jdk-variant JDK variant to build (normal) [normal] 2.51 @@ -3108,7 +3113,7 @@ 2.52 2.53 # Include these first... 2.54 # 2.55 -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 2.56 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 2.57 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.58 # 2.59 # This code is free software; you can redistribute it and/or modify it 2.60 @@ -3624,7 +3629,7 @@ 2.61 2.62 2.63 # 2.64 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2.65 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 2.66 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.67 # 2.68 # This code is free software; you can redistribute it and/or modify it 2.69 @@ -3764,7 +3769,7 @@ 2.70 2.71 2.72 # 2.73 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2.74 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 2.75 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.76 # 2.77 # This code is free software; you can redistribute it and/or modify it 2.78 @@ -3872,7 +3877,7 @@ 2.79 #CUSTOM_AUTOCONF_INCLUDE 2.80 2.81 # Do not change or remove the following line, it is needed for consistency checks: 2.82 -DATE_WHEN_GENERATED=1416326200 2.83 +DATE_WHEN_GENERATED=1421450260 2.84 2.85 ############################################################################### 2.86 # 2.87 @@ -7603,6 +7608,15 @@ 2.88 fi 2.89 2.90 2.91 + # Xcode version will be validated later 2.92 + 2.93 +# Check whether --with-xcode-path was given. 2.94 +if test "${with_xcode_path+set}" = set; then : 2.95 + withval=$with_xcode_path; XCODE_PATH=$with_xcode_path 2.96 + 2.97 +fi 2.98 + 2.99 + 2.100 2.101 # Check whether --with-devkit was given. 2.102 if test "${with_devkit+set}" = set; then : 2.103 @@ -7960,7 +7974,7 @@ 2.104 2.105 2.106 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 2.107 - MACOSX_UNIVERSAL="true" 2.108 + MACOSX_UNIVERSAL="false" 2.109 fi 2.110 2.111 2.112 @@ -10321,49 +10335,6 @@ 2.113 # We can build without it. 2.114 LDD="true" 2.115 fi 2.116 - # Extract the first word of "otool", so it can be a program name with args. 2.117 -set dummy otool; ac_word=$2 2.118 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.119 -$as_echo_n "checking for $ac_word... " >&6; } 2.120 -if ${ac_cv_path_OTOOL+:} false; then : 2.121 - $as_echo_n "(cached) " >&6 2.122 -else 2.123 - case $OTOOL in 2.124 - [\\/]* | ?:[\\/]*) 2.125 - ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path. 2.126 - ;; 2.127 - *) 2.128 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.129 -for as_dir in $PATH 2.130 -do 2.131 - IFS=$as_save_IFS 2.132 - test -z "$as_dir" && as_dir=. 2.133 - for ac_exec_ext in '' $ac_executable_extensions; do 2.134 - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.135 - ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext" 2.136 - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.137 - break 2 2.138 - fi 2.139 -done 2.140 - done 2.141 -IFS=$as_save_IFS 2.142 - 2.143 - ;; 2.144 -esac 2.145 -fi 2.146 -OTOOL=$ac_cv_path_OTOOL 2.147 -if test -n "$OTOOL"; then 2.148 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 2.149 -$as_echo "$OTOOL" >&6; } 2.150 -else 2.151 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.152 -$as_echo "no" >&6; } 2.153 -fi 2.154 - 2.155 - 2.156 - if test "x$OTOOL" = "x"; then 2.157 - OTOOL="true" 2.158 - fi 2.159 for ac_prog in readelf greadelf 2.160 do 2.161 # Extract the first word of "$ac_prog", so it can be a program name with args. 2.162 @@ -19247,6 +19218,132 @@ 2.163 PATH=$TOOLS_DIR:$PATH 2.164 fi 2.165 2.166 + # Before we locate the compilers, we need to sanitize the Xcode build environment 2.167 + if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 2.168 + # determine path to Xcode developer directory 2.169 + # can be empty in which case all the tools will rely on a sane Xcode 4 installation 2.170 + SET_DEVELOPER_DIR= 2.171 + 2.172 + if test -n "$XCODE_PATH"; then 2.173 + DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer 2.174 + fi 2.175 + 2.176 + # DEVELOPER_DIR could also be provided directly 2.177 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5 2.178 +$as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; } 2.179 + if test -n "$DEVELOPER_DIR"; then 2.180 + if test ! -d "$DEVELOPER_DIR"; then 2.181 + as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path" "$LINENO" 5 2.182 + fi 2.183 + if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then 2.184 + as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5 2.185 + fi 2.186 + # make it visible to all the tools immediately 2.187 + export DEVELOPER_DIR 2.188 + SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR" 2.189 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5 2.190 +$as_echo "yes ($DEVELOPER_DIR)" >&6; } 2.191 + else 2.192 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.193 +$as_echo "no" >&6; } 2.194 + fi 2.195 + 2.196 + 2.197 + # Extract the first word of "xcodebuild", so it can be a program name with args. 2.198 +set dummy xcodebuild; ac_word=$2 2.199 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.200 +$as_echo_n "checking for $ac_word... " >&6; } 2.201 +if ${ac_cv_path_XCODEBUILD+:} false; then : 2.202 + $as_echo_n "(cached) " >&6 2.203 +else 2.204 + case $XCODEBUILD in 2.205 + [\\/]* | ?:[\\/]*) 2.206 + ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path. 2.207 + ;; 2.208 + *) 2.209 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.210 +for as_dir in $PATH 2.211 +do 2.212 + IFS=$as_save_IFS 2.213 + test -z "$as_dir" && as_dir=. 2.214 + for ac_exec_ext in '' $ac_executable_extensions; do 2.215 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.216 + ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext" 2.217 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.218 + break 2 2.219 + fi 2.220 +done 2.221 + done 2.222 +IFS=$as_save_IFS 2.223 + 2.224 + ;; 2.225 +esac 2.226 +fi 2.227 +XCODEBUILD=$ac_cv_path_XCODEBUILD 2.228 +if test -n "$XCODEBUILD"; then 2.229 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5 2.230 +$as_echo "$XCODEBUILD" >&6; } 2.231 +else 2.232 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.233 +$as_echo "no" >&6; } 2.234 +fi 2.235 + 2.236 + 2.237 + if test -z "$XCODEBUILD"; then 2.238 + as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5 2.239 + fi 2.240 + 2.241 + # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later 2.242 + XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'` 2.243 + XC_VERSION_PARTS=( ${XCODE_VERSION//./ } ) 2.244 + if test ! "${XC_VERSION_PARTS[0]}" = "4"; then 2.245 + as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select." "$LINENO" 5 2.246 + fi 2.247 + 2.248 + # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to 2.249 + # clang and clang++, which will break the build. So handle that here if we need to. 2.250 + if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then 2.251 + # use xcrun to find the real gcc and add it's directory to PATH 2.252 + # then autoconf magic will find it 2.253 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5 2.254 +$as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;} 2.255 + XCODE_BIN_PATH=$(dirname `xcrun -find gcc`) 2.256 + PATH="$XCODE_BIN_PATH":$PATH 2.257 + fi 2.258 + 2.259 + # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools 2.260 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5 2.261 +$as_echo_n "checking Determining Xcode SDK path... " >&6; } 2.262 + # allow SDKNAME to be set to override the default SDK selection 2.263 + SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'` 2.264 + if test -n "$SDKPATH"; then 2.265 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5 2.266 +$as_echo "$SDKPATH" >&6; } 2.267 + else 2.268 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5 2.269 +$as_echo "(none, will use system headers and frameworks)" >&6; } 2.270 + fi 2.271 + 2.272 + 2.273 + # Perform a basic sanity test 2.274 + if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then 2.275 + as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5 2.276 + fi 2.277 + 2.278 + # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++ 2.279 + if test -n "$SDKPATH"; then 2.280 + # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks 2.281 + CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" 2.282 + CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" 2.283 + LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" 2.284 + fi 2.285 + 2.286 + # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework 2.287 + # setting this here means it doesn't have to be peppered throughout the forest 2.288 + CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" 2.289 + CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" 2.290 + LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" 2.291 + fi 2.292 2.293 ### Locate C compiler (CC) 2.294 2.295 @@ -27066,6 +27163,49 @@ 2.296 fi 2.297 2.298 elif test "x$OPENJDK_TARGET_OS" != xwindows; then 2.299 + # Extract the first word of "otool", so it can be a program name with args. 2.300 +set dummy otool; ac_word=$2 2.301 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.302 +$as_echo_n "checking for $ac_word... " >&6; } 2.303 +if ${ac_cv_path_OTOOL+:} false; then : 2.304 + $as_echo_n "(cached) " >&6 2.305 +else 2.306 + case $OTOOL in 2.307 + [\\/]* | ?:[\\/]*) 2.308 + ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path. 2.309 + ;; 2.310 + *) 2.311 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.312 +for as_dir in $PATH 2.313 +do 2.314 + IFS=$as_save_IFS 2.315 + test -z "$as_dir" && as_dir=. 2.316 + for ac_exec_ext in '' $ac_executable_extensions; do 2.317 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.318 + ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext" 2.319 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.320 + break 2 2.321 + fi 2.322 +done 2.323 + done 2.324 +IFS=$as_save_IFS 2.325 + 2.326 + ;; 2.327 +esac 2.328 +fi 2.329 +OTOOL=$ac_cv_path_OTOOL 2.330 +if test -n "$OTOOL"; then 2.331 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 2.332 +$as_echo "$OTOOL" >&6; } 2.333 +else 2.334 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.335 +$as_echo "no" >&6; } 2.336 +fi 2.337 + 2.338 + 2.339 + if test "x$OTOOL" = "x"; then 2.340 + OTOOL="true" 2.341 + fi 2.342 if test -n "$ac_tool_prefix"; then 2.343 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. 2.344 set dummy ${ac_tool_prefix}nm; ac_word=$2 2.345 @@ -28530,315 +28670,6 @@ 2.346 2.347 fi 2.348 2.349 - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 2.350 - # Extract the first word of "lipo", so it can be a program name with args. 2.351 -set dummy lipo; ac_word=$2 2.352 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.353 -$as_echo_n "checking for $ac_word... " >&6; } 2.354 -if ${ac_cv_path_LIPO+:} false; then : 2.355 - $as_echo_n "(cached) " >&6 2.356 -else 2.357 - case $LIPO in 2.358 - [\\/]* | ?:[\\/]*) 2.359 - ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. 2.360 - ;; 2.361 - *) 2.362 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.363 -for as_dir in $PATH 2.364 -do 2.365 - IFS=$as_save_IFS 2.366 - test -z "$as_dir" && as_dir=. 2.367 - for ac_exec_ext in '' $ac_executable_extensions; do 2.368 - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.369 - ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" 2.370 - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.371 - break 2 2.372 - fi 2.373 -done 2.374 - done 2.375 -IFS=$as_save_IFS 2.376 - 2.377 - ;; 2.378 -esac 2.379 -fi 2.380 -LIPO=$ac_cv_path_LIPO 2.381 -if test -n "$LIPO"; then 2.382 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 2.383 -$as_echo "$LIPO" >&6; } 2.384 -else 2.385 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.386 -$as_echo "no" >&6; } 2.387 -fi 2.388 - 2.389 - 2.390 - 2.391 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.392 - 2.393 - # First separate the path from the arguments. This will split at the first 2.394 - # space. 2.395 - complete="$LIPO" 2.396 - path="${complete%% *}" 2.397 - tmp="$complete EOL" 2.398 - arguments="${tmp#* }" 2.399 - 2.400 - # Input might be given as Windows format, start by converting to 2.401 - # unix format. 2.402 - new_path=`$CYGPATH -u "$path"` 2.403 - 2.404 - # Now try to locate executable using which 2.405 - new_path=`$WHICH "$new_path" 2> /dev/null` 2.406 - # bat and cmd files are not always considered executable in cygwin causing which 2.407 - # to not find them 2.408 - if test "x$new_path" = x \ 2.409 - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 2.410 - && test "x`$LS \"$path\" 2>/dev/null`" != x; then 2.411 - new_path=`$CYGPATH -u "$path"` 2.412 - fi 2.413 - if test "x$new_path" = x; then 2.414 - # Oops. Which didn't find the executable. 2.415 - # The splitting of arguments from the executable at a space might have been incorrect, 2.416 - # since paths with space are more likely in Windows. Give it another try with the whole 2.417 - # argument. 2.418 - path="$complete" 2.419 - arguments="EOL" 2.420 - new_path=`$CYGPATH -u "$path"` 2.421 - new_path=`$WHICH "$new_path" 2> /dev/null` 2.422 - # bat and cmd files are not always considered executable in cygwin causing which 2.423 - # to not find them 2.424 - if test "x$new_path" = x \ 2.425 - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 2.426 - && test "x`$LS \"$path\" 2>/dev/null`" != x; then 2.427 - new_path=`$CYGPATH -u "$path"` 2.428 - fi 2.429 - if test "x$new_path" = x; then 2.430 - # It's still not found. Now this is an unrecoverable error. 2.431 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 2.432 -$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 2.433 - has_space=`$ECHO "$complete" | $GREP " "` 2.434 - if test "x$has_space" != x; then 2.435 - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 2.436 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 2.437 - fi 2.438 - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 2.439 - fi 2.440 - fi 2.441 - 2.442 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.443 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.444 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.445 - # "foo.exe" is OK but "foo" is an error. 2.446 - # 2.447 - # This test is therefore slightly more accurate than "test -f" to check for file presence. 2.448 - # It is also a way to make sure we got the proper file name for the real test later on. 2.449 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.450 - if test "x$test_shortpath" = x; then 2.451 - # Short path failed, file does not exist as specified. 2.452 - # Try adding .exe or .cmd 2.453 - if test -f "${new_path}.exe"; then 2.454 - input_to_shortpath="${new_path}.exe" 2.455 - elif test -f "${new_path}.cmd"; then 2.456 - input_to_shortpath="${new_path}.cmd" 2.457 - else 2.458 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 2.459 -$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} 2.460 - { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 2.461 -$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} 2.462 - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 2.463 - fi 2.464 - else 2.465 - input_to_shortpath="$new_path" 2.466 - fi 2.467 - 2.468 - # Call helper function which possibly converts this using DOS-style short mode. 2.469 - # If so, the updated path is stored in $new_path. 2.470 - new_path="$input_to_shortpath" 2.471 - 2.472 - input_path="$input_to_shortpath" 2.473 - # Check if we need to convert this using DOS-style short mode. If the path 2.474 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.475 - # take no chances and rewrite it. 2.476 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.477 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.478 - if test "x$has_forbidden_chars" != x; then 2.479 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.480 - shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.481 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.482 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.483 - # Going to short mode and back again did indeed matter. Since short mode is 2.484 - # case insensitive, let's make it lowercase to improve readability. 2.485 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.486 - # Now convert it back to Unix-stile (cygpath) 2.487 - input_path=`$CYGPATH -u "$shortmode_path"` 2.488 - new_path="$input_path" 2.489 - fi 2.490 - fi 2.491 - 2.492 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.493 - if test "x$test_cygdrive_prefix" = x; then 2.494 - # As a simple fix, exclude /usr/bin since it's not a real path. 2.495 - if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then 2.496 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.497 - # a path prefixed by /cygdrive for fixpath to work. 2.498 - new_path="$CYGWIN_ROOT_PATH$input_path" 2.499 - fi 2.500 - fi 2.501 - 2.502 - # remove trailing .exe if any 2.503 - new_path="${new_path/%.exe/}" 2.504 - 2.505 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.506 - 2.507 - # First separate the path from the arguments. This will split at the first 2.508 - # space. 2.509 - complete="$LIPO" 2.510 - path="${complete%% *}" 2.511 - tmp="$complete EOL" 2.512 - arguments="${tmp#* }" 2.513 - 2.514 - # Input might be given as Windows format, start by converting to 2.515 - # unix format. 2.516 - new_path="$path" 2.517 - 2.518 - windows_path="$new_path" 2.519 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.520 - unix_path=`$CYGPATH -u "$windows_path"` 2.521 - new_path="$unix_path" 2.522 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.523 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.524 - new_path="$unix_path" 2.525 - fi 2.526 - 2.527 - 2.528 - # Now try to locate executable using which 2.529 - new_path=`$WHICH "$new_path" 2> /dev/null` 2.530 - 2.531 - if test "x$new_path" = x; then 2.532 - # Oops. Which didn't find the executable. 2.533 - # The splitting of arguments from the executable at a space might have been incorrect, 2.534 - # since paths with space are more likely in Windows. Give it another try with the whole 2.535 - # argument. 2.536 - path="$complete" 2.537 - arguments="EOL" 2.538 - new_path="$path" 2.539 - 2.540 - windows_path="$new_path" 2.541 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.542 - unix_path=`$CYGPATH -u "$windows_path"` 2.543 - new_path="$unix_path" 2.544 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.545 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.546 - new_path="$unix_path" 2.547 - fi 2.548 - 2.549 - 2.550 - new_path=`$WHICH "$new_path" 2> /dev/null` 2.551 - 2.552 - if test "x$new_path" = x; then 2.553 - # It's still not found. Now this is an unrecoverable error. 2.554 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 2.555 -$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 2.556 - has_space=`$ECHO "$complete" | $GREP " "` 2.557 - if test "x$has_space" != x; then 2.558 - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 2.559 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} 2.560 - fi 2.561 - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 2.562 - fi 2.563 - fi 2.564 - 2.565 - # Now new_path has a complete unix path to the binary 2.566 - if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then 2.567 - # Keep paths in /bin as-is, but remove trailing .exe if any 2.568 - new_path="${new_path/%.exe/}" 2.569 - # Do not save /bin paths to all_fixpath_prefixes! 2.570 - else 2.571 - # Not in mixed or Windows style, start by that. 2.572 - new_path=`cmd //c echo $new_path` 2.573 - 2.574 - input_path="$new_path" 2.575 - # Check if we need to convert this using DOS-style short mode. If the path 2.576 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.577 - # take no chances and rewrite it. 2.578 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.579 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.580 - if test "x$has_forbidden_chars" != x; then 2.581 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.582 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.583 - fi 2.584 - 2.585 - # Output is in $new_path 2.586 - 2.587 - windows_path="$new_path" 2.588 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.589 - unix_path=`$CYGPATH -u "$windows_path"` 2.590 - new_path="$unix_path" 2.591 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.592 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.593 - new_path="$unix_path" 2.594 - fi 2.595 - 2.596 - # remove trailing .exe if any 2.597 - new_path="${new_path/%.exe/}" 2.598 - 2.599 - # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.600 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.601 - fi 2.602 - 2.603 - else 2.604 - # We're on a posix platform. Hooray! :) 2.605 - # First separate the path from the arguments. This will split at the first 2.606 - # space. 2.607 - complete="$LIPO" 2.608 - path="${complete%% *}" 2.609 - tmp="$complete EOL" 2.610 - arguments="${tmp#* }" 2.611 - 2.612 - # Cannot rely on the command "which" here since it doesn't always work. 2.613 - is_absolute_path=`$ECHO "$path" | $GREP ^/` 2.614 - if test -z "$is_absolute_path"; then 2.615 - # Path to executable is not absolute. Find it. 2.616 - IFS_save="$IFS" 2.617 - IFS=: 2.618 - for p in $PATH; do 2.619 - if test -f "$p/$path" && test -x "$p/$path"; then 2.620 - new_path="$p/$path" 2.621 - break 2.622 - fi 2.623 - done 2.624 - IFS="$IFS_save" 2.625 - else 2.626 - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 2.627 -$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} 2.628 - new_path="$path" 2.629 - fi 2.630 - 2.631 - if test "x$new_path" = x; then 2.632 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 2.633 -$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} 2.634 - has_space=`$ECHO "$complete" | $GREP " "` 2.635 - if test "x$has_space" != x; then 2.636 - { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 2.637 -$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} 2.638 - fi 2.639 - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 2.640 - fi 2.641 - fi 2.642 - 2.643 - # Now join together the path and the arguments once again 2.644 - if test "x$arguments" != xEOL; then 2.645 - new_complete="$new_path ${arguments% *}" 2.646 - else 2.647 - new_complete="$new_path" 2.648 - fi 2.649 - 2.650 - if test "x$complete" != "x$new_complete"; then 2.651 - LIPO="$new_complete" 2.652 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 2.653 -$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} 2.654 - fi 2.655 - 2.656 - fi 2.657 - 2.658 2.659 2.660 # Restore old path without tools dir 2.661 @@ -30388,8 +30219,6 @@ 2.662 ALSA_NOT_NEEDED=yes 2.663 PULSE_NOT_NEEDED=yes 2.664 X11_NOT_NEEDED=yes 2.665 - # If the java runtime framework is disabled, then we need X11. 2.666 - # This will be adjusted below. 2.667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5 2.668 $as_echo "alsa pulse x11" >&6; } 2.669 fi 2.670 @@ -30410,11 +30239,7 @@ 2.671 X11_NOT_NEEDED=yes 2.672 fi 2.673 2.674 - ############################################################################### 2.675 - # 2.676 - # Check for MacOSX support for OpenJDK. 2.677 - # 2.678 - 2.679 + # Deprecated and now ignored 2.680 2.681 # Check whether --enable-macosx-runtime-support was given. 2.682 if test "${enable_macosx_runtime_support+set}" = set; then : 2.683 @@ -30427,16 +30252,6 @@ 2.684 fi 2.685 2.686 2.687 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5 2.688 -$as_echo_n "checking for Mac OS X Java Framework... " >&6; } 2.689 - if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 2.690 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5 2.691 -$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; } 2.692 - else 2.693 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.694 -$as_echo "no" >&6; } 2.695 - fi 2.696 - 2.697 2.698 2.699 ###############################################################################
3.1 --- a/common/autoconf/hotspot-spec.gmk.in Thu Jan 22 14:39:36 2015 +0400 3.2 +++ b/common/autoconf/hotspot-spec.gmk.in Fri Jan 23 14:52:26 2015 -0800 3.3 @@ -115,6 +115,9 @@ 3.4 3.5 USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ 3.6 3.7 +# Universal binaries on macosx, mirror MACOSX_UNIVERSAL 3.8 +ALT_MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@ 3.9 + 3.10 # Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols 3.11 # creation. 3.12 ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
4.1 --- a/common/autoconf/jdk-options.m4 Thu Jan 22 14:39:36 2015 +0400 4.2 +++ b/common/autoconf/jdk-options.m4 Fri Jan 23 14:52:26 2015 -0800 4.3 @@ -164,7 +164,7 @@ 4.4 AC_SUBST(INCLUDE_SA) 4.5 4.6 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 4.7 - MACOSX_UNIVERSAL="true" 4.8 + MACOSX_UNIVERSAL="false" 4.9 fi 4.10 4.11 AC_SUBST(MACOSX_UNIVERSAL)
5.1 --- a/common/autoconf/libraries.m4 Thu Jan 22 14:39:36 2015 +0400 5.2 +++ b/common/autoconf/libraries.m4 Fri Jan 23 14:52:26 2015 -0800 5.3 @@ -1,5 +1,5 @@ 5.4 # 5.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 5.6 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 5.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 # 5.9 # This code is free software; you can redistribute it and/or modify it 5.10 @@ -65,8 +65,6 @@ 5.11 ALSA_NOT_NEEDED=yes 5.12 PULSE_NOT_NEEDED=yes 5.13 X11_NOT_NEEDED=yes 5.14 - # If the java runtime framework is disabled, then we need X11. 5.15 - # This will be adjusted below. 5.16 AC_MSG_RESULT([alsa pulse x11]) 5.17 fi 5.18 5.19 @@ -84,19 +82,8 @@ 5.20 X11_NOT_NEEDED=yes 5.21 fi 5.22 5.23 - ############################################################################### 5.24 - # 5.25 - # Check for MacOSX support for OpenJDK. 5.26 - # 5.27 - 5.28 + # Deprecated and now ignored 5.29 BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support) 5.30 - 5.31 - AC_MSG_CHECKING([for Mac OS X Java Framework]) 5.32 - if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 5.33 - AC_MSG_RESULT([/System/Library/Frameworks/JavaVM.framework]) 5.34 - else 5.35 - AC_MSG_RESULT([no]) 5.36 - fi 5.37 ]) 5.38 5.39 AC_DEFUN_ONCE([LIB_SETUP_X11],
6.1 --- a/common/autoconf/spec.gmk.in Thu Jan 22 14:39:36 2015 +0400 6.2 +++ b/common/autoconf/spec.gmk.in Fri Jan 23 14:52:26 2015 -0800 6.3 @@ -1,5 +1,5 @@ 6.4 # 6.5 -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 6.6 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 6.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 # 6.9 # This code is free software; you can redistribute it and/or modify it 6.10 @@ -342,6 +342,12 @@ 6.11 # The linker can be gcc or ld on posix systems, or link.exe on windows systems. 6.12 LD:=@FIXPATH@ @LD@ 6.13 6.14 +ifeq ($(OPENJDK_TARGET_OS), macosx) 6.15 + # Xcode SDK and tools path 6.16 + SDKPATH:=@SDKPATH@ 6.17 + @SET_DEVELOPER_DIR@ 6.18 +endif 6.19 + 6.20 # The linker on older SuSE distros (e.g. on SLES 10) complains with: 6.21 # "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." 6.22 # if feeded with a version script which contains named tags. 6.23 @@ -386,8 +392,6 @@ 6.24 STRIP:=@STRIP@ 6.25 MCS:=@MCS@ 6.26 6.27 -LIPO:=@LIPO@ 6.28 - 6.29 # Command to create a shared library 6.30 SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ 6.31 6.32 @@ -539,6 +543,7 @@ 6.33 JT_HOME:=@JT_HOME@ 6.34 JTREGEXE:=@JTREGEXE@ 6.35 6.36 +XCODEBUILD=@XCODEBUILD@ 6.37 FIXPATH:=@FIXPATH@ 6.38 6.39 # Where the build output is stored for your convenience.
7.1 --- a/common/autoconf/toolchain.m4 Thu Jan 22 14:39:36 2015 +0400 7.2 +++ b/common/autoconf/toolchain.m4 Fri Jan 23 14:52:26 2015 -0800 7.3 @@ -1,5 +1,5 @@ 7.4 # 7.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 7.6 +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 7.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 # 7.9 # This code is free software; you can redistribute it and/or modify it 7.10 @@ -254,6 +254,86 @@ 7.11 PATH=$TOOLS_DIR:$PATH 7.12 fi 7.13 7.14 + # Before we locate the compilers, we need to sanitize the Xcode build environment 7.15 + if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7.16 + # determine path to Xcode developer directory 7.17 + # can be empty in which case all the tools will rely on a sane Xcode 4 installation 7.18 + SET_DEVELOPER_DIR= 7.19 + 7.20 + if test -n "$XCODE_PATH"; then 7.21 + DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer 7.22 + fi 7.23 + 7.24 + # DEVELOPER_DIR could also be provided directly 7.25 + AC_MSG_CHECKING([Determining if we need to set DEVELOPER_DIR]) 7.26 + if test -n "$DEVELOPER_DIR"; then 7.27 + if test ! -d "$DEVELOPER_DIR"; then 7.28 + AC_MSG_ERROR([Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path]) 7.29 + fi 7.30 + if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then 7.31 + AC_MSG_ERROR([Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle]) 7.32 + fi 7.33 + # make it visible to all the tools immediately 7.34 + export DEVELOPER_DIR 7.35 + SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR" 7.36 + AC_MSG_RESULT([yes ($DEVELOPER_DIR)]) 7.37 + else 7.38 + AC_MSG_RESULT([no]) 7.39 + fi 7.40 + AC_SUBST(SET_DEVELOPER_DIR) 7.41 + 7.42 + AC_PATH_PROG(XCODEBUILD, xcodebuild) 7.43 + if test -z "$XCODEBUILD"; then 7.44 + AC_MSG_ERROR([The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X]) 7.45 + fi 7.46 + 7.47 + # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later 7.48 + XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'` 7.49 + XC_VERSION_PARTS=( ${XCODE_VERSION//./ } ) 7.50 + if test ! "${XC_VERSION_PARTS[[0]]}" = "4"; then 7.51 + AC_MSG_ERROR([Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.]) 7.52 + fi 7.53 + 7.54 + # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to 7.55 + # clang and clang++, which will break the build. So handle that here if we need to. 7.56 + if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then 7.57 + # use xcrun to find the real gcc and add it's directory to PATH 7.58 + # then autoconf magic will find it 7.59 + AC_MSG_NOTICE([Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH]) 7.60 + XCODE_BIN_PATH=$(dirname `xcrun -find gcc`) 7.61 + PATH="$XCODE_BIN_PATH":$PATH 7.62 + fi 7.63 + 7.64 + # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools 7.65 + AC_MSG_CHECKING([Determining Xcode SDK path]) 7.66 + # allow SDKNAME to be set to override the default SDK selection 7.67 + SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'` 7.68 + if test -n "$SDKPATH"; then 7.69 + AC_MSG_RESULT([$SDKPATH]) 7.70 + else 7.71 + AC_MSG_RESULT([(none, will use system headers and frameworks)]) 7.72 + fi 7.73 + AC_SUBST(SDKPATH) 7.74 + 7.75 + # Perform a basic sanity test 7.76 + if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then 7.77 + AC_MSG_ERROR([Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path]) 7.78 + fi 7.79 + 7.80 + # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++ 7.81 + if test -n "$SDKPATH"; then 7.82 + # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks 7.83 + CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" 7.84 + CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" 7.85 + LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" 7.86 + fi 7.87 + 7.88 + # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework 7.89 + # setting this here means it doesn't have to be peppered throughout the forest 7.90 + CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" 7.91 + CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" 7.92 + LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" 7.93 + fi 7.94 7.95 ### Locate C compiler (CC) 7.96 7.97 @@ -477,6 +557,10 @@ 7.98 AC_PATH_PROG(MCS, mcs) 7.99 BASIC_FIXUP_EXECUTABLE(MCS) 7.100 elif test "x$OPENJDK_TARGET_OS" != xwindows; then 7.101 + AC_PATH_PROG(OTOOL, otool) 7.102 + if test "x$OTOOL" = "x"; then 7.103 + OTOOL="true" 7.104 + fi 7.105 AC_CHECK_TOOL(NM, nm) 7.106 BASIC_FIXUP_EXECUTABLE(NM) 7.107 GNM="$NM" 7.108 @@ -501,11 +585,6 @@ 7.109 BASIC_FIXUP_EXECUTABLE(OBJDUMP) 7.110 fi 7.111 7.112 - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 7.113 - AC_PATH_PROG(LIPO, lipo) 7.114 - BASIC_FIXUP_EXECUTABLE(LIPO) 7.115 - fi 7.116 - 7.117 TOOLCHAIN_SETUP_JTREG 7.118 7.119 # Restore old path without tools dir