< prev index next >

make/autoconf/platform.m4

Print this page
8248238: Adding Windows support to OpenJDK on AArch64

Summary: Adding Windows support for AArch64

Contributed-by: Ludovic Henry <luhenry@microsoft.com>, Monica Beckwith <monica.beckwith@microsoft.com>
Reviewed-by:


 359   PLATFORM_SETUP_LEGACY_VARS_HELPER([BUILD])
 360 ])
 361 
 362 # $1 - Either TARGET or BUILD to setup the variables for.
 363 AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
 364 [
 365   # Also store the legacy naming of the cpu.
 366   # Ie i586 and amd64 instead of x86 and x86_64
 367   OPENJDK_$1_CPU_LEGACY="$OPENJDK_$1_CPU"
 368   if test "x$OPENJDK_$1_CPU" = xx86; then
 369     OPENJDK_$1_CPU_LEGACY="i586"
 370   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 371     # On all platforms except MacOSX replace x86_64 with amd64.
 372     OPENJDK_$1_CPU_LEGACY="amd64"
 373   elif test "x$OPENJDK_$1_CPU" = xalpha; then
 374     # Avoid name collisions with variables named alpha
 375     OPENJDK_$1_CPU_LEGACY="_alpha_"
 376   elif test "x$OPENJDK_$1_CPU" = xsh; then
 377     # Avoid name collisions with variables named sh
 378     OPENJDK_$1_CPU_LEGACY="_sh_"


 379   fi
 380   AC_SUBST(OPENJDK_$1_CPU_LEGACY)
 381 
 382   # And the second legacy naming of the cpu.
 383   # Ie i386 and amd64 instead of x86 and x86_64.
 384   OPENJDK_$1_CPU_LEGACY_LIB="$OPENJDK_$1_CPU"
 385   if test "x$OPENJDK_$1_CPU" = xx86; then
 386     OPENJDK_$1_CPU_LEGACY_LIB="i386"
 387   elif test "x$OPENJDK_$1_CPU" = xx86_64; then
 388     OPENJDK_$1_CPU_LEGACY_LIB="amd64"


 389   fi
 390   AC_SUBST(OPENJDK_$1_CPU_LEGACY_LIB)
 391 
 392   # Setup OPENJDK_$1_CPU_OSARCH, which is used to set the os.arch Java system property
 393   OPENJDK_$1_CPU_OSARCH="$OPENJDK_$1_CPU"
 394   if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xx86; then
 395     # On linux only, we replace x86 with i386.
 396     OPENJDK_$1_CPU_OSARCH="i386"
 397   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 398     # On all platforms except macosx, we replace x86_64 with amd64.
 399     OPENJDK_$1_CPU_OSARCH="amd64"
 400   fi
 401   AC_SUBST(OPENJDK_$1_CPU_OSARCH)
 402 
 403   OPENJDK_$1_CPU_JLI="$OPENJDK_$1_CPU"
 404   if test "x$OPENJDK_$1_CPU" = xx86; then
 405     OPENJDK_$1_CPU_JLI="i386"
 406   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 407     # On all platforms except macosx, we replace x86_64 with amd64.
 408     OPENJDK_$1_CPU_JLI="amd64"


 516   fi
 517   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
 518     RELEASE_FILE_OS_NAME="AIX"
 519   fi
 520   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
 521 
 522   AC_SUBST(RELEASE_FILE_OS_NAME)
 523   AC_SUBST(RELEASE_FILE_OS_ARCH)
 524 ])
 525 
 526 AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
 527 [
 528   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 529     OPENJDK_MODULE_TARGET_OS_NAME="macos"
 530   else
 531     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
 532   fi
 533 
 534   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
 535     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"


 536   else
 537     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
 538   fi
 539 
 540   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
 541   AC_SUBST(OPENJDK_MODULE_TARGET_PLATFORM)
 542 ])
 543 
 544 #%%% Build and target systems %%%
 545 AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
 546 [
 547   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
 548   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
 549   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
 550   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
 551   # to use the configure naming style.
 552   AC_CANONICAL_BUILD
 553   AC_CANONICAL_HOST
 554   AC_CANONICAL_TARGET
 555 




 359   PLATFORM_SETUP_LEGACY_VARS_HELPER([BUILD])
 360 ])
 361 
 362 # $1 - Either TARGET or BUILD to setup the variables for.
 363 AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
 364 [
 365   # Also store the legacy naming of the cpu.
 366   # Ie i586 and amd64 instead of x86 and x86_64
 367   OPENJDK_$1_CPU_LEGACY="$OPENJDK_$1_CPU"
 368   if test "x$OPENJDK_$1_CPU" = xx86; then
 369     OPENJDK_$1_CPU_LEGACY="i586"
 370   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 371     # On all platforms except MacOSX replace x86_64 with amd64.
 372     OPENJDK_$1_CPU_LEGACY="amd64"
 373   elif test "x$OPENJDK_$1_CPU" = xalpha; then
 374     # Avoid name collisions with variables named alpha
 375     OPENJDK_$1_CPU_LEGACY="_alpha_"
 376   elif test "x$OPENJDK_$1_CPU" = xsh; then
 377     # Avoid name collisions with variables named sh
 378     OPENJDK_$1_CPU_LEGACY="_sh_"
 379   elif test "x$OPENJDK_$1_CPU" = xaarch64; then
 380     OPENJDK_$1_CPU_LEGACY="arm64"
 381   fi
 382   AC_SUBST(OPENJDK_$1_CPU_LEGACY)
 383 
 384   # And the second legacy naming of the cpu.
 385   # Ie i386 and amd64 instead of x86 and x86_64.
 386   OPENJDK_$1_CPU_LEGACY_LIB="$OPENJDK_$1_CPU"
 387   if test "x$OPENJDK_$1_CPU" = xx86; then
 388     OPENJDK_$1_CPU_LEGACY_LIB="i386"
 389   elif test "x$OPENJDK_$1_CPU" = xx86_64; then
 390     OPENJDK_$1_CPU_LEGACY_LIB="amd64"
 391   elif test "x$OPENJDK_$1_CPU" = xaarch64; then
 392     OPENJDK_$1_CPU_LEGACY_LIB="arm64"
 393   fi
 394   AC_SUBST(OPENJDK_$1_CPU_LEGACY_LIB)
 395 
 396   # Setup OPENJDK_$1_CPU_OSARCH, which is used to set the os.arch Java system property
 397   OPENJDK_$1_CPU_OSARCH="$OPENJDK_$1_CPU"
 398   if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xx86; then
 399     # On linux only, we replace x86 with i386.
 400     OPENJDK_$1_CPU_OSARCH="i386"
 401   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 402     # On all platforms except macosx, we replace x86_64 with amd64.
 403     OPENJDK_$1_CPU_OSARCH="amd64"
 404   fi
 405   AC_SUBST(OPENJDK_$1_CPU_OSARCH)
 406 
 407   OPENJDK_$1_CPU_JLI="$OPENJDK_$1_CPU"
 408   if test "x$OPENJDK_$1_CPU" = xx86; then
 409     OPENJDK_$1_CPU_JLI="i386"
 410   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
 411     # On all platforms except macosx, we replace x86_64 with amd64.
 412     OPENJDK_$1_CPU_JLI="amd64"


 520   fi
 521   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
 522     RELEASE_FILE_OS_NAME="AIX"
 523   fi
 524   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
 525 
 526   AC_SUBST(RELEASE_FILE_OS_NAME)
 527   AC_SUBST(RELEASE_FILE_OS_ARCH)
 528 ])
 529 
 530 AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
 531 [
 532   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 533     OPENJDK_MODULE_TARGET_OS_NAME="macos"
 534   else
 535     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
 536   fi
 537 
 538   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
 539     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
 540   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
 541     OPENJDK_MODULE_TARGET_OS_ARCH="arm64"    
 542   else
 543     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
 544   fi
 545 
 546   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
 547   AC_SUBST(OPENJDK_MODULE_TARGET_PLATFORM)
 548 ])
 549 
 550 #%%% Build and target systems %%%
 551 AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
 552 [
 553   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
 554   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
 555   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
 556   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
 557   # to use the configure naming style.
 558   AC_CANONICAL_BUILD
 559   AC_CANONICAL_HOST
 560   AC_CANONICAL_TARGET
 561 


< prev index next >