make/autoconf/flags-cflags.m4
changeset 54937 7e5e0b326ed7
parent 54711 297ddf282627
child 54999 98ed47cd114a
equal deleted inserted replaced
54936:8c63164bd540 54937:7e5e0b326ed7
   298     C_O_FLAG_NORM="-O2"
   298     C_O_FLAG_NORM="-O2"
   299     C_O_FLAG_SIZE="-Os"
   299     C_O_FLAG_SIZE="-Os"
   300     C_O_FLAG_DEBUG="-O0"
   300     C_O_FLAG_DEBUG="-O0"
   301     C_O_FLAG_DEBUG_JVM="-O0"
   301     C_O_FLAG_DEBUG_JVM="-O0"
   302     C_O_FLAG_NONE="-O0"
   302     C_O_FLAG_NONE="-O0"
       
   303     # -D_FORTIFY_SOURCE=2 hardening option needs optimization (at least -O1) enabled
       
   304     # set for lower O-levels -U_FORTIFY_SOURCE to overwrite previous settings
       
   305     if test "x$OPENJDK_TARGET_OS" = xlinux -a "x$DEBUG_LEVEL" = "xfastdebug"; then
       
   306       ENABLE_FORTIFY_CFLAGS="-D_FORTIFY_SOURCE=2"
       
   307       DISABLE_FORTIFY_CFLAGS="-U_FORTIFY_SOURCE"
       
   308       C_O_FLAG_HIGHEST_JVM="${C_O_FLAG_HIGHEST_JVM} ${ENABLE_FORTIFY_CFLAGS}"
       
   309       C_O_FLAG_HIGHEST="${C_O_FLAG_HIGHEST} ${ENABLE_FORTIFY_CFLAGS}"
       
   310       C_O_FLAG_HI="${C_O_FLAG_HI} ${ENABLE_FORTIFY_CFLAGS}"
       
   311       C_O_FLAG_NORM="${C_O_FLAG_NORM} ${ENABLE_FORTIFY_CFLAGS}"
       
   312       C_O_FLAG_SIZE="${C_O_FLAG_SIZE} ${DISABLE_FORTIFY_CFLAGS}"
       
   313       C_O_FLAG_DEBUG="${C_O_FLAG_DEBUG} ${DISABLE_FORTIFY_CFLAGS}"
       
   314       C_O_FLAG_DEBUG_JVM="${C_O_FLAG_DEBUG_JVM} ${DISABLE_FORTIFY_CFLAGS}"
       
   315       C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
       
   316     fi
   303   elif test "x$TOOLCHAIN_TYPE" = xclang; then
   317   elif test "x$TOOLCHAIN_TYPE" = xclang; then
   304     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   318     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   305       # On MacOSX we optimize for size, something
   319       # On MacOSX we optimize for size, something
   306       # we should do for all platforms?
   320       # we should do for all platforms?
   307       C_O_FLAG_HIGHEST_JVM="-Os"
   321       C_O_FLAG_HIGHEST_JVM="-Os"