void-packages/srcpkgs/openjdk8/patches/013_werror.patch

52 lines
2.2 KiB
Diff

# HG changeset patch
# User andrew
# Date 1408489026 -3600
# Tue Aug 19 23:57:06 2014 +0100
# Node ID 22d29c372fc4271930e4169a66818f67e27cf6e8
# Parent c75d6ce2e98b901b31ac84dbbb59667e03beb9d5
Merge jdk8u20-b23
diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2019-01-25 15:02:27.660107711 +0000
+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2019-01-25 15:05:30.485236897 +0000
@@ -198,7 +198,9 @@
endif
# Compiler warnings are treated as errors
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
WARNINGS_ARE_ERRORS = -Werror
+endif
ifeq ($(USE_CLANG), true)
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/adlc.make openjdk/hotspot/make/solaris/makefiles/adlc.make
--- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/make/solaris/makefiles/adlc.make 2019-01-25 15:06:44.376075821 +0000
@@ -73,8 +73,10 @@
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
# Compiler warnings are treated as errors
-ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
- CFLAGS_WARN = +w -errwarn
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
+ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+ CFLAGS_WARN = +w -errwarn
+ endif
endif
# When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly
# instantiated template functions trigger this warning when +w is active.
diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make
--- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make 2019-01-16 07:13:59.000000000 +0000
+++ openjdk/hotspot/make/solaris/makefiles/gcc.make 2019-01-25 15:05:30.485236897 +0000
@@ -116,7 +116,9 @@
# Compiler warnings are treated as errors
-WARNINGS_ARE_ERRORS = -Werror
+ifneq ($(COMPILER_WARNINGS_FATAL),false)
+WARNINGS_ARE_ERRORS = -Werror
+endif
# Enable these warnings. See 'info gcc' about details on these options
WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)