1 Star 0 Fork 81

胡波道/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
8181503-Can-t-compile-hotspot-with-c-11.patch 2.67 KB
一键复制 编辑 原始数据 按行查看 历史
Noah 提交于 2020-09-11 18:42 . Add several patches
From c36e8cdc5f1175a3f2a771194434d76324d8cdbb Mon Sep 17 00:00:00 2001
Date: Fri, 17 Apr 2020 17:42:09 +0000
Subject: [PATCH] 8181503: Can't compile hotspot with c++11
Summary: <compile>: fix c++11 compiler issues
LLT: N/A
Bug url: https://bugs.openjdk.java.net/browse/JDK-8181503
---
hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp | 6 +++---
hotspot/src/share/vm/code/compiledIC.cpp | 2 +-
hotspot/src/share/vm/utilities/vmError.cpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
index 018feea1..935a16b5 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
@@ -281,11 +281,11 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
address os::current_stack_pointer() {
#if defined(__clang__) || defined(__llvm__)
register void *esp;
- __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
+ __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
return (address) esp;
#elif defined(SPARC_WORKS)
register void *esp;
- __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
+ __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
return (address) ((char*)esp + sizeof(long)*2);
#else
register void *esp __asm__ (SPELL_REG_SP);
@@ -368,7 +368,7 @@ frame os::get_sender_for_C_frame(frame* fr) {
intptr_t* _get_previous_fp() {
#if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__)
register intptr_t **ebp;
- __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
+ __asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp));
#else
register intptr_t **ebp __asm__ (SPELL_REG_FP);
#endif
diff --git a/hotspot/src/share/vm/code/compiledIC.cpp b/hotspot/src/share/vm/code/compiledIC.cpp
index 63821c06..06794215 100644
--- a/hotspot/src/share/vm/code/compiledIC.cpp
+++ b/hotspot/src/share/vm/code/compiledIC.cpp
@@ -222,7 +222,7 @@ bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecod
assert(bytecode == Bytecodes::_invokeinterface, "");
int itable_index = call_info->itable_index();
entry = VtableStubs::find_itable_stub(itable_index);
- if (entry == false) {
+ if (entry == NULL) {
return false;
}
#ifdef ASSERT
diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp
index e5aad6ff..23d495d9 100644
--- a/hotspot/src/share/vm/utilities/vmError.cpp
+++ b/hotspot/src/share/vm/utilities/vmError.cpp
@@ -399,7 +399,7 @@ void VMError::report(outputStream* st) {
STEP(15, "(printing type of error)")
- switch(_id) {
+ switch(static_cast<unsigned int>(_id)) {
case OOM_MALLOC_ERROR:
case OOM_MMAP_ERROR:
if (_size) {
--
2.19.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hu_bo_dao/openjdk-1.8.0.git
git@gitee.com:hu_bo_dao/openjdk-1.8.0.git
hu_bo_dao
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助