559 TOOLCHAIN_CFLAGS_JDK="-pipe"
560 TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
561 fi
562 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
563 TOOLCHAIN_FLAGS="-errtags -errfmt"
564 TOOLCHAIN_CFLAGS="-errshort=tags"
565
566 TOOLCHAIN_CFLAGS_JDK="-mt $TOOLCHAIN_FLAGS"
567 TOOLCHAIN_CFLAGS_JDK_CONLY="-W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
568 TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
569 TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
570 -library=stlport4 -mt -features=no%except $TOOLCHAIN_FLAGS"
571 if test "x$DEBUG_LEVEL" = xslowdebug; then
572 # Previously -g was used instead of -g0 for slowdebug; this is equivalent
573 # to setting +d.
574 TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM +d"
575 fi
576
577 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
578 # Suggested additions: -qsrcmsg to get improved error reporting
579 TOOLCHAIN_CFLAGS_JDK="-qchars=signed -qfullpath -qsaveopt -qstackprotect" # add on both CFLAGS
580 TOOLCHAIN_CFLAGS_JVM="-qtune=balanced \
581 -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
582 -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno -qstackprotect"
583 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
584 TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
585 TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
586 fi
587
588 # CFLAGS C language level for JDK sources (hotspot only uses C++)
589 # Ideally we would have a common level across all toolchains so that all sources
590 # are sure to conform to the same standard. Unfortunately neither our sources nor
591 # our toolchains are in a condition to support that. But what we loosely aim for is
592 # C99 level.
593 if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
594 # This raises the language level for older 4.8 gcc, while lowering it for later
595 # versions. clang and xlclang support the same flag.
596 LANGSTD_CFLAGS="-std=c99"
597 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
598 # We can't turn on -std=c99 without breaking compilation of the splashscreen/png
599 # utilities. But we can enable c99 as below (previously achieved by using -Xa).
600 # It is the no_lib that makes the difference.
|
559 TOOLCHAIN_CFLAGS_JDK="-pipe"
560 TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
561 fi
562 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
563 TOOLCHAIN_FLAGS="-errtags -errfmt"
564 TOOLCHAIN_CFLAGS="-errshort=tags"
565
566 TOOLCHAIN_CFLAGS_JDK="-mt $TOOLCHAIN_FLAGS"
567 TOOLCHAIN_CFLAGS_JDK_CONLY="-W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
568 TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
569 TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
570 -library=stlport4 -mt -features=no%except $TOOLCHAIN_FLAGS"
571 if test "x$DEBUG_LEVEL" = xslowdebug; then
572 # Previously -g was used instead of -g0 for slowdebug; this is equivalent
573 # to setting +d.
574 TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM +d"
575 fi
576
577 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
578 # Suggested additions: -qsrcmsg to get improved error reporting
579 # set -qtbtable=full for a better traceback table/better stacks in hs_err when xlc16 is used
580 TOOLCHAIN_CFLAGS_JDK="-qtbtable=full -qchars=signed -qfullpath -qsaveopt -qstackprotect" # add on both CFLAGS
581 TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
582 -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
583 -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno -qstackprotect"
584 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
585 TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
586 TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
587 fi
588
589 # CFLAGS C language level for JDK sources (hotspot only uses C++)
590 # Ideally we would have a common level across all toolchains so that all sources
591 # are sure to conform to the same standard. Unfortunately neither our sources nor
592 # our toolchains are in a condition to support that. But what we loosely aim for is
593 # C99 level.
594 if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
595 # This raises the language level for older 4.8 gcc, while lowering it for later
596 # versions. clang and xlclang support the same flag.
597 LANGSTD_CFLAGS="-std=c99"
598 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
599 # We can't turn on -std=c99 without breaking compilation of the splashscreen/png
600 # utilities. But we can enable c99 as below (previously achieved by using -Xa).
601 # It is the no_lib that makes the difference.
|