More cleaning up. Probably done now... ihse-cflags-rewrite-branch
authorihse
Mon, 26 Feb 2018 14:30:58 +0100
branchihse-cflags-rewrite-branch
changeset 56179 dc0add3a3212
parent 56178 7e63ac6274dd
child 56180 62f39c252e0c
More cleaning up. Probably done now...
make/autoconf/flags-cflags.m4
make/autoconf/flags.m4
--- a/make/autoconf/flags-cflags.m4	Mon Feb 26 14:25:00 2018 +0100
+++ b/make/autoconf/flags-cflags.m4	Mon Feb 26 14:30:58 2018 +0100
@@ -156,24 +156,9 @@
     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
   fi
   AC_SUBST(JVM_CFLAGS_SYMBOLS)
-
-  # bounds, memory and behavior checking options
-  if test "x$TOOLCHAIN_TYPE" = xgcc; then
-    case $DEBUG_LEVEL in
-    slowdebug )
-      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
-      # get's added conditionally on whether we produce debug symbols or not.
-      # This is most likely not really correct.
-
-      if test "x$STACK_PROTECTOR_CFLAG" != x; then
-        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
-      fi
-      ;;
-    esac
-  fi
 ])
 
-AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
+AC_DEFUN([FLAGS_SETUP_WARNINGS],
 [
   AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors],
       [do not consider native warnings to be an error @<:@enabled@:>@])])
@@ -249,7 +234,10 @@
   AC_SUBST(DISABLE_WARNING_PREFIX)
   AC_SUBST(BUILD_CC_DISABLE_WARNING_PREFIX)
   AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
+])
 
+AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
+[
   # bounds, memory and behavior checking options
   if test "x$TOOLCHAIN_TYPE" = xgcc; then
     case $DEBUG_LEVEL in
@@ -272,6 +260,10 @@
 
       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+
+      if test "x$STACK_PROTECTOR_CFLAG" != x; then
+        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+      fi
       ;;
     esac
   fi
@@ -279,11 +271,6 @@
 
 AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
 [
-
-  # Optimization levels
-  # Most toolchains share opt flags between CC and CXX;
-  # setup for C and duplicate afterwards.
-
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     CC_HIGHEST="-fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
 
--- a/make/autoconf/flags.m4	Mon Feb 26 14:25:00 2018 +0100
+++ b/make/autoconf/flags.m4	Mon Feb 26 14:30:58 2018 +0100
@@ -381,6 +381,7 @@
 
   FLAGS_SETUP_SHARED_LIBS
   FLAGS_SETUP_DEBUG_SYMBOLS
+  FLAGS_SETUP_WARNINGS
   FLAGS_SETUP_QUALITY_CHECKS
   FLAGS_SETUP_OPTIMIZATION