8087156: SetupNativeCompilation ignores CFLAGS_release for cpp files
authoromajid
Thu, 11 Jun 2015 10:37:11 -0400
changeset 31015 babc2e8b3e97
parent 31014 a3b1e5a584bd
child 31016 b5fc60ba6aa1
child 31222 9d93b1ae0d1e
child 31316 8bd482eb48e2
8087156: SetupNativeCompilation ignores CFLAGS_release for cpp files Reviewed-by: erikj
make/common/NativeCompilation.gmk
--- a/make/common/NativeCompilation.gmk	Tue Jun 09 16:08:38 2015 +0200
+++ b/make/common/NativeCompilation.gmk	Thu Jun 11 10:37:11 2015 -0400
@@ -449,6 +449,16 @@
     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
   endif
 
+  # If no C++ flags are explicitly set, default to using the C flags.
+  # After that, we can set additional C++ flags that should not interfere
+  # with the mechanism for copying the C flags by default.
+  ifeq ($$($1_CXXFLAGS),)
+    $1_CXXFLAGS:=$$($1_CFLAGS)
+  endif
+  ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
+    $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
+  endif
+
   ifeq ($$($1_DEBUG_SYMBOLS), true)
     ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
       ifdef OPENJDK
@@ -466,16 +476,6 @@
     endif
   endif
 
-  # If no C++ flags are explicitly set, default to using the C flags.
-  # After that, we can set additional C++ flags that should not interfere
-  # with the mechanism for copying the C flags by default.
-  ifeq ($$($1_CXXFLAGS),)
-    $1_CXXFLAGS:=$$($1_CFLAGS)
-  endif
-  ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)),)
-    $1_EXTRA_CXXFLAGS:=$$($1_EXTRA_CFLAGS)
-  endif
-
   ifneq (,$$($1_REORDER))
     $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER)
     $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)