diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
index 40f60a9c85ddb36cdfb421b010d38145e639a43f..6e9789642aa26c17a8eb5107a35b197047c9cc3b 100644
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -407,11 +407,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
         C_O_FLAG_HI="-O3"
         C_O_FLAG_NORM="-O2"
       fi
-      if test "x$HAS_CFLAG_OPTIMIZE_DEBUG" = "xtrue"; then
-        C_O_FLAG_DEBUG="$CFLAG_OPTIMIZE_DEBUG_FLAG"
-      else
-        C_O_FLAG_DEBUG="-O0"
-      fi
+      C_O_FLAG_DEBUG="-O0"
       C_O_FLAG_NONE="-O0"
     elif test "x$TOOLCHAIN_TYPE" = xclang; then
       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 2ec5ac45fb87d1ce061a6bbc014ea59e6f4836f1..57465032e7744c3d5b1297103e9939cbbb74af83 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4311,7 +4311,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1403557683
+DATE_WHEN_GENERATED=1404942241
 
 ###############################################################################
 #
@@ -42011,11 +42011,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
         C_O_FLAG_HI="-O3"
         C_O_FLAG_NORM="-O2"
       fi
-      if test "x$HAS_CFLAG_OPTIMIZE_DEBUG" = "xtrue"; then
-        C_O_FLAG_DEBUG="$CFLAG_OPTIMIZE_DEBUG_FLAG"
-      else
-        C_O_FLAG_DEBUG="-O0"
-      fi
+      C_O_FLAG_DEBUG="-O0"
       C_O_FLAG_NONE="-O0"
     elif test "x$TOOLCHAIN_TYPE" = xclang; then
       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
diff --git a/test/Makefile b/test/Makefile
index 7a66290318cfac1c9c704f7622c42d5402ee904c..89141cce04b6fe19217dacfd0dbd2fdef8638e7e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -66,6 +66,32 @@ jdk_% core_%s svc_%:
 hotspot_%:
 	@$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@)
 
+#
+# jtreg_tests
+#
+# Invocation:
+#
+# make jtreg_tests TESTDIRS=<test-dirs>
+#
+# where <test-dirs> is something like '../<component>/test/runtime',
+# <component> in turn being one of the top level directories (for
+# example 'hotspot').
+#
+# The below will strip the path prefix and delegate to the
+# corresponding ../<component>/test/Makefile.
+
+ifneq ($(TESTDIRS),)
+# Extract the component from ../<component>/...
+COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS)))
+
+# Strip off the ../<component>/test prefix and pass the rest as TESTDIRS
+# to the delegate Makefile
+TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS))
+endif
+
+jtreg_tests:
+	@$(NO_STOPPING)$(call SUBDIR_TEST, $(TOPDIR)/$(COMPONENT), TESTDIRS=$(TESTDIRS_TESTS) $@)
+
 ################################################################
 
 # Phony targets (e.g. these are not filenames)