< prev index next >

common/autoconf/jdk-options.m4

Print this page




 559 
 560   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
 561   AC_SUBST(COOKED_BUILD_NUMBER)
 562 ])
 563 
 564 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
 565 [
 566   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
 567   AC_SUBST(HOTSPOT_MAKE_ARGS)
 568 
 569   # The name of the Service Agent jar.
 570   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
 571   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 572     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
 573   fi
 574   AC_SUBST(SALIB_NAME)
 575 ])
 576 
 577 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
 578 [












































































 579   #
 580   # ENABLE_DEBUG_SYMBOLS
 581   # This must be done after the toolchain is setup, since we're looking at objcopy.
 582   #





 583   AC_ARG_ENABLE([debug-symbols],
 584       [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
 585 
 586   AC_MSG_CHECKING([if we should generate debug symbols])
 587 
 588   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
 589     # explicit enabling of enable-debug-symbols and can't find objcopy
 590     #   this is an error
 591     AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
 592   fi
 593 
 594   if test "x$enable_debug_symbols" = "xyes"; then
 595     ENABLE_DEBUG_SYMBOLS=true
 596   elif test "x$enable_debug_symbols" = "xno"; then
 597     ENABLE_DEBUG_SYMBOLS=false
 598   else
 599     # Default is on if objcopy is found
 600     if test "x$OBJCOPY" != x; then
 601       ENABLE_DEBUG_SYMBOLS=true
 602     # MacOS X and Windows don't use objcopy but default is on for those OSes
 603     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
 604       ENABLE_DEBUG_SYMBOLS=true
 605     else
 606       ENABLE_DEBUG_SYMBOLS=false
 607     fi
 608   fi
 609 
 610   AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
 611 
 612   #
 613   # ZIP_DEBUGINFO_FILES
 614   #





 615   AC_MSG_CHECKING([if we should zip debug-info files])
 616   AC_ARG_ENABLE([zip-debug-info],
 617       [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
 618       [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
 619   AC_MSG_RESULT([${enable_zip_debug_info}])
 620 
 621   if test "x${enable_zip_debug_info}" = "xno"; then
 622     ZIP_DEBUGINFO_FILES=false
 623   else
 624     ZIP_DEBUGINFO_FILES=true
 625   fi
 626 



 627   AC_SUBST(ENABLE_DEBUG_SYMBOLS)
 628   AC_SUBST(ZIP_DEBUGINFO_FILES)
 629 ])
 630 
 631 ################################################################################
 632 #
 633 # Gcov coverage data for hotspot
 634 #
 635 AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
 636 [
 637   AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage],
 638       [enable native compilation with code coverage data@<:@disabled@:>@])])
 639   GCOV_ENABLED="false"
 640   if test "x$enable_native_coverage" = "xyes"; then
 641     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
 642       AC_MSG_CHECKING([if native coverage is enabled])
 643       AC_MSG_RESULT([yes])
 644       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
 645       GCOV_LDFLAGS="-fprofile-arcs"
 646       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"




 559 
 560   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
 561   AC_SUBST(COOKED_BUILD_NUMBER)
 562 ])
 563 
 564 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
 565 [
 566   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
 567   AC_SUBST(HOTSPOT_MAKE_ARGS)
 568 
 569   # The name of the Service Agent jar.
 570   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
 571   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 572     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
 573   fi
 574   AC_SUBST(SALIB_NAME)
 575 ])
 576 
 577 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
 578 [
 579   DEBUG_BINARIES=false
 580   STRIP_POLICY=min_strip
 581 
 582   #
 583   # DEBUG_SYMBOLS
 584   #
 585   AC_MSG_CHECKING([what type of debug symbols to use])
 586   AC_ARG_WITH([debug-symbols], [AS_HELP_STRING([--with-debug-symbols],
 587       [set the debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])],
 588       [],
 589       [with_debug_symbols="zipped"])
 590   DEBUG_SYMBOLS=$with_debug_symbols
 591   AC_MSG_RESULT([$DEBUG_SYMBOLS])
 592 
 593   if test "x$DEBUG_SYMBOLS" = xzipped; then
 594     ENABLE_DEBUG_SYMBOLS=true
 595     ZIP_DEBUGINFO_FILES=true
 596     DEBUG_BINARIES=true
 597     STRIP_POLICY=min_strip
 598     JAVAC_FLAGS="$JAVAC_FLAGS -g"
 599   elif test "x$DEBUG_SYMBOLS" = xnone; then
 600     ENABLE_DEBUG_SYMBOLS=false
 601     ZIP_DEBUGINFO_FILES=false
 602     DEBUG_BINARIES=false
 603     STRIP_POLICY=min_strip
 604   elif test "x$DEBUG_SYMBOLS" = xinternal; then
 605     ENABLE_DEBUG_SYMBOLS=false  # -g option only
 606     ZIP_DEBUGINFO_FILES=false
 607     DEBUG_BINARIES=true
 608     STRIP_POLICY=no_strip
 609     STRIP=""
 610     JAVAC_FLAGS="$JAVAC_FLAGS -g"
 611   elif test "x$DEBUG_SYMBOLS" = xexternal; then
 612     ENABLE_DEBUG_SYMBOLS=true
 613     ZIP_DEBUGINFO_FILES=false
 614     DEBUG_BINARIES=true
 615     STRIP_POLICY=min_strip
 616     JAVAC_FLAGS="$JAVAC_FLAGS -g"
 617   else
 618     AC_MSG_ERROR([Allowed debug symbols are: none, internal, external, zipped])
 619   fi
 620 
 621   #
 622   # DEBUG_BINARIES
 623   #
 624   if test "x$DEBUG_BINARIES" = xtrue; then
 625     enable_debug_binaries=yes
 626   else
 627     enable_debug_binaries=no
 628   fi
 629   AC_MSG_CHECKING([if we should generate debug information])
 630   AC_ARG_ENABLE([debug-binaries],
 631       [AS_HELP_STRING([--disable-debug-binaries],[disable generating debug information @<:@enabled@:>@])])
 632   AC_MSG_RESULT([$enable_debug_binaries])
 633   if test "x$enable_debug_binaries" = xyes; then
 634     DEBUG_BINARIES=true
 635   else
 636     DEBUG_BINARIES=false
 637   fi
 638 
 639   #
 640   # STRIP_POLICY
 641   #
 642   strip_policy=$STRIP_POLICY
 643   AC_MSG_CHECKING([what policy of strip])
 644   AC_ARG_WITH([strip-policy], [AS_HELP_STRING([--with-strip-policy],
 645       [set the policy of strip (all_strip, min_strip, no_strip) @<:@min_strip@:>@])],
 646       [STRIP_POLICY=$strip_policy])
 647   AC_MSG_RESULT([$STRIP_POLICY])
 648 
 649   if test "x$STRIP_POLICY" != xall_strip && \
 650       test "x$STRIP_POLICY" != xmin_strip && \
 651       test "x$STRIP_POLICY" != xno_strip; then
 652     AC_MSG_ERROR([Allowed strip policies are: all_strip, min_strip, no_strip])
 653   fi
 654 
 655   #
 656   # ENABLE_DEBUG_SYMBOLS
 657   # This must be done after the toolchain is setup, since we're looking at objcopy.
 658   #
 659   if test "x$ENABLE_DEBUG_SYMBOLS" = xtrue; then
 660     enable_debug_symbols=yes
 661   else
 662     enable_debug_symbols=no
 663   fi
 664   AC_ARG_ENABLE([debug-symbols],
 665       [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
 666 
 667   AC_MSG_CHECKING([if we should generate debug symbols])
 668 
 669   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
 670     # explicit enabling of enable-debug-symbols and can't find objcopy
 671     #   this is an error
 672     AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
 673   fi
 674 
 675   if test "x$enable_debug_symbols" = "xyes"; then
 676     ENABLE_DEBUG_SYMBOLS=true
 677   elif test "x$enable_debug_symbols" = "xno"; then
 678     ENABLE_DEBUG_SYMBOLS=false
 679   else
 680     # Default is on if objcopy is found
 681     if test "x$OBJCOPY" != x; then
 682       ENABLE_DEBUG_SYMBOLS=true
 683     # MacOS X and Windows don't use objcopy but default is on for those OSes
 684     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
 685       ENABLE_DEBUG_SYMBOLS=true
 686     else
 687       ENABLE_DEBUG_SYMBOLS=false
 688     fi
 689   fi
 690 
 691   AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
 692 
 693   #
 694   # ZIP_DEBUGINFO_FILES
 695   #
 696   if test "x$ZIP_DEBUGINFO_FILES" = xtrue; then
 697     enable_zip_debug_info=yes
 698   else
 699     enable_zip_debug_info=no
 700   fi
 701   AC_MSG_CHECKING([if we should zip debug-info files])
 702   AC_ARG_ENABLE([zip-debug-info],
 703       [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])

 704   AC_MSG_RESULT([${enable_zip_debug_info}])
 705 
 706   if test "x${enable_zip_debug_info}" = "xno"; then
 707     ZIP_DEBUGINFO_FILES=false
 708   else
 709     ZIP_DEBUGINFO_FILES=true
 710   fi
 711 
 712   AC_SUBST(DEBUG_SYMBOLS)
 713   AC_SUBST(DEBUG_BINARIES)
 714   AC_SUBST(STRIP_POLICY)
 715   AC_SUBST(ENABLE_DEBUG_SYMBOLS)
 716   AC_SUBST(ZIP_DEBUGINFO_FILES)
 717 ])
 718 
 719 ################################################################################
 720 #
 721 # Gcov coverage data for hotspot
 722 #
 723 AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
 724 [
 725   AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage],
 726       [enable native compilation with code coverage data@<:@disabled@:>@])])
 727   GCOV_ENABLED="false"
 728   if test "x$enable_native_coverage" = "xyes"; then
 729     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
 730       AC_MSG_CHECKING([if native coverage is enabled])
 731       AC_MSG_RESULT([yes])
 732       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
 733       GCOV_LDFLAGS="-fprofile-arcs"
 734       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"


< prev index next >