< prev index next >

make/autoconf/platform.m4

Print this page




  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
  23 # questions.
  24 #
  25 
  26 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
  27 # Converts autoconf style CPU name to OpenJDK style, into
  28 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
  29 AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
  30 [

  31   # First argument is the cpu name from the trip/quad
  32   case "$1" in
  33     x86_64)
  34       VAR_CPU=x86_64
  35       VAR_CPU_ARCH=x86
  36       VAR_CPU_BITS=64
  37       VAR_CPU_ENDIAN=little
  38       ;;
  39     i?86)
  40       VAR_CPU=x86
  41       VAR_CPU_ARCH=x86
  42       VAR_CPU_BITS=32
  43       VAR_CPU_ENDIAN=little
  44       ;;
  45     alpha*)
  46       VAR_CPU=alpha
  47       VAR_CPU_ARCH=alpha
  48       VAR_CPU_BITS=64
  49       VAR_CPU_ENDIAN=little
  50       ;;
  51     arm*)
  52       VAR_CPU=arm
  53       VAR_CPU_ARCH=arm
  54       VAR_CPU_BITS=32
  55       VAR_CPU_ENDIAN=little
  56       ;;






  57     aarch64)
  58       VAR_CPU=aarch64
  59       VAR_CPU_ARCH=aarch64
  60       VAR_CPU_BITS=64
  61       VAR_CPU_ENDIAN=little
  62       ;;
  63     ia64)
  64       VAR_CPU=ia64
  65       VAR_CPU_ARCH=ia64
  66       VAR_CPU_BITS=64
  67       VAR_CPU_ENDIAN=little
  68       ;;
  69     m68k)
  70       VAR_CPU=m68k
  71       VAR_CPU_ARCH=m68k
  72       VAR_CPU_BITS=32
  73       VAR_CPU_ENDIAN=big
  74       ;;
  75     mips)
  76       VAR_CPU=mips


 369   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
 370   # /usr/lib${OPENJDK_$1_CPU_ISADIR}/libexample.so
 371   OPENJDK_$1_CPU_ISADIR=""
 372   if test "x$OPENJDK_$1_OS" = xsolaris; then
 373     if test "x$OPENJDK_$1_CPU" = xx86_64; then
 374       OPENJDK_$1_CPU_ISADIR="/amd64"
 375     elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
 376       OPENJDK_$1_CPU_ISADIR="/sparcv9"
 377     fi
 378   fi
 379   AC_SUBST(OPENJDK_$1_CPU_ISADIR)
 380 
 381   # Setup OPENJDK_$1_CPU_OSARCH, which is used to set the os.arch Java system property
 382   OPENJDK_$1_CPU_OSARCH="$OPENJDK_$1_CPU"
 383   if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xx86; then
 384     # On linux only, we replace x86 with i386.
 385     OPENJDK_$1_CPU_OSARCH="i386"
 386   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 387     # On all platforms except macosx, we replace x86_64 with amd64.
 388     OPENJDK_$1_CPU_OSARCH="amd64"


 389   fi
 390   AC_SUBST(OPENJDK_$1_CPU_OSARCH)
 391 
 392   OPENJDK_$1_CPU_JLI="$OPENJDK_$1_CPU"
 393   if test "x$OPENJDK_$1_CPU" = xx86; then
 394     OPENJDK_$1_CPU_JLI="i386"
 395   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 396     # On all platforms except macosx, we replace x86_64 with amd64.
 397     OPENJDK_$1_CPU_JLI="amd64"
 398   fi
 399 
 400   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
 401   # Macosx is osx and x86_64 is x64
 402   if test "x$OPENJDK_$1_OS" = xmacosx; then
 403     OPENJDK_$1_OS_BUNDLE="osx"
 404   else
 405     OPENJDK_$1_OS_BUNDLE="$OPENJDK_TARGET_OS"
 406   fi
 407   if test "x$OPENJDK_$1_CPU" = xx86_64; then
 408     OPENJDK_$1_CPU_BUNDLE="x64"




  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
  23 # questions.
  24 #
  25 
  26 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
  27 # Converts autoconf style CPU name to OpenJDK style, into
  28 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
  29 AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
  30 [
  31   echo "LOOKING UP CPU ARCH $1"
  32   # First argument is the cpu name from the trip/quad
  33   case "$1" in
  34     x86_64)
  35       VAR_CPU=x86_64
  36       VAR_CPU_ARCH=x86
  37       VAR_CPU_BITS=64
  38       VAR_CPU_ENDIAN=little
  39       ;;
  40     i?86)
  41       VAR_CPU=x86
  42       VAR_CPU_ARCH=x86
  43       VAR_CPU_BITS=32
  44       VAR_CPU_ENDIAN=little
  45       ;;
  46     alpha*)
  47       VAR_CPU=alpha
  48       VAR_CPU_ARCH=alpha
  49       VAR_CPU_BITS=64
  50       VAR_CPU_ENDIAN=little
  51       ;;
  52     arm*)
  53       VAR_CPU=arm
  54       VAR_CPU_ARCH=arm
  55       VAR_CPU_BITS=32
  56       VAR_CPU_ENDIAN=little
  57       ;;
  58     aarch32)
  59       VAR_CPU=aarch32
  60       VAR_CPU_ARCH=aarch32
  61       VAR_CPU_BITS=32
  62       VAR_CPU_ENDIAN=little
  63       ;;
  64     aarch64)
  65       VAR_CPU=aarch64
  66       VAR_CPU_ARCH=aarch64
  67       VAR_CPU_BITS=64
  68       VAR_CPU_ENDIAN=little
  69       ;;
  70     ia64)
  71       VAR_CPU=ia64
  72       VAR_CPU_ARCH=ia64
  73       VAR_CPU_BITS=64
  74       VAR_CPU_ENDIAN=little
  75       ;;
  76     m68k)
  77       VAR_CPU=m68k
  78       VAR_CPU_ARCH=m68k
  79       VAR_CPU_BITS=32
  80       VAR_CPU_ENDIAN=big
  81       ;;
  82     mips)
  83       VAR_CPU=mips


 376   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
 377   # /usr/lib${OPENJDK_$1_CPU_ISADIR}/libexample.so
 378   OPENJDK_$1_CPU_ISADIR=""
 379   if test "x$OPENJDK_$1_OS" = xsolaris; then
 380     if test "x$OPENJDK_$1_CPU" = xx86_64; then
 381       OPENJDK_$1_CPU_ISADIR="/amd64"
 382     elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
 383       OPENJDK_$1_CPU_ISADIR="/sparcv9"
 384     fi
 385   fi
 386   AC_SUBST(OPENJDK_$1_CPU_ISADIR)
 387 
 388   # Setup OPENJDK_$1_CPU_OSARCH, which is used to set the os.arch Java system property
 389   OPENJDK_$1_CPU_OSARCH="$OPENJDK_$1_CPU"
 390   if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xx86; then
 391     # On linux only, we replace x86 with i386.
 392     OPENJDK_$1_CPU_OSARCH="i386"
 393   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 394     # On all platforms except macosx, we replace x86_64 with amd64.
 395     OPENJDK_$1_CPU_OSARCH="amd64"
 396   elif test "x$OPENJDK_$1_CPU" = xaarch32; then
 397     OPENJDK_$1_CPU_OSARCH="arm"
 398   fi
 399   AC_SUBST(OPENJDK_$1_CPU_OSARCH)
 400 
 401   OPENJDK_$1_CPU_JLI="$OPENJDK_$1_CPU"
 402   if test "x$OPENJDK_$1_CPU" = xx86; then
 403     OPENJDK_$1_CPU_JLI="i386"
 404   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 405     # On all platforms except macosx, we replace x86_64 with amd64.
 406     OPENJDK_$1_CPU_JLI="amd64"
 407   fi
 408 
 409   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
 410   # Macosx is osx and x86_64 is x64
 411   if test "x$OPENJDK_$1_OS" = xmacosx; then
 412     OPENJDK_$1_OS_BUNDLE="osx"
 413   else
 414     OPENJDK_$1_OS_BUNDLE="$OPENJDK_TARGET_OS"
 415   fi
 416   if test "x$OPENJDK_$1_CPU" = xx86_64; then
 417     OPENJDK_$1_CPU_BUNDLE="x64"


< prev index next >