extra/java8-openjdk to 8.u181-1.1

This commit is contained in:
Kevin Mihelich 2018-08-24 00:02:53 +00:00
parent 973f360057
commit f3c6b87684
5 changed files with 252 additions and 51 deletions

View file

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

View file

@ -0,0 +1,154 @@
# HG changeset patch
# User sgehwolf
# Date 1525714161 -3600
# Mon May 07 18:29:21 2018 +0100
# Node ID afb31413c73cbc06420fdb447aa90a7a38258904
# Parent bcbc64dfb629c5f188bbf59b8f986ad95963ed60
8143245, PR3548: Zero build requires disabled warnings
Reviewed-by: dholmes, coleenp
diff --git openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make
+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright 2007, 2008 Red Hat, Inc.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
@@ -29,11 +29,6 @@
ifeq ($(USE_CLANG), true)
WARNING_FLAGS += -Wno-undef
endif
-# Suppress some warning flags that are normally turned on for hotspot,
-# because some of the zero code has not been updated accordingly.
-WARNING_FLAGS += -Wno-return-type \
- -Wno-format-nonliteral -Wno-format-security \
- -Wno-maybe-uninitialized
# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
diff --git openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
--- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
@@ -100,7 +100,7 @@
case T_DOUBLE:
case T_VOID:
return result;
- default : ShouldNotReachHere();
+ default : ShouldNotReachHere(); return NULL_WORD;
}
}
diff --git openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
+++ openjdk/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -62,7 +62,7 @@
}
void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) {
- ffi_type *ftype;
+ ffi_type *ftype = NULL;
switch (type) {
case T_VOID:
ftype = &ffi_type_void;
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
+ * Copyright 2016 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -61,6 +61,7 @@
frame os::get_sender_for_C_frame(frame* fr) {
ShouldNotCallThis();
+ return frame(NULL, NULL); // silence compile warning.
}
frame os::current_frame() {
@@ -98,16 +99,19 @@
address os::Linux::ucontext_get_pc(ucontext_t* uc) {
ShouldNotCallThis();
+ return NULL; // silence compile warnings
}
ExtendedPC os::fetch_frame_from_context(void* ucVoid,
intptr_t** ret_sp,
intptr_t** ret_fp) {
ShouldNotCallThis();
+ return NULL; // silence compile warnings
}
frame os::fetch_frame_from_context(void* ucVoid) {
ShouldNotCallThis();
+ return frame(NULL, NULL); // silence compile warnings
}
extern "C" JNIEXPORT int
@@ -247,11 +251,16 @@
}
#endif // !PRODUCT
- const char *fmt = "caught unhandled signal %d";
char buf[64];
- sprintf(buf, fmt, sig);
+ sprintf(buf, "caught unhandled signal %d", sig);
+
+// Silence -Wformat-security warning for fatal()
+PRAGMA_DIAG_PUSH
+PRAGMA_FORMAT_NONLITERAL_IGNORED
fatal(buf);
+PRAGMA_DIAG_POP
+ return true; // silence compiler warnings
}
void os::Linux::init_thread_fpu_state(void) {
@@ -260,6 +269,7 @@
int os::Linux::get_fpu_control_word() {
ShouldNotCallThis();
+ return -1; // silence compile warnings
}
void os::Linux::set_fpu_control_word(int fpu) {
@@ -408,6 +418,7 @@
extern "C" {
int SpinPause() {
+ return -1; // silence compile warnings
}
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -110,6 +110,7 @@
void* ucontext,
bool isInJava) {
ShouldNotCallThis();
+ return false; // silence compile warning
}
// These routines are only used on cpu architectures that

View file

@ -0,0 +1,32 @@
# HG changeset patch
# User andrew
# Date 1518667645 0
# Thu Feb 15 04:07:25 2018 +0000
# Node ID 1d35411eb7bdf16191e220ffe3b1dc4d5d0c6041
# Parent 999983606f5c61b093c6f6316a7b26c4cd4ca79e
8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
Summary: Fix issue discovered by -Wreturn-type on systems without LP64.
Reviewed-by: aph
diff --git openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
--- openjdk.orig/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
+++ openjdk/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
@@ -457,6 +457,7 @@
long long unsigned int oldval,
long long unsigned int newval) {
ShouldNotCallThis();
+ return 0;
}
};
#endif // !_LP64
diff --git openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
@@ -498,6 +498,7 @@
long long unsigned int oldval,
long long unsigned int newval) {
ShouldNotCallThis();
+ return 0;
}
};
#endif // !_LP64

View file

@ -12,9 +12,7 @@
# - add arm to _JARCH and _DOC_ARCH
# - configure with --with-jvm-variants=zero
# - drop building docs and its package; takes forever to build
# - patch to fix zero build with up to date GCC and glibc
# - http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/b1d3888c0ae7
# - http://hg.openjdk.java.net/jdk10/master/rev/f5f2a2d13775
# - patches to fix zero build with up to date GCC and glibc
buildarch=22
@ -27,7 +25,7 @@ _jdk_update=181
_jdk_build=13
pkgver=${_java_ver}.u${_jdk_update}
_repo_ver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
pkgrel=1
pkgrel=1.1
arch=('x86_64')
url='http://openjdk.java.net/'
license=('custom')
@ -43,7 +41,9 @@ source=(jdk8u-${_repo_ver}.tar.gz::${_url_src}/archive/${_repo_ver}.tar.gz
jaxp-${_repo_ver}.tar.gz::${_url_src}/jaxp/archive/${_repo_ver}.tar.gz
langtools-${_repo_ver}.tar.gz::${_url_src}/langtools/archive/${_repo_ver}.tar.gz
nashorn-${_repo_ver}.tar.gz::${_url_src}/nashorn/archive/${_repo_ver}.tar.gz
zero.patch)
8141570-pr3548.patch
8143245-pr3548.patch
8197981-pr3548.patch)
sha256sums=('2a613bc3eb3ecdb12946447e44e6c80ce80d1a7c5cbdf8127585b452f6708b66'
'3fc4793e39d2e8e9aa19707f43d61a81bef2c9de22ff47c99105e1b4a51b19ac'
@ -53,7 +53,9 @@ sha256sums=('2a613bc3eb3ecdb12946447e44e6c80ce80d1a7c5cbdf8127585b452f6708b66'
'2d0475ae6a925fef1f21f3fd96436ed5d11d3cb9dca5a96f96defb3040c68d3b'
'4ef19aaf1444d1d23c0f76fc6d8f55092c0b8b8e953b7c136448f6660b7165ea'
'f2220793aa8fea31c8945566b639ea85e2d00ac68220827ba8861ca32e4aae48'
'1a4d6b2b5c8c7848a28cd66f9c513905143eec32d57ebc031d3ca8e16bea0fa9')
'f3def2ef78d96f136d9d0a103c84028789ae9e0de961a11240091b6ae60d8212'
'00ba7fa8d9b8b952c41240fd015df161c82fdfffb25280d0dea66a9cb39dcf5d'
'c0bb1ae19f08c221156df15d7d8c5a4168c55179a186f3054dd4ac0591ec8501')
case "${CARCH}" in
'x86_64') _JARCH=amd64 ; _DOC_ARCH=x86_64 ;;
@ -78,7 +80,9 @@ prepare() {
# Fix zero with up to date GCC and glibc
cd ../hotspot-${_repo_ver}
patch -p1 -i ../zero.patch
patch -p2 -i ../8141570-pr3548.patch
patch -p2 -i ../8143245-pr3548.patch
patch -p2 -i ../8197981-pr3548.patch
}
build() {

View file

@ -1,44 +0,0 @@
diff -r 99f1cf3520d9 -r b1d3888c0ae7 src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
--- a/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Tue Feb 16 13:20:38 2016 -0800
+++ b/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Wed Feb 17 17:03:31 2016 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -110,6 +110,7 @@
void* ucontext,
bool isInJava) {
ShouldNotCallThis();
+ return false; // silence compile warning
}
// These routines are only used on cpu architectures that
diff -r 39575526c6d9 -r f5f2a2d13775 src/os/linux/vm/os_linux.inline.hpp
--- a/src/os/linux/vm/os_linux.inline.hpp Thu Oct 12 01:18:38 2017 +0000
+++ b/src/os/linux/vm/os_linux.inline.hpp Mon Sep 18 15:06:28 2017 +0200
@@ -98,6 +98,11 @@
inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
{
+// readdir_r has been deprecated since glibc 2.24.
+// See https://sourceware.org/bugzilla/show_bug.cgi?id=19056 for more details.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
dirent* p;
int status;
assert(dirp != NULL, "just checking");
@@ -111,6 +116,8 @@
return NULL;
} else
return p;
+
+#pragma GCC diagnostic pop
}
inline int os::closedir(DIR *dirp) {