Blame jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch

Alex Kashchenko d6f9d0
# HG changeset patch
Alex Kashchenko d6f9d0
# User coleenp
Alex Kashchenko d6f9d0
# Date 1525713256 -3600
Alex Kashchenko d6f9d0
#      Mon May 07 18:14:16 2018 +0100
Alex Kashchenko d6f9d0
# Node ID bcbc64dfb629c5f188bbf59b8f986ad95963ed60
Alex Kashchenko d6f9d0
# Parent  07a1135a327362f157955d470fad5df07cc35164
Alex Kashchenko d6f9d0
8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers
Alex Kashchenko d6f9d0
Summary: change to include atomic.inline.hpp and allocation.inline.hpp only in .cpp files and some build fixes from Kim to build on ubuntu without devkits
Alex Kashchenko d6f9d0
Reviewed-by: kbarrett, sgehwolf, erikj
Alex Kashchenko d6f9d0
Alex Kashchenko d6f9d0
diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
Alex Kashchenko d6f9d0
--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make
Alex Kashchenko d6f9d0
+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make
Alex Kashchenko d6f9d0
@@ -1,5 +1,5 @@
Alex Kashchenko d6f9d0
 #
Alex Kashchenko d6f9d0
-# Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
Alex Kashchenko d6f9d0
+# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
Alex Kashchenko d6f9d0
 # Copyright 2007, 2008 Red Hat, Inc.
Alex Kashchenko d6f9d0
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Alex Kashchenko d6f9d0
 #
Alex Kashchenko d6f9d0
@@ -25,8 +25,15 @@
Alex Kashchenko d6f9d0
 
Alex Kashchenko d6f9d0
 # Setup common to Zero (non-Shark) and Shark versions of VM
Alex Kashchenko d6f9d0
 
Alex Kashchenko d6f9d0
-# override this from the main file because some version of llvm do not like -Wundef
Alex Kashchenko d6f9d0
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wunused-function -Wunused-value
Alex Kashchenko d6f9d0
+# Some versions of llvm do not like -Wundef
Alex Kashchenko d6f9d0
+ifeq ($(USE_CLANG), true)
Alex Kashchenko d6f9d0
+  WARNING_FLAGS += -Wno-undef
Alex Kashchenko d6f9d0
+endif
Alex Kashchenko d6f9d0
+# Suppress some warning flags that are normally turned on for hotspot,
Alex Kashchenko d6f9d0
+# because some of the zero code has not been updated accordingly.
Alex Kashchenko d6f9d0
+WARNING_FLAGS += -Wno-return-type \
Alex Kashchenko d6f9d0
+  -Wno-format-nonliteral -Wno-format-security \
Alex Kashchenko d6f9d0
+  -Wno-maybe-uninitialized
Alex Kashchenko d6f9d0
 
Alex Kashchenko d6f9d0
 # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
Alex Kashchenko d6f9d0
 OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
Alex Kashchenko d6f9d0
@@ -42,5 +49,3 @@
Alex Kashchenko d6f9d0
 ifeq ($(ARCH_DATA_MODEL), 64)
Alex Kashchenko d6f9d0
   CFLAGS += -D_LP64=1
Alex Kashchenko d6f9d0
 endif
Alex Kashchenko d6f9d0
-
Alex Kashchenko d6f9d0
-OPT_CFLAGS/compactingPermGenGen.o = -O1
Alex Kashchenko d6f9d0
diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp
Alex Kashchenko d6f9d0
--- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp
Alex Kashchenko d6f9d0
+++ openjdk/hotspot/src/share/vm/runtime/java.cpp
Alex Kashchenko d6f9d0
@@ -45,6 +45,7 @@
Alex Kashchenko d6f9d0
 #include "runtime/arguments.hpp"
Alex Kashchenko d6f9d0
 #include "runtime/biasedLocking.hpp"
Alex Kashchenko d6f9d0
 #include "runtime/compilationPolicy.hpp"
Alex Kashchenko d6f9d0
+#include "runtime/deoptimization.hpp"
Alex Kashchenko d6f9d0
 #include "runtime/fprofiler.hpp"
Alex Kashchenko d6f9d0
 #include "runtime/init.hpp"
Alex Kashchenko d6f9d0
 #include "runtime/interfaceSupport.hpp"