< prev index next >

common/autoconf/platform.m4

Print this page


   1 #
   2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 106 # Converts autoconf style OS name to OpenJDK style, into
 107 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
 108 AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
 109 [
 110   case "$1" in
 111     *linux*)
 112       VAR_OS=linux
 113       VAR_OS_TYPE=unix
 114       ;;
 115     *solaris*)
 116       VAR_OS=solaris
 117       VAR_OS_TYPE=unix
 118       ;;
 119     *darwin*)
 120       VAR_OS=macosx
 121       VAR_OS_TYPE=unix
 122       ;;
 123     *bsd*)
 124       VAR_OS=bsd
 125       VAR_OS_TYPE=unix








 126       ;;
 127     *cygwin*)
 128       VAR_OS=windows
 129       VAR_OS_ENV=windows.cygwin
 130       ;;
 131     *mingw*)
 132       VAR_OS=windows
 133       VAR_OS_ENV=windows.msys
 134       ;;
 135     *aix*)
 136       VAR_OS=aix
 137       VAR_OS_TYPE=unix
 138       ;;
 139     *)
 140       AC_MSG_ERROR([unsupported operating system $1])
 141       ;;
 142   esac
 143 ])
 144 
 145 # Expects $host_os $host_cpu $build_os and $build_cpu


 201   fi
 202   if test "x$VAR_OS_ENV" != x; then
 203     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
 204   else
 205     OPENJDK_TARGET_OS_ENV="$VAR_OS"
 206   fi
 207   OPENJDK_TARGET_CPU="$VAR_CPU"
 208   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
 209   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
 210   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
 211   AC_SUBST(OPENJDK_TARGET_OS)
 212   AC_SUBST(OPENJDK_TARGET_OS_TYPE)
 213   AC_SUBST(OPENJDK_TARGET_OS_ENV)
 214   AC_SUBST(OPENJDK_TARGET_CPU)
 215   AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
 216   AC_SUBST(OPENJDK_TARGET_CPU_BITS)
 217   AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
 218 
 219   AC_MSG_CHECKING([openjdk-target os-cpu])
 220   AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])





 221 ])
 222 
 223 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
 224 # accordingly. Must be done after setting up build and target system, but before
 225 # doing anything else with these values.
 226 AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
 227 [
 228   AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
 229        [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
 230 
 231   # We have three types of compiles:
 232   # native  == normal compilation, target system == build system
 233   # cross   == traditional cross compilation, target system != build system; special toolchain needed
 234   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
 235   #
 236   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
 237     # We're doing a proper cross-compilation
 238     COMPILE_TYPE="cross"
 239   else
 240     COMPILE_TYPE="native"


   1 #
   2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 106 # Converts autoconf style OS name to OpenJDK style, into
 107 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
 108 AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
 109 [
 110   case "$1" in
 111     *linux*)
 112       VAR_OS=linux
 113       VAR_OS_TYPE=unix
 114       ;;
 115     *solaris*)
 116       VAR_OS=solaris
 117       VAR_OS_TYPE=unix
 118       ;;
 119     *darwin*)
 120       VAR_OS=macosx
 121       VAR_OS_TYPE=unix
 122       ;;
 123     *bsd*)
 124       VAR_OS=bsd
 125       VAR_OS_TYPE=unix
 126       case "$1" in
 127         *freebsd*)
 128           VAR_OS_ENV=bsd.freebsd ;;
 129         *openbsd*)
 130           VAR_OS_ENV=bsd.openbsd ;;
 131         *netbsd*)
 132           VAR_OS_ENV=bsd.netbsd ;;
 133       esac
 134       ;;
 135     *cygwin*)
 136       VAR_OS=windows
 137       VAR_OS_ENV=windows.cygwin
 138       ;;
 139     *mingw*)
 140       VAR_OS=windows
 141       VAR_OS_ENV=windows.msys
 142       ;;
 143     *aix*)
 144       VAR_OS=aix
 145       VAR_OS_TYPE=unix
 146       ;;
 147     *)
 148       AC_MSG_ERROR([unsupported operating system $1])
 149       ;;
 150   esac
 151 ])
 152 
 153 # Expects $host_os $host_cpu $build_os and $build_cpu


 209   fi
 210   if test "x$VAR_OS_ENV" != x; then
 211     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
 212   else
 213     OPENJDK_TARGET_OS_ENV="$VAR_OS"
 214   fi
 215   OPENJDK_TARGET_CPU="$VAR_CPU"
 216   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
 217   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
 218   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
 219   AC_SUBST(OPENJDK_TARGET_OS)
 220   AC_SUBST(OPENJDK_TARGET_OS_TYPE)
 221   AC_SUBST(OPENJDK_TARGET_OS_ENV)
 222   AC_SUBST(OPENJDK_TARGET_CPU)
 223   AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
 224   AC_SUBST(OPENJDK_TARGET_CPU_BITS)
 225   AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
 226 
 227   AC_MSG_CHECKING([openjdk-target os-cpu])
 228   AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
 229 
 230   if test "x$OPENJDK_TARGET_OS_ENV" != "x$OPENJDK_TARGET_OS"; then
 231     AC_MSG_CHECKING([openjdk-target os-env])
 232     AC_MSG_RESULT([$OPENJDK_TARGET_OS_ENV])
 233   fi
 234 ])
 235 
 236 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
 237 # accordingly. Must be done after setting up build and target system, but before
 238 # doing anything else with these values.
 239 AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
 240 [
 241   AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
 242        [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
 243 
 244   # We have three types of compiles:
 245   # native  == normal compilation, target system == build system
 246   # cross   == traditional cross compilation, target system != build system; special toolchain needed
 247   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
 248   #
 249   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
 250     # We're doing a proper cross-compilation
 251     COMPILE_TYPE="cross"
 252   else
 253     COMPILE_TYPE="native"


< prev index next >