< prev index next >

make/autoconf/flags-ldflags.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:


 152 #      conditionals against.
 153 # $2 - Optional prefix for each variable defined.
 154 AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
 155 [
 156   # Setup CPU-dependent basic LDFLAGS. These can differ between the target and
 157   # build toolchain.
 158   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 159     if test "x${OPENJDK_$1_CPU}" = xx86; then
 160       $1_CPU_LDFLAGS_JVM_ONLY="-march=i586"
 161     elif test "x$OPENJDK_$1_CPU" = xarm; then
 162       $1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
 163       $1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
 164     fi
 165 
 166   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
 167     if test "x${OPENJDK_$1_CPU}" = "xx86"; then
 168       $1_CPU_LDFLAGS="-safeseh"
 169       # NOTE: Old build added -machine. Probably not needed.
 170       $1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
 171       $1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
 172     else
 173       $1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"



 174       $1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
 175     fi
 176   fi
 177 
 178   # JVM_VARIANT_PATH depends on if this is build or target...
 179   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
 180     $1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
 181   else
 182     $1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
 183         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
 184   fi
 185 
 186   # Export variables according to old definitions, prefix with $2 if present.
 187   LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
 188       $OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
 189   $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
 190       ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
 191   $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
 192       ${$1_CPU_EXECUTABLE_LDFLAGS}"
 193 


 152 #      conditionals against.
 153 # $2 - Optional prefix for each variable defined.
 154 AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
 155 [
 156   # Setup CPU-dependent basic LDFLAGS. These can differ between the target and
 157   # build toolchain.
 158   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 159     if test "x${OPENJDK_$1_CPU}" = xx86; then
 160       $1_CPU_LDFLAGS_JVM_ONLY="-march=i586"
 161     elif test "x$OPENJDK_$1_CPU" = xarm; then
 162       $1_CPU_LDFLAGS_JVM_ONLY="${$1_CPU_LDFLAGS_JVM_ONLY} -fsigned-char"
 163       $1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
 164     fi
 165 
 166   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
 167     if test "x${OPENJDK_$1_CPU}" = "xx86"; then
 168       $1_CPU_LDFLAGS="-safeseh"
 169       # NOTE: Old build added -machine. Probably not needed.
 170       $1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
 171       $1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
 172     elif test "x${OPENJDK_$1_CPU}" = "xx86_64"; then
 173       $1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"
 174       $1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
 175     elif test "x${OPENJDK_$1_CPU}" = "xaarch64"; then
 176       $1_CPU_LDFLAGS_JVM_ONLY="-machine:ARM64"
 177       $1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
 178     fi
 179   fi
 180 
 181   # JVM_VARIANT_PATH depends on if this is build or target...
 182   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
 183     $1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
 184   else
 185     $1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
 186         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
 187   fi
 188 
 189   # Export variables according to old definitions, prefix with $2 if present.
 190   LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
 191       $OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
 192   $2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
 193       ${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
 194   $2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
 195       ${$1_CPU_EXECUTABLE_LDFLAGS}"
 196 
< prev index next >