< prev index next >

common/autoconf/flags.m4

Print this page
rev 1225 : 8065648: Remove the flag -fsanitize=undefined for GCC 4.9 and later


 331   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 332     CFLAGS_DEBUG_SYMBOLS="-g"
 333     CXXFLAGS_DEBUG_SYMBOLS="-g"
 334   fi
 335   AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
 336   AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
 337 
 338   # bounds, memory and behavior checking options
 339   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 340     case $DEBUG_LEVEL in
 341     release )
 342       # no adjustment
 343       ;;
 344     fastdebug )
 345       # no adjustment
 346       ;;
 347     slowdebug )
 348       # Add runtime stack smashing and undefined behavior checks
 349       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
 350       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
 351       if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
 352         CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
 353         CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
 354       fi
 355       ;;
 356     esac
 357   fi
 358   AC_SUBST(CFLAGS_DEBUG_OPTIONS)
 359   AC_SUBST(CXXFLAGS_DEBUG_OPTIONS)
 360 
 361   # Optimization levels
 362   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 363     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
 364 
 365     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
 366       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
 367       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
 368       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
 369       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
 370       C_O_FLAG_DEBUG="-xregs=no%frameptr"
 371       C_O_FLAG_NONE="-xregs=no%frameptr"
 372       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
 373       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
 374       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"




 331   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 332     CFLAGS_DEBUG_SYMBOLS="-g"
 333     CXXFLAGS_DEBUG_SYMBOLS="-g"
 334   fi
 335   AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
 336   AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
 337 
 338   # bounds, memory and behavior checking options
 339   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 340     case $DEBUG_LEVEL in
 341     release )
 342       # no adjustment
 343       ;;
 344     fastdebug )
 345       # no adjustment
 346       ;;
 347     slowdebug )
 348       # Add runtime stack smashing and undefined behavior checks
 349       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
 350       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"




 351       ;;
 352     esac
 353   fi
 354   AC_SUBST(CFLAGS_DEBUG_OPTIONS)
 355   AC_SUBST(CXXFLAGS_DEBUG_OPTIONS)
 356 
 357   # Optimization levels
 358   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 359     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
 360 
 361     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
 362       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
 363       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
 364       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
 365       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
 366       C_O_FLAG_DEBUG="-xregs=no%frameptr"
 367       C_O_FLAG_NONE="-xregs=no%frameptr"
 368       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
 369       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
 370       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"


< prev index next >