8081616: Remove hard-coded CFLAGS_WARNINGS_ARE_ERRORS to fully respect --disable-warnings-as-errors
authorihse
Tue, 02 Jun 2015 15:09:49 +0200
changeset 31069 14be2fa211f6
parent 31068 64fa8113cf68
child 31075 317ef3b5d6f6
child 31451 4e604af41e0e
8081616: Remove hard-coded CFLAGS_WARNINGS_ARE_ERRORS to fully respect --disable-warnings-as-errors Reviewed-by: erikj, dholmes
jdk/make/lib/Lib-java.instrument.gmk
jdk/make/lib/Lib-java.management.gmk
jdk/make/lib/Lib-jdk.attach.gmk
jdk/make/lib/Lib-jdk.hprof.agent.gmk
jdk/make/lib/Lib-jdk.jdi.gmk
jdk/make/lib/Lib-jdk.jdwp.agent.gmk
jdk/make/lib/Lib-jdk.management.gmk
jdk/make/lib/Lib-jdk.sctp.gmk
--- a/jdk/make/lib/Lib-java.instrument.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-java.instrument.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -61,7 +61,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBINSTRUMENT_SRC), \
     OPTIMIZATION := LOW, \
-    CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \
+    CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
     CFLAGS_debug := -DJPLIS_LOGGING, \
     CFLAGS_release := -DNO_JPLIS_LOGGING, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
--- a/jdk/make/lib/Lib-java.management.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-java.management.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -50,7 +50,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBMANAGEMENT_SRC), \
     OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(LIBMANAGEMENT_CFLAGS), \
+    CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_CFLAGS), \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/Lib-jdk.attach.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.attach.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(call FindSrcDirsForLib, jdk.attach, attach), \
     OPTIMIZATION := LOW, \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
+    CFLAGS := $(CFLAGS_JDKLIB) \
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
         $(LIBJAVA_HEADER_FLAGS) $(LIBATTACH_CFLAGS), \
     CFLAGS_windows := /Gy, \
--- a/jdk/make/lib/Lib-jdk.hprof.agent.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.hprof.agent.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 
 BUILD_LIBHPROF_CFLAGS := $(addprefix -I, $(BUILD_LIBHPROF_SRC)) \
     -I$(JDK_TOPDIR)/src/demo/share/jvmti/java_crw_demo
-    
+
 BUILD_LIBHPROF_LDFLAGS :=
 
 LIBHPROF_OPTIMIZATION := HIGHEST
@@ -46,7 +46,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(BUILD_LIBHPROF_SRC), \
     OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
+    CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBHPROF_CFLAGS), \
     CFLAGS_debug := -DHPROF_LOGGING, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
@@ -75,7 +75,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJAVA_CRW_DEMO_SRC), \
     OPTIMIZATION := LOW, \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
+    CFLAGS := $(CFLAGS_JDKLIB) \
         $(addprefix -I, $(LIBJAVA_CRW_DEMO_SRC)), \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
--- a/jdk/make/lib/Lib-jdk.jdi.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.jdi.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBDT_SHMEM_SRC), \
       OPTIMIZATION := LOW, \
-      CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
+      CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
           $(LIBDT_SHMEM_CPPFLAGS), \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
       LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
--- a/jdk/make/lib/Lib-jdk.jdwp.agent.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.jdwp.agent.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBDT_SOCKET_SRC), \
     OPTIMIZATION := LOW, \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
+    CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
         $(LIBDT_SOCKET_CPPFLAGS), \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -77,7 +77,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJDWP_SRC), \
     OPTIMIZATION := LOW, \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
+    CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
         $(LIBJDWP_CPPFLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.jdwp.agent, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
--- a/jdk/make/lib/Lib-jdk.management.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.management.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -59,7 +59,7 @@
     SRC := $(LIBMANAGEMENT_EXT_SRC), \
     LANG := C, \
     OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
-    CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(LIBMANAGEMENT_EXT_CFLAGS), \
+    CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement_ext/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/Lib-jdk.sctp.gmk	Fri May 29 20:15:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.sctp.gmk	Tue Jun 02 15:09:49 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -30,12 +30,8 @@
 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
 
   ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
-
-    # Suppress unused parameters required by exported JNI functions.
-    SCTP_WERROR := -Werror -Wno-error=unused-parameter
-    ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
-      SCTP_WERROR :=
-    endif
+    # DISABLED_WARNINGS_gcc := unused-parameter needed to
+    # suppress unused parameters required by exported JNI functions.
 
     $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
         LIBRARY := sctp, \
@@ -49,7 +45,7 @@
             $(LIBJAVA_HEADER_FLAGS) \
             -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \
             -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
-        CFLAGS_linux := $(SCTP_WERROR), \
+        DISABLED_WARNINGS_gcc := unused-parameter, \
         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \