474 # 475 AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], 476 [ 477 AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) 478 479 if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then 480 ENABLE_INTREE_EC=yes 481 AC_MSG_RESULT([yes]) 482 else 483 ENABLE_INTREE_EC=no 484 AC_MSG_RESULT([no]) 485 fi 486 487 AC_SUBST(ENABLE_INTREE_EC) 488 ]) 489 490 491 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], 492 [ 493 # 494 # ENABLE_DEBUG_SYMBOLS 495 # This must be done after the toolchain is setup, since we're looking at objcopy. 496 # 497 AC_ARG_ENABLE([debug-symbols], 498 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])]) 499 500 AC_MSG_CHECKING([if we should generate debug symbols]) 501 502 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then 503 # explicit enabling of enable-debug-symbols and can't find objcopy 504 # this is an error 505 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) 506 fi 507 508 if test "x$enable_debug_symbols" = "xyes"; then 509 ENABLE_DEBUG_SYMBOLS=true 510 elif test "x$enable_debug_symbols" = "xno"; then 511 ENABLE_DEBUG_SYMBOLS=false 512 else 513 # Default is on if objcopy is found 514 if test "x$OBJCOPY" != x; then 515 ENABLE_DEBUG_SYMBOLS=true 516 # MacOS X and Windows don't use objcopy but default is on for those OSes 517 elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then 518 ENABLE_DEBUG_SYMBOLS=true 519 else 520 ENABLE_DEBUG_SYMBOLS=false 521 fi 522 fi 523 524 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) 525 526 # 527 # ZIP_DEBUGINFO_FILES 528 # 529 AC_MSG_CHECKING([if we should zip debug-info files]) 530 AC_ARG_ENABLE([zip-debug-info], 531 [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])], 532 [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"]) 533 AC_MSG_RESULT([${enable_zip_debug_info}]) 534 535 if test "x${enable_zip_debug_info}" = "xno"; then 536 ZIP_DEBUGINFO_FILES=false 537 else 538 ZIP_DEBUGINFO_FILES=true 539 fi 540 541 AC_SUBST(ENABLE_DEBUG_SYMBOLS) 542 AC_SUBST(ZIP_DEBUGINFO_FILES) 543 ]) 544 545 ################################################################################ 546 # 547 # Gcov coverage data for hotspot 548 # 549 AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE], 550 [ 551 AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage], 552 [enable native compilation with code coverage data@<:@disabled@:>@])]) 553 GCOV_ENABLED="false" 554 if test "x$enable_native_coverage" = "xyes"; then 555 if test "x$TOOLCHAIN_TYPE" = "xgcc"; then 556 AC_MSG_CHECKING([if native coverage is enabled]) 557 AC_MSG_RESULT([yes]) 558 GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline" 559 GCOV_LDFLAGS="-fprofile-arcs" 560 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS" | 474 # 475 AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], 476 [ 477 AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) 478 479 if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then 480 ENABLE_INTREE_EC=yes 481 AC_MSG_RESULT([yes]) 482 else 483 ENABLE_INTREE_EC=no 484 AC_MSG_RESULT([no]) 485 fi 486 487 AC_SUBST(ENABLE_INTREE_EC) 488 ]) 489 490 491 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], 492 [ 493 # 494 # NATIVE_DEBUG_SYMBOLS 495 # This must be done after the toolchain is setup, since we're looking at objcopy. 496 # 497 AC_MSG_CHECKING([what type of native debug symbols to use]) 498 AC_ARG_WITH([native-debug-symbols], 499 [AS_HELP_STRING([--with-native-debug-symbols], 500 [set the native debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])], 501 [], 502 [with_native_debug_symbols="zipped"]) 503 NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols 504 AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS]) 505 506 if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then 507 508 if test "x$OBJCOPY" = x; then 509 # explicit enabling of enable-debug-symbols and can't find objcopy 510 # this is an error 511 AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols]) 512 fi 513 514 ENABLE_DEBUG_SYMBOLS=true 515 ZIP_DEBUGINFO_FILES=true 516 DEBUG_BINARIES=true 517 STRIP_POLICY=min_strip 518 elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then 519 ENABLE_DEBUG_SYMBOLS=false 520 ZIP_DEBUGINFO_FILES=false 521 DEBUG_BINARIES=false 522 STRIP_POLICY=no_strip 523 elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then 524 ENABLE_DEBUG_SYMBOLS=false # -g option only 525 ZIP_DEBUGINFO_FILES=false 526 DEBUG_BINARIES=true 527 STRIP_POLICY=no_strip 528 STRIP="" 529 elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then 530 531 if test "x$OBJCOPY" = x; then 532 # explicit enabling of enable-debug-symbols and can't find objcopy 533 # this is an error 534 AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols]) 535 fi 536 537 ENABLE_DEBUG_SYMBOLS=true 538 ZIP_DEBUGINFO_FILES=false 539 DEBUG_BINARIES=true 540 STRIP_POLICY=min_strip 541 else 542 AC_MSG_ERROR([Allowed native debug symbols are: none, internal, external, zipped]) 543 fi 544 545 # --enable-debug-symbols is deprecated. 546 # Please use --with-debug-symbols=[internal,external,zipped] . 547 BASIC_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols, 548 [Please use --with-debug-symbols=[[internal,external,zipped]] .]) 549 550 # --enable-zip-debug-info is deprecated. 551 # Please use --with-debug-symbols=zipped . 552 BASIC_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info, 553 [Please use --with-debug-symbols=zipped .]) 554 555 AC_SUBST(NATIVE_DEBUG_SYMBOLS) 556 AC_SUBST(DEBUG_BINARIES) 557 AC_SUBST(STRIP_POLICY) 558 AC_SUBST(ENABLE_DEBUG_SYMBOLS) 559 AC_SUBST(ZIP_DEBUGINFO_FILES) 560 ]) 561 562 ################################################################################ 563 # 564 # Gcov coverage data for hotspot 565 # 566 AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE], 567 [ 568 AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage], 569 [enable native compilation with code coverage data@<:@disabled@:>@])]) 570 GCOV_ENABLED="false" 571 if test "x$enable_native_coverage" = "xyes"; then 572 if test "x$TOOLCHAIN_TYPE" = "xgcc"; then 573 AC_MSG_CHECKING([if native coverage is enabled]) 574 AC_MSG_RESULT([yes]) 575 GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline" 576 GCOV_LDFLAGS="-fprofile-arcs" 577 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS" |