common/autoconf/jdk-options.m4

changeset 2236
19e8754f5415
parent 2206
7ba4e17574e0
child 2316
64a3eeabf6e5
child 2325
a5b23c21a665
equal deleted inserted replaced
2234:1380ce862bbd 2236:19e8754f5415
554 AC_SUBST(SALIB_NAME) 554 AC_SUBST(SALIB_NAME)
555 ]) 555 ])
556 556
557 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], 557 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
558 [ 558 [
559 # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
560 # but if somebody does not specify it via configure, we still want to preserve old
561 # behaviour of --disable-debug-symbols
559 # 562 #
560 # ENABLE_DEBUG_SYMBOLS 563 # ENABLE_DEBUG_SYMBOLS
561 # This must be done after the toolchain is setup, since we're looking at objcopy. 564 # This must be done after the toolchain is setup, since we're looking at objcopy.
562 # 565 #
563 AC_ARG_ENABLE([debug-symbols], 566 AC_ARG_ENABLE([debug-symbols],
587 fi 590 fi
588 fi 591 fi
589 592
590 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) 593 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
591 594
595 # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
596 # but if somebody does not specify it via configure, we still want to preserve old
597 # behaviour of --disable-zip-debug-info.
592 # 598 #
593 # ZIP_DEBUGINFO_FILES 599 # ZIP_DEBUGINFO_FILES
594 # 600 #
595 AC_MSG_CHECKING([if we should zip debug-info files]) 601 AC_MSG_CHECKING([if we should zip debug-info files])
596 AC_ARG_ENABLE([zip-debug-info], 602 AC_ARG_ENABLE([zip-debug-info],
598 [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"]) 604 [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
599 AC_MSG_RESULT([${enable_zip_debug_info}]) 605 AC_MSG_RESULT([${enable_zip_debug_info}])
600 606
601 if test "x${enable_zip_debug_info}" = "xno"; then 607 if test "x${enable_zip_debug_info}" = "xno"; then
602 ZIP_DEBUGINFO_FILES=false 608 ZIP_DEBUGINFO_FILES=false
603 else 609 elif test "x${enable_zip_debug_info}" = "xyes"; then
604 ZIP_DEBUGINFO_FILES=true 610 ZIP_DEBUGINFO_FILES=true
605 fi 611 fi
606 612
613 #
614 # NATIVE_DEBUG_SYMBOLS
615 # This must be done after the toolchain is setup, since we're looking at objcopy.
616 # In addition, this must be done after ENABLE_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES
617 # checking in order to preserve backwards compatibility post JDK-8207234.
618 #
619 AC_MSG_CHECKING([what type of native debug symbols to use (this will override previous settings)])
620 AC_ARG_WITH([native-debug-symbols],
621 [AS_HELP_STRING([--with-native-debug-symbols],
622 [set the native debug symbol configuration (none, internal, external, zipped) @<:@varying@:>@])],
623 [
624 if test "x$OPENJDK_TARGET_OS" = xaix; then
625 if test "x$with_native_debug_symbols" = xexternal || test "x$with_native_debug_symbols" = xzipped; then
626 AC_MSG_ERROR([AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols])
627 fi
628 fi
629 ],
630 [
631 # Default to unset for backwards compatibility
632 with_native_debug_symbols=""
633 ])
634 NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
635 if test "x$NATIVE_DEBUG_SYMBOLS" = x; then
636 AC_MSG_RESULT([not specified])
637 else
638 AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS])
639 fi
640 # Default is empty
641 DEBUG_BINARIES=
642 # Default is min_strip. Possible values are min_strip, all_strip, no_strip
643 STRIP_POLICY=min_strip
644
645 if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
646
647 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
648 if test "x$OBJCOPY" = x; then
649 # enabling of enable-debug-symbols and can't find objcopy
650 # this is an error
651 AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols])
652 fi
653 fi
654
655 ENABLE_DEBUG_SYMBOLS=true
656 STRIP_POLICY=min_strip
657 ZIP_DEBUGINFO_FILES=true
658 elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
659 ENABLE_DEBUG_SYMBOLS=false
660 STRIP_POLICY=min_strip
661 ZIP_DEBUGINFO_FILES=false
662 elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
663 ENABLE_DEBUG_SYMBOLS=true
664 STRIP_POLICY=no_strip
665 ZIP_DEBUGINFO_FILES=false
666 POST_STRIP_CMD=
667 DEBUG_BINARIES=true
668 elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
669
670 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
671 if test "x$OBJCOPY" = x; then
672 # enabling of enable-debug-symbols and can't find objcopy
673 # this is an error
674 AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols])
675 fi
676 fi
677
678 ENABLE_DEBUG_SYMBOLS=true
679 STRIP_POLICY=min_strip
680 ZIP_DEBUGINFO_FILES=false
681 elif test "x$NATIVE_DEBUG_SYMBOLS" != x; then
682 AC_MSG_ERROR([Allowed native debug symbols are: none, internal, external, zipped])
683 else
684 AC_MSG_NOTICE([--with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info])
685 fi
686
607 AC_SUBST(ENABLE_DEBUG_SYMBOLS) 687 AC_SUBST(ENABLE_DEBUG_SYMBOLS)
688 AC_SUBST(STRIP_POLICY)
689 AC_SUBST(POST_STRIP_CMD)
690 AC_SUBST(DEBUG_BINARIES)
608 AC_SUBST(ZIP_DEBUGINFO_FILES) 691 AC_SUBST(ZIP_DEBUGINFO_FILES)
609 ]) 692 ])
610 693
611 # Support for customization of the build process. Some build files 694 # Support for customization of the build process. Some build files
612 # will include counterparts from this location, if they exist. This allows 695 # will include counterparts from this location, if they exist. This allows

mercurial