< prev index next >

make/autoconf/flags-ldflags.m4

Print this page
rev 52902 : 8233410: Better Build Scripting
Reviewed-by: tbell, jwilhelm, andrew
rev 52911 : 8238960: linux-i586 builds are inconsistent as the newly build jdk is not able to reserve enough space for object heap
Reviewed-by: ihse, tbell, ahgross, jwilhelm
rev 52923 : 8226346: Build better binary builders
Reviewed-by: andrew


 128         DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
 129       fi
 130       if test x$DEBUG_LEVEL = xslowdebug; then
 131         # do relocations at load
 132         DEBUGLEVEL_LDFLAGS="-Wl,-z,now"
 133       fi
 134     fi
 135 
 136   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 137     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
 138     # Hotspot now overflows its 64K TOC (currently only for debug),
 139     # so we build with '-qpic=large -bbigtoc'.
 140     if test "x$DEBUG_LEVEL" != xrelease; then
 141       DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
 142     fi
 143   fi
 144 
 145   # Setup LDFLAGS for linking executables
 146   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 147     EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"











 148   fi
 149 
 150   # Export some intermediate variables for compatibility
 151   LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
 152   AC_SUBST(LDFLAGS_CXX_JDK)
 153   AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
 154   AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
 155 ])
 156 
 157 ################################################################################
 158 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
 159 #      conditionals against.
 160 # $2 - Optional prefix for each variable defined.
 161 AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
 162 [
 163   # Setup CPU-dependent basic LDFLAGS. These can differ between the target and
 164   # build toolchain.
 165   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 166     if test "x${OPENJDK_$1_CPU}" = xx86; then
 167       $1_CPU_LDFLAGS_JVM_ONLY="-march=i586"




 128         DEBUGLEVEL_LDFLAGS_JDK_ONLY="$DEBUGLEVEL_LDFLAGS_JDK_ONLY -Wl,-O1"
 129       fi
 130       if test x$DEBUG_LEVEL = xslowdebug; then
 131         # do relocations at load
 132         DEBUGLEVEL_LDFLAGS="-Wl,-z,now"
 133       fi
 134     fi
 135 
 136   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 137     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
 138     # Hotspot now overflows its 64K TOC (currently only for debug),
 139     # so we build with '-qpic=large -bbigtoc'.
 140     if test "x$DEBUG_LEVEL" != xrelease; then
 141       DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
 142     fi
 143   fi
 144 
 145   # Setup LDFLAGS for linking executables
 146   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 147     EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -Wl,--allow-shlib-undefined"
 148     # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
 149     # java heap.
 150     if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
 151       EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
 152     fi
 153   fi
 154 
 155   if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
 156     if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
 157       BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"
 158     fi
 159   fi
 160 
 161   # Export some intermediate variables for compatibility
 162   LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
 163   AC_SUBST(LDFLAGS_CXX_JDK)
 164   AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
 165   AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
 166 ])
 167 
 168 ################################################################################
 169 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
 170 #      conditionals against.
 171 # $2 - Optional prefix for each variable defined.
 172 AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
 173 [
 174   # Setup CPU-dependent basic LDFLAGS. These can differ between the target and
 175   # build toolchain.
 176   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 177     if test "x${OPENJDK_$1_CPU}" = xx86; then
 178       $1_CPU_LDFLAGS_JVM_ONLY="-march=i586"


< prev index next >