< prev index next >

common/autoconf/toolchain.m4

Print this page




 306       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
 307       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
 308       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
 309     fi
 310     
 311     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
 312     # setting this here means it doesn't have to be peppered throughout the forest
 313     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
 314     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
 315     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
 316   fi
 317 
 318   # For solaris we really need solaris tools, and not the GNU equivalent.
 319   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
 320   # so add that to path before starting to probe.
 321   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
 322   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
 323     PATH="/usr/ccs/bin:$PATH"
 324   fi
 325 
 326   # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to 
 327   # override all other locations.
 328   if test "x$TOOLS_DIR" != x; then
 329     PATH=$TOOLS_DIR:$PATH
 330   fi
 331 
 332   # If a devkit is found on the builddeps server, then prepend its path to the
 333   # PATH variable. If there are cross compilers available in the devkit, these
 334   # will be found by AC_PROG_CC et al.
 335   DEVKIT=
 336   BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
 337       [
 338         # Found devkit
 339         PATH="$DEVKIT/bin:$PATH"
 340         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
 341         if test "x$x_includes" = "xNONE"; then
 342           x_includes="$SYS_ROOT/usr/include/X11"
 343         fi
 344         if test "x$x_libraries" = "xNONE"; then
 345           x_libraries="$SYS_ROOT/usr/lib"
 346         fi
 347       ],
 348       [])
 349 ])
 350 
 351 # Restore path, etc
 352 AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
 353 [
 354   # Restore old path.
 355   PATH="$OLD_PATH"
 356 
 357   # Restore the flags to the user specified values.
 358   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
 359   CFLAGS="$ORG_CFLAGS"
 360   CXXFLAGS="$ORG_CXXFLAGS"
 361   OBJCFLAGS="$ORG_OBJCFLAGS"
 362 ])
 363 
 364 # Check if a compiler is of the toolchain type we expect, and save the version
 365 # information from it. If the compiler does not match the expected type,
 366 # this function will abort using AC_MSG_ERROR. If it matches, the version will
 367 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
 368 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.


 502       else
 503         AC_MSG_ERROR([User supplied compiler $1=[$]$1 could not be found])
 504       fi
 505     else
 506       # Otherwise it might already be a complete path
 507       if test ! -x "[$]$1"; then
 508         AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
 509       fi
 510     fi
 511   else
 512     # No user supplied value. Locate compiler ourselves.
 513 
 514     # If we are cross compiling, assume cross compilation tools follows the
 515     # cross compilation standard where they are prefixed with the autoconf
 516     # standard name for the target. For example the binary
 517     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
 518     # If we are not cross compiling, then the default compiler name will be
 519     # used.
 520 
 521     $1=
 522     # If TOOLS_DIR is set, check for all compiler names in there first
 523     # before checking the rest of the PATH.
 524     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
 525     # step, this should not be necessary.
 526     if test -n "$TOOLS_DIR"; then
 527       PATH_save="$PATH"
 528       PATH="$TOOLS_DIR"
 529       AC_PATH_PROGS(TOOLS_DIR_$1, $3)
 530       $1=$TOOLS_DIR_$1
 531       PATH="$PATH_save"
 532     fi
 533 
 534     # AC_PATH_PROGS can't be run multiple times with the same variable,
 535     # so create a new name for this run.
 536     if test "x[$]$1" = x; then
 537       AC_PATH_PROGS(POTENTIAL_$1, $3)
 538       $1=$POTENTIAL_$1
 539     fi
 540 
 541     if test "x[$]$1" = x; then
 542       HELP_MSG_MISSING_DEPENDENCY([devkit])
 543       AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
 544     fi
 545   fi
 546 
 547   # Now we have a compiler binary in $1. Make sure it's okay.
 548   BASIC_FIXUP_EXECUTABLE($1)
 549   TEST_COMPILER="[$]$1"
 550   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links




 306       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
 307       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
 308       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
 309     fi
 310     
 311     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
 312     # setting this here means it doesn't have to be peppered throughout the forest
 313     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
 314     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
 315     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
 316   fi
 317 
 318   # For solaris we really need solaris tools, and not the GNU equivalent.
 319   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
 320   # so add that to path before starting to probe.
 321   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
 322   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
 323     PATH="/usr/ccs/bin:$PATH"
 324   fi
 325 
 326   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to 
 327   # override all other locations.
 328   if test "x$TOOLCHAIN_PATH" != x; then
 329     PATH=$TOOLCHAIN_PATH:$PATH
 330   fi


















 331 ])
 332 
 333 # Restore path, etc
 334 AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
 335 [
 336   # Restore old path.
 337   PATH="$OLD_PATH"
 338 
 339   # Restore the flags to the user specified values.
 340   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
 341   CFLAGS="$ORG_CFLAGS"
 342   CXXFLAGS="$ORG_CXXFLAGS"
 343   OBJCFLAGS="$ORG_OBJCFLAGS"
 344 ])
 345 
 346 # Check if a compiler is of the toolchain type we expect, and save the version
 347 # information from it. If the compiler does not match the expected type,
 348 # this function will abort using AC_MSG_ERROR. If it matches, the version will
 349 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
 350 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.


 484       else
 485         AC_MSG_ERROR([User supplied compiler $1=[$]$1 could not be found])
 486       fi
 487     else
 488       # Otherwise it might already be a complete path
 489       if test ! -x "[$]$1"; then
 490         AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
 491       fi
 492     fi
 493   else
 494     # No user supplied value. Locate compiler ourselves.
 495 
 496     # If we are cross compiling, assume cross compilation tools follows the
 497     # cross compilation standard where they are prefixed with the autoconf
 498     # standard name for the target. For example the binary
 499     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
 500     # If we are not cross compiling, then the default compiler name will be
 501     # used.
 502 
 503     $1=
 504     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
 505     # before checking the rest of the PATH.
 506     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
 507     # step, this should not be necessary.
 508     if test -n "$TOOLCHAIN_PATH"; then
 509       PATH_save="$PATH"
 510       PATH="$TOOLCHAIN_PATH"
 511       AC_PATH_PROGS(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
 512       $1=$TOOLCHAIN_PATH_$1
 513       PATH="$PATH_save"
 514     fi
 515 
 516     # AC_PATH_PROGS can't be run multiple times with the same variable,
 517     # so create a new name for this run.
 518     if test "x[$]$1" = x; then
 519       AC_PATH_PROGS(POTENTIAL_$1, $3)
 520       $1=$POTENTIAL_$1
 521     fi
 522 
 523     if test "x[$]$1" = x; then
 524       HELP_MSG_MISSING_DEPENDENCY([devkit])
 525       AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
 526     fi
 527   fi
 528 
 529   # Now we have a compiler binary in $1. Make sure it's okay.
 530   BASIC_FIXUP_EXECUTABLE($1)
 531   TEST_COMPILER="[$]$1"
 532   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links


< prev index next >