add icedtea with jamvm

This commit is contained in:
Mario Fetka
2012-01-20 20:39:48 +01:00
parent fb76201cf3
commit d6ca3ea094
20 changed files with 4678 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
Taken from:
http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000399.html
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-30 19:28:01.875227001 +0000
+++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-30 19:30:16.885227001 +0000
@@ -51,7 +51,11 @@
#else
#include <llvm/System/Threading.h>
#endif
+#if SHARK_LLVM_VERSION >= 30
+#include <llvm/Support/TargetSelect.h>
+#else
#include <llvm/Target/TargetSelect.h>
+#endif
#include <llvm/Type.h>
#include <llvm/ExecutionEngine/JITMemoryManager.h>
#include <llvm/Support/CommandLine.h>

View File

@@ -0,0 +1,218 @@
Taken from:
http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000399.html
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-31 11:33:05.404964248 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-31 11:33:11.164992604 +0200
@@ -1000,9 +1000,9 @@
builder()->SetInsertPoint(done);
PHINode *result;
if (is_long)
- result = builder()->CreatePHI(SharkType::jlong_type(), "result");
+ result = builder()->CreatePHI(SharkType::jlong_type(), 0, "result");
else
- result = builder()->CreatePHI(SharkType::jint_type(), "result");
+ result = builder()->CreatePHI(SharkType::jint_type(), 0, "result");
result->addIncoming(special_result, special_case);
result->addIncoming(general_result, general_case);
@@ -1105,7 +1105,7 @@
builder()->CreateBr(done);
builder()->SetInsertPoint(done);
- PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result");
+ PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result");
result->addIncoming(LLVMValue::jint_constant(-1), lt);
result->addIncoming(LLVMValue::jint_constant(0), eq);
result->addIncoming(LLVMValue::jint_constant(1), gt);
@@ -1152,7 +1152,7 @@
builder()->CreateBr(done);
builder()->SetInsertPoint(done);
- PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result");
+ PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result");
result->addIncoming(LLVMValue::jint_constant(-1), lt);
result->addIncoming(LLVMValue::jint_constant(0), eq);
result->addIncoming(LLVMValue::jint_constant(1), gt);
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-31 11:33:05.404964248 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-31 13:59:28.604517829 +0200
@@ -465,7 +465,7 @@
LLVMValue::bit_constant((flags & BARRIER_STORESTORE) ? 1 : 0),
LLVMValue::bit_constant(1)};
- return CreateCall(memory_barrier(), args, args + 5);
+ return CreateCall(memory_barrier(), llvm::makeArrayRef(args));
}
CallInst* SharkBuilder::CreateMemset(Value* dst,
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkIntrinsics.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkIntrinsics.cpp 2011-07-05 20:31:05.000000000 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkIntrinsics.cpp 2011-08-31 11:33:11.200992924 +0200
@@ -171,7 +171,7 @@
builder()->CreateBr(done);
builder()->SetInsertPoint(done);
- PHINode *phi = builder()->CreatePHI(a->getType(), "result");
+ PHINode *phi = builder()->CreatePHI(a->getType(), 0, "result");
phi->addIncoming(a, return_a);
phi->addIncoming(b, return_b);
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-31 11:33:05.408964281 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-31 13:58:49.448323631 +0200
@@ -149,7 +149,7 @@
builder()->CreateBr(merge);
builder()->SetInsertPoint(merge);
- phi = builder()->CreatePHI(box_type, "boxed_object");
+ phi = builder()->CreatePHI(box_type, 0, "boxed_object");
phi->addIncoming(ConstantPointerNull::get(box_type), null);
phi->addIncoming(box, not_null);
box = phi;
@@ -213,7 +213,7 @@
PointerType::getUnqual(
FunctionType::get(return_type, param_types, false)));
Value *result = builder()->CreateCall(
- native_function, param_values.begin(), param_values.end());
+ native_function, llvm::makeArrayRef(param_values));
// Start the transition back to _thread_in_Java
CreateSetThreadState(_thread_in_native_trans);
@@ -305,7 +305,7 @@
builder()->CreateBr(merge);
builder()->SetInsertPoint(merge);
- PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "result");
+ PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "result");
phi->addIncoming(LLVMValue::null(), null);
phi->addIncoming(unboxed_result, not_null);
result = phi;
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp 2011-07-05 20:31:05.000000000 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp 2011-08-31 11:33:11.204992936 +0200
@@ -290,7 +290,7 @@
int exception_action) {
decache_for_VM_call();
stack()->CreateSetLastJavaFrame();
- llvm::CallInst *res = builder()->CreateCall(callee, args_start, args_end);
+ llvm::CallInst *res = builder()->CreateCall(callee, llvm::makeArrayRef(args_start, args_end));
stack()->CreateResetLastJavaFrame();
cache_after_VM_call();
if (exception_action & EAM_CHECK) {
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkState.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkState.cpp 2011-07-05 20:31:05.000000000 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkState.cpp 2011-08-31 11:33:11.204992936 +0200
@@ -131,7 +131,7 @@
Value *this_method = this->method();
Value *other_method = other->method();
if (this_method != other_method) {
- PHINode *phi = builder()->CreatePHI(SharkType::methodOop_type(), "method");
+ PHINode *phi = builder()->CreatePHI(SharkType::methodOop_type(), 0, "method");
phi->addIncoming(this_method, this_block);
phi->addIncoming(other_method, other_block);
set_method(phi);
@@ -142,7 +142,7 @@
Value *other_oop_tmp = other->oop_tmp();
if (this_oop_tmp != other_oop_tmp) {
assert(this_oop_tmp && other_oop_tmp, "can't merge NULL with non-NULL");
- PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "oop_tmp");
+ PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "oop_tmp");
phi->addIncoming(this_oop_tmp, this_block);
phi->addIncoming(other_oop_tmp, other_block);
set_oop_tmp(phi);
@@ -287,7 +287,7 @@
char name[18];
// Method
- set_method(builder()->CreatePHI(SharkType::methodOop_type(), "method"));
+ set_method(builder()->CreatePHI(SharkType::methodOop_type(), 0, "method"));
// Local variables
for (int i = 0; i < max_locals(); i++) {
@@ -307,7 +307,7 @@
case T_ARRAY:
snprintf(name, sizeof(name), "local_%d_", i);
value = SharkValue::create_phi(
- type, builder()->CreatePHI(SharkType::to_stackType(type), name));
+ type, builder()->CreatePHI(SharkType::to_stackType(type), 0, name));
break;
case T_ADDRESS:
@@ -345,7 +345,7 @@
case T_ARRAY:
snprintf(name, sizeof(name), "stack_%d_", i);
value = SharkValue::create_phi(
- type, builder()->CreatePHI(SharkType::to_stackType(type), name));
+ type, builder()->CreatePHI(SharkType::to_stackType(type), 0, name));
break;
case T_ADDRESS:
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-31 11:33:05.412964300 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-31 11:33:11.204992936 +0200
@@ -1180,7 +1180,7 @@
builder()->CreateBr(loop);
builder()->SetInsertPoint(loop);
PHINode *itable_entry_addr = builder()->CreatePHI(
- SharkType::intptr_type(), "itable_entry_addr");
+ SharkType::intptr_type(), 0, "itable_entry_addr");
itable_entry_addr->addIncoming(itable_start, loop_entry);
Value *itable_entry = builder()->CreateIntToPtr(
@@ -1526,7 +1526,7 @@
// First merge
builder()->SetInsertPoint(merge1);
PHINode *nonnull_result = builder()->CreatePHI(
- SharkType::jint_type(), "nonnull_result");
+ SharkType::jint_type(), 0, "nonnull_result");
nonnull_result->addIncoming(
LLVMValue::jint_constant(IC_IS_INSTANCE), is_instance);
nonnull_result->addIncoming(
@@ -1537,7 +1537,7 @@
// Second merge
builder()->SetInsertPoint(merge2);
PHINode *result = builder()->CreatePHI(
- SharkType::jint_type(), "result");
+ SharkType::jint_type(), 0, "result");
result->addIncoming(LLVMValue::jint_constant(IC_IS_NULL), null_block);
result->addIncoming(nonnull_result, nonnull_block);
@@ -1713,7 +1713,7 @@
builder()->SetInsertPoint(initialize);
if (tlab_object) {
PHINode *phi = builder()->CreatePHI(
- SharkType::oop_type(), "fast_object");
+ SharkType::oop_type(), 0, "fast_object");
phi->addIncoming(tlab_object, got_tlab);
phi->addIncoming(heap_object, got_heap);
fast_object = phi;
@@ -1773,7 +1773,7 @@
builder()->SetInsertPoint(push_object);
}
if (fast_object) {
- PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "object");
+ PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "object");
phi->addIncoming(fast_object, got_fast);
phi->addIncoming(slow_object, got_slow);
object = phi;
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkValue.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkValue.cpp 2011-07-05 20:31:05.000000000 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkValue.cpp 2011-08-31 11:33:11.204992936 +0200
@@ -233,7 +233,7 @@
assert(type() == other->type(), "should be");
assert(zero_checked() == other->zero_checked(), "should be");
- PHINode *phi = builder->CreatePHI(SharkType::to_stackType(type()), name);
+ PHINode *phi = builder->CreatePHI(SharkType::to_stackType(type()), 0, name);
phi->addIncoming(this->generic_value(), this_block);
phi->addIncoming(other->generic_value(), other_block);
return SharkValue::create_generic(type(), phi, zero_checked());

View File

@@ -0,0 +1,38 @@
Taken from:
http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000399.html
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp 2011-08-31 11:39:35.630899283 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp 2011-08-31 16:10:00.459354097 +0200
@@ -72,6 +72,9 @@
// Initialize the native target
InitializeNativeTarget();
+ // MCJIT require a native AsmPrinter
+ InitializeNativeTargetAsmPrinter();
+
// Create the two contexts which we'll use
_normal_context = new SharkContext("normal");
_native_context = new SharkContext("native");
@@ -113,6 +116,7 @@
builder.setJITMemoryManager(memory_manager());
builder.setEngineKind(EngineKind::JIT);
builder.setErrorStr(&ErrorMsg);
+ builder.setUseMCJIT(true);
_execution_engine = builder.create();
if (!execution_engine()) {
Index: icedtea6-shark-llvm-3.0/openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-31 14:40:04.392596214 +0200
+++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-08-31 14:41:27.569008721 +0200
@@ -60,7 +60,7 @@
#include <llvm/ExecutionEngine/JITMemoryManager.h>
#include <llvm/Support/CommandLine.h>
#if SHARK_LLVM_VERSION >= 27
-#include <llvm/ExecutionEngine/JIT.h>
+#include <llvm/ExecutionEngine/MCJIT.h>
#include <llvm/ADT/StringMap.h>
#include <llvm/Support/Debug.h>
#if SHARK_LLVM_VERSION >= 29

View File

@@ -0,0 +1,15 @@
Author: Ralph Sennhauser <sera@gentoo.org>
Disables -Werror so shark builds with llvm-3.0 on amd64
--- openjdk/hotspot/make/linux/makefiles/gcc.make 2011-12-12 09:38:55.995256804 +0100
+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2011-12-12 10:26:07.670560007 +0100
@@ -123,7 +123,7 @@
endif
# Compiler warnings are treated as errors
-WARNINGS_ARE_ERRORS = -Werror
+WARNINGS_ARE_ERRORS =
# Except for a few acceptable ones
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit

View File

@@ -0,0 +1,385 @@
#
#
# Copyright (c) 2007, 2010, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Version
version=1
# Component Font Mappings
dialog.plain.latin-1=DejaVu Sans
dialog.plain.japanese-x0208=Sazanami Gothic
dialog.plain.korean=Baekmuk Gulim
dialog.plain.chinese-big5=AR PL ShanHeiSun Uni
dialog.plain.chinese-gb18030=AR PL ShanHeiSun Uni
dialog.plain.bengali=Lohit Bengali
dialog.plain.gujarati=Lohit Gujarati
dialog.plain.hindi=Lohit Hindi
dialog.plain.malayalam=Lohit Malayalam
dialog.plain.oriya=Lohit Oriya
dialog.plain.punjabi=Lohit Punjabi
dialog.plain.tamil=Lohit Tamil
dialog.plain.telugu=Lohit Telugu
dialog.plain.sinhala=LKLUG
dialog.bold.latin-1=DejaVu Sans Bold
dialog.bold.japanese-x0208=Sazanami Gothic
dialog.bold.korean=Baekmuk Gulim
dialog.bold.chinese-big5=AR PL ShanHeiSun Uni
dialog.bold.chinese-gb18030=AR PL ShanHeiSun Uni
dialog.bold.bengali=Lohit Bengali
dialog.bold.gujarati=Lohit Gujarati
dialog.bold.hindi=Lohit Hindi
dialog.bold.malayalam=Lohit Malayalam
dialog.bold.oriya=Lohit Oriya
dialog.bold.punjabi=Lohit Punjabi
dialog.bold.tamil=Lohit Tamil
dialog.bold.telugu=Lohit Telugu
dialog.bold.sinhala=LKLUG
dialog.italic.latin-1=DejaVu Sans Oblique
dialog.italic.japanese-x0208=Sazanami Gothic
dialog.italic.korean=Baekmuk Gulim
dialog.italic.chinese-big5=AR PL ShanHeiSun Uni
dialog.italic.chinese-gb18030=AR PL ShanHeiSun Uni
dialog.italic.bengali=Lohit Bengali
dialog.italic.gujarati=Lohit Gujarati
dialog.italic.hindi=Lohit Hindi
dialog.italic.malayalam=Lohit Malayalam
dialog.italic.oriya=Lohit Oriya
dialog.italic.punjabi=Lohit Punjabi
dialog.italic.tamil=Lohit Tamil
dialog.italic.telugu=Lohit Telugu
dialog.italic.sinhala=LKLUG
dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
dialog.bolditalic.japanese-x0208=Sazanami Gothic
dialog.bolditalic.korean=Baekmuk Gulim
dialog.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
dialog.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
dialog.bolditalic.bengali=Lohit Bengali
dialog.bolditalic.gujarati=Lohit Gujarati
dialog.bolditalic.hindi=Lohit Hindi
dialog.bolditalic.malayalam=Lohit Malayalam
dialog.bolditalic.oriya=Lohit Oriya
dialog.bolditalic.punjabi=Lohit Punjabi
dialog.bolditalic.tamil=Lohit Tamil
dialog.bolditalic.telugu=Lohit Telugu
dialog.bolditalic.sinhala=LKLUG
sansserif.plain.latin-1=DejaVu Sans
sansserif.plain.japanese-x0208=Sazanami Gothic
sansserif.plain.korean=Baekmuk Gulim
sansserif.plain.chinese-big5=AR PL ShanHeiSun Uni
sansserif.plain.chinese-gb18030=AR PL ShanHeiSun Uni
sansserif.plain.bengali=Lohit Bengali
sansserif.plain.gujarati=Lohit Gujarati
sansserif.plain.hindi=Lohit Hindi
sansserif.plain.malayalam=Lohit Malayalam
sansserif.plain.oriya=Lohit Oriya
sansserif.plain.punjabi=Lohit Punjabi
sansserif.plain.tamil=Lohit Tamil
sansserif.plain.telugu=Lohit Telugu
sansserif.plain.sinhala=LKLUG
sansserif.bold.latin-1=DejaVu Sans Bold
sansserif.bold.japanese-x0208=Sazanami Gothic
sansserif.bold.korean=Baekmuk Gulim
sansserif.bold.chinese-big5=AR PL ShanHeiSun Uni
sansserif.bold.chinese-gb18030=AR PL ShanHeiSun Uni
sansserif.bold.bengali=Lohit Bengali
sansserif.bold.gujarati=Lohit Gujarati
sansserif.bold.hindi=Lohit Hindi
sansserif.bold.malayalam=Lohit Malayalam
sansserif.bold.oriya=Lohit Oriya
sansserif.bold.punjabi=Lohit Punjabi
sansserif.bold.tamil=Lohit Tamil
sansserif.bold.telugu=Lohit Telugu
sansserif.bold.sinhala=LKLUG
sansserif.italic.latin-1=DejaVu Sans Oblique
sansserif.italic.japanese-x0208=Sazanami Gothic
sansserif.italic.korean=Baekmuk Gulim
sansserif.italic.chinese-big5=AR PL ShanHeiSun Uni
sansserif.italic.chinese-gb18030=AR PL ShanHeiSun Uni
sansserif.italic.bengali=Lohit Bengali
sansserif.italic.gujarati=Lohit Gujarati
sansserif.italic.hindi=Lohit Hindi
sansserif.italic.malayalam=Lohit Malayalam
sansserif.italic.oriya=Lohit Oriya
sansserif.italic.punjabi=Lohit Punjabi
sansserif.italic.tamil=Lohit Tamil
sansserif.italic.telugu=Lohit Telugu
sansserif.italic.sinhala=LKLUG
sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
sansserif.bolditalic.japanese-x0208=Sazanami Gothic
sansserif.bolditalic.korean=Baekmuk Gulim
sansserif.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
sansserif.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
sansserif.bolditalic.bengali=Lohit Bengali
sansserif.bolditalic.gujarati=Lohit Gujarati
sansserif.bolditalic.hindi=Lohit Hindi
sansserif.bolditalic.malayalam=Lohit Malayalam
sansserif.bolditalic.oriya=Lohit Oriya
sansserif.bolditalic.punjabi=Lohit Punjabi
sansserif.bolditalic.tamil=Lohit Tamil
sansserif.bolditalic.telugu=Lohit Telugu
sansserif.bolditalic.sinhala=LKLUG
serif.plain.latin-1=DejaVu Serif
serif.plain.japanese-x0208=Sazanami Mincho
serif.plain.korean=Baekmuk Batang
serif.plain.chinese-big5=AR PL ZenKai Uni
serif.plain.chinese-gb18030=AR PL ZenKai Uni
serif.plain.bengali=Lohit Bengali
serif.plain.gujarati=Lohit Gujarati
serif.plain.hindi=Lohit Hindi
serif.plain.malayalam=Lohit Malayalam
serif.plain.oriya=Lohit Oriya
serif.plain.punjabi=Lohit Punjabi
serif.plain.tamil=Lohit Tamil
serif.plain.telugu=Lohit Telugu
serif.plain.sinhala=LKLUG
serif.bold.latin-1=DejaVu Serif Bold
serif.bold.japanese-x0208=Sazanami Mincho
serif.bold.korean=Baekmuk Batang
serif.bold.chinese-big5=AR PL ZenKai Uni
serif.bold.chinese-gb18030=AR PL ZenKai Uni
serif.bold.bengali=Lohit Bengali
serif.bold.gujarati=Lohit Gujarati
serif.bold.hindi=Lohit Hindi
serif.bold.malayalam=Lohit Malayalam
serif.bold.oriya=Lohit Oriya
serif.bold.punjabi=Lohit Punjabi
serif.bold.tamil=Lohit Tamil
serif.bold.telugu=Lohit Telugu
serif.bold.sinhala=LKLUG
serif.italic.latin-1=DejaVu Serif Oblique
serif.italic.japanese-x0208=Sazanami Mincho
serif.italic.korean=Baekmuk Batang
serif.italic.chinese-big5=AR PL ZenKai Uni
serif.italic.chinese-gb18030=AR PL ZenKai Uni
serif.italic.bengali=Lohit Bengali
serif.italic.gujarati=Lohit Gujarati
serif.italic.hindi=Lohit Hindi
serif.italic.malayalam=Lohit Malayalam
serif.italic.oriya=Lohit Oriya
serif.italic.punjabi=Lohit Punjabi
serif.italic.tamil=Lohit Tamil
serif.italic.telugu=Lohit Telugu
serif.italic.sinhala=LKLUG
serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
serif.bolditalic.japanese-x0208=Sazanami Mincho
serif.bolditalic.korean=Baekmuk Batang
serif.bolditalic.chinese-big5=AR PL ZenKai Uni
serif.bolditalic.chinese-gb18030=AR PL ZenKai Uni
serif.bolditalic.bengali=Lohit Bengali
serif.bolditalic.gujarati=Lohit Gujarati
serif.bolditalic.hindi=Lohit Hindi
serif.bolditalic.malayalam=Lohit Malayalam
serif.bolditalic.oriya=Lohit Oriya
serif.bolditalic.punjabi=Lohit Punjabi
serif.bolditalic.tamil=Lohit Tamil
serif.bolditalic.telugu=Lohit Telugu
serif.bolditalic.sinhala=LKLUG
monospaced.plain.latin-1=DejaVu Sans Mono
monospaced.plain.japanese-x0208=Sazanami Gothic
monospaced.plain.korean=Baekmuk Gulim
monospaced.plain.chinese-big5=AR PL ShanHeiSun Uni
monospaced.plain.chinese-gb18030=AR PL ShanHeiSun Uni
monospaced.plain.bengali=Lohit Bengali
monospaced.plain.gujarati=Lohit Gujarati
monospaced.plain.hindi=Lohit Hindi
monospaced.plain.malayalam=Lohit Malayalam
monospaced.plain.oriya=Lohit Oriya
monospaced.plain.punjabi=Lohit Punjabi
monospaced.plain.tamil=Lohit Tamil
monospaced.plain.telugu=Lohit Telugu
monospaced.plain.sinhala=LKLUG
monospaced.bold.latin-1=DejaVu Sans Mono Bold
monospaced.bold.japanese-x0208=Sazanami Gothic
monospaced.bold.korean=Baekmuk Gulim
monospaced.bold.chinese-big5=AR PL ShanHeiSun Uni
monospaced.bold.chinese-gb18030=AR PL ShanHeiSun Uni
monospaced.bold.bengali=Lohit Bengali
monospaced.bold.gujarati=Lohit Gujarati
monospaced.bold.hindi=Lohit Hindi
monospaced.bold.malayalam=Lohit Malayalam
monospaced.bold.oriya=Lohit Oriya
monospaced.bold.punjabi=Lohit Punjabi
monospaced.bold.tamil=Lohit Tamil
monospaced.bold.telugu=Lohit Telugu
monospaced.bold.sinhala=LKLUG
monospaced.italic.latin-1=DejaVu Sans Mono Oblique
monospaced.italic.japanese-x0208=Sazanami Gothic
monospaced.italic.korean=Baekmuk Gulim
monospaced.italic.chinese-big5=AR PL ShanHeiSun Uni
monospaced.italic.chinese-gb18030=AR PL ShanHeiSun Uni
monospaced.italic.bengali=Lohit Bengali
monospaced.italic.gujarati=Lohit Gujarati
monospaced.italic.hindi=Lohit Hindi
monospaced.italic.malayalam=Lohit Malayalam
monospaced.italic.oriya=Lohit Oriya
monospaced.italic.punjabi=Lohit Punjabi
monospaced.italic.tamil=Lohit Tamil
monospaced.italic.telugu=Lohit Telugu
monospaced.italic.sinhala=LKLUG
monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
monospaced.bolditalic.japanese-x0208=Sazanami Gothic
monospaced.bolditalic.korean=Baekmuk Gulim
monospaced.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
monospaced.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
monospaced.bolditalic.bengali=Lohit Bengali
monospaced.bolditalic.gujarati=Lohit Gujarati
monospaced.bolditalic.hindi=Lohit Hindi
monospaced.bolditalic.malayalam=Lohit Malayalam
monospaced.bolditalic.oriya=Lohit Oriya
monospaced.bolditalic.punjabi=Lohit Punjabi
monospaced.bolditalic.tamil=Lohit Tamil
monospaced.bolditalic.telugu=Lohit Telugu
monospaced.bolditalic.sinhala=LKLUG
dialoginput.plain.latin-1=DejaVu Sans Mono
dialoginput.plain.japanese-x0208=Sazanami Gothic
dialoginput.plain.korean=Baekmuk Gulim
dialoginput.plain.chinese-big5=AR PL ShanHeiSun Uni
dialoginput.plain.chinese-gb18030=AR PL ShanHeiSun Uni
dialoginput.plain.bengali=Lohit Bengali
dialoginput.plain.gujarati=Lohit Gujarati
dialoginput.plain.hindi=Lohit Hindi
dialoginput.plain.malayalam=Lohit Malayalam
dialoginput.plain.oriya=Lohit Oriya
dialoginput.plain.punjabi=Lohit Punjabi
dialoginput.plain.tamil=Lohit Tamil
dialoginput.plain.telugu=Lohit Telugu
dialoginput.plain.sinhala=LKLUG
dialoginput.bold.latin-1=DejaVu Sans Mono Bold
dialoginput.bold.japanese-x0208=Sazanami Gothic
dialoginput.bold.korean=Baekmuk Gulim
dialoginput.bold.chinese-big5=AR PL ShanHeiSun Uni
dialoginput.bold.chinese-gb18030=AR PL ShanHeiSun Uni
dialoginput.bold.bengali=Lohit Bengali
dialoginput.bold.gujarati=Lohit Gujarati
dialoginput.bold.hindi=Lohit Hindi
dialoginput.bold.malayalam=Lohit Malayalam
dialoginput.bold.oriya=Lohit Oriya
dialoginput.bold.punjabi=Lohit Punjabi
dialoginput.bold.tamil=Lohit Tamil
dialoginput.bold.telugu=Lohit Telugu
dialoginput.bold.sinhala=LKLUG
dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
dialoginput.italic.japanese-x0208=Sazanami Gothic
dialoginput.italic.korean=Baekmuk Gulim
dialoginput.italic.chinese-big5=AR PL ShanHeiSun Uni
dialoginput.italic.chinese-gb18030=AR PL ShanHeiSun Uni
dialoginput.italic.bengali=Lohit Bengali
dialoginput.italic.gujarati=Lohit Gujarati
dialoginput.italic.hindi=Lohit Hindi
dialoginput.italic.malayalam=Lohit Malayalam
dialoginput.italic.oriya=Lohit Oriya
dialoginput.italic.punjabi=Lohit Punjabi
dialoginput.italic.tamil=Lohit Tamil
dialoginput.italic.telugu=Lohit Telugu
dialoginput.italic.sinhala=LKLUG
dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
dialoginput.bolditalic.japanese-x0208=Sazanami Gothic
dialoginput.bolditalic.korean=Baekmuk Gulim
dialoginput.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
dialoginput.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
dialoginput.bolditalic.bengali=Lohit Bengali
dialoginput.bolditalic.gujarati=Lohit Gujarati
dialoginput.bolditalic.hindi=Lohit Hindi
dialoginput.bolditalic.malayalam=Lohit Malayalam
dialoginput.bolditalic.oriya=Lohit Oriya
dialoginput.bolditalic.punjabi=Lohit Punjabi
dialoginput.bolditalic.tamil=Lohit Tamil
dialoginput.bolditalic.telugu=Lohit Telugu
dialoginput.bolditalic.sinhala=LKLUG
# Search Sequences
sequence.allfonts=latin-1
sequence.allfonts.Big5=chinese-big5,latin-1
sequence.allfonts.x-euc-jp-linux=japanese-x0208,latin-1
sequence.allfonts.EUC-KR=korean,latin-1
sequence.allfonts.GB18030=chinese-gb18030,latin-1
sequence.fallback=chinese-big5,chinese-gb18030,japanese-x0208,korean,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
# Font File Names
# media-fonts/dejavu
filename.DejaVu_Sans=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans.ttf
filename.DejaVu_Sans_Bold=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf
filename.DejaVu_Sans_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf
filename.DejaVu_Sans_Bold_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf
filename.DejaVu_Sans_Mono=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono.ttf
filename.DejaVu_Sans_Mono_Bold=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf
filename.DejaVu_Sans_Mono_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf
filename.DejaVu_Sans_Mono_Bold_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono-BoldOblique.ttf
filename.DejaVu_Serif=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif.ttf
filename.DejaVu_Serif_Bold=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif-Bold.ttf
filename.DejaVu_Serif_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif-Oblique.ttf
filename.DejaVu_Serif_Bold_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif-BoldOblique.ttf
# media-fonts/sazanami
filename.Sazanami_Gothic=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/sazanami/sazanami-gothic.ttf
filename.Sazanami_Mincho=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/sazanami/sazanami-mincho.ttf
# media-fonts/arphicfonts
filename.AR_PL_ShanHeiSun_Uni=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/uming.ttc
filename.AR_PL_ZenKai_Uni=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/ukai.ttc
# media-fonts/baekmuk-fonts
filename.Baekmuk_Gulim=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/gulim.ttf
filename.Baekmuk_Batang=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/batang.ttf
# media-fonts/lohit-fonts
filename.Lohit_Bengali=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_bn.ttf
filename.Lohit_Gujarati=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_gu.ttf
filename.Lohit_Hindi=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_hi.ttf
filename.Lohit_Kannda=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_kn.ttf
filename.Lohit_Malayalam=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_ml.ttf
filename.Lohit_Oriya=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_or.ttf
filename.Lohit_Punjabi=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_pa.ttf
filename.Lohit_Tamil=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_ta.ttf
filename.Lohit_Telugu=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_te.ttf
# media-fonts/lklug
filename.LKLUG=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/lklug/lklug.ttf

View File

@@ -0,0 +1,358 @@
#!/usr/bin/perl
# Copyright (C) 2007, 2008 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# generate-cacerts.pl generates a JKS keystore named 'cacerts' from
# OpenSSL's certificate bundle using OpenJDK's keytool.
# First extract each of OpenSSL's bundled certificates into its own
# aliased filename.
# Downloaded from http://cvs.fedoraproject.org/viewvc/rpms/ca-certificates/F-12/generate-cacerts.pl?revision=1.2
# Check and prevention of duplicate aliases added by Vlastimil Babka <caster@gentoo.org>
$file = $ARGV[1];
open(CERTS, $file);
@certs = <CERTS>;
close(CERTS);
$pem_file_count = 0;
$in_cert_block = 0;
$write_current_cert = 1;
foreach $cert (@certs)
{
if ($cert =~ /Issuer: /)
{
$_ = $cert;
if ($cert =~ /personal-freemail/)
{
$cert_alias = "thawtepersonalfreemailca";
}
elsif ($cert =~ /personal-basic/)
{
$cert_alias = "thawtepersonalbasicca";
}
elsif ($cert =~ /personal-premium/)
{
$cert_alias = "thawtepersonalpremiumca";
}
elsif ($cert =~ /server-certs/)
{
$cert_alias = "thawteserverca";
}
elsif ($cert =~ /premium-server/)
{
$cert_alias = "thawtepremiumserverca";
}
elsif ($cert =~ /Class 1 Public Primary Certification Authority$/)
{
$cert_alias = "verisignclass1ca";
}
elsif ($cert =~ /Class 1 Public Primary Certification Authority - G2/)
{
$cert_alias = "verisignclass1g2ca";
}
elsif ($cert =~
/VeriSign Class 1 Public Primary Certification Authority - G3/)
{
$cert_alias = "verisignclass1g3ca";
}
elsif ($cert =~ /Class 2 Public Primary Certification Authority$/)
{
$cert_alias = "verisignclass2ca";
}
elsif ($cert =~ /Class 2 Public Primary Certification Authority - G2/)
{
$cert_alias = "verisignclass2g2ca";
}
elsif ($cert =~
/VeriSign Class 2 Public Primary Certification Authority - G3/)
{
$cert_alias = "verisignclass2g3ca";
}
elsif ($cert =~ /Class 3 Public Primary Certification Authority$/)
{
$cert_alias = "verisignclass3ca";
}
# Version 1 of Class 3 Public Primary Certification Authority
# - G2 is added. Version 3 is excluded. See below.
elsif ($cert =~
/VeriSign Class 3 Public Primary Certification Authority - G3/)
{
$cert_alias = "verisignclass3g3ca";
}
elsif ($cert =~
/RSA Data Security.*Secure Server Certification Authority/)
{
$cert_alias = "verisignserverca";
}
elsif ($cert =~ /GTE CyberTrust Global Root/)
{
$cert_alias = "gtecybertrustglobalca";
}
elsif ($cert =~ /Baltimore CyberTrust Root/)
{
$cert_alias = "baltimorecybertrustca";
}
elsif ($cert =~ /www.entrust.net\/Client_CA_Info\/CPS/)
{
$cert_alias = "entrustclientca";
}
elsif ($cert =~ /www.entrust.net\/GCCA_CPS/)
{
$cert_alias = "entrustglobalclientca";
}
elsif ($cert =~ /www.entrust.net\/CPS_2048/)
{
$cert_alias = "entrust2048ca";
}
elsif ($cert =~ /www.entrust.net\/CPS /)
{
$cert_alias = "entrustsslca";
}
elsif ($cert =~ /www.entrust.net\/SSL_CPS/)
{
$cert_alias = "entrustgsslca";
}
elsif ($cert =~ /The Go Daddy Group/)
{
$cert_alias = "godaddyclass2ca";
}
elsif ($cert =~ /Starfield Class 2 Certification Authority/)
{
$cert_alias = "starfieldclass2ca";
}
elsif ($cert =~ /ValiCert Class 2 Policy Validation Authority/)
{
$cert_alias = "valicertclass2ca";
}
elsif ($cert =~ /GeoTrust Global CA$/)
{
$cert_alias = "geotrustglobalca";
}
elsif ($cert =~ /Equifax Secure Certificate Authority/)
{
$cert_alias = "equifaxsecureca";
}
elsif ($cert =~ /Equifax Secure eBusiness CA-1/)
{
$cert_alias = "equifaxsecureebusinessca1";
}
elsif ($cert =~ /Equifax Secure eBusiness CA-2/)
{
$cert_alias = "equifaxsecureebusinessca2";
}
elsif ($cert =~ /Equifax Secure Global eBusiness CA-1/)
{
$cert_alias = "equifaxsecureglobalebusinessca1";
}
elsif ($cert =~ /Sonera Class1 CA/)
{
$cert_alias = "soneraclass1ca";
}
elsif ($cert =~ /Sonera Class2 CA/)
{
$cert_alias = "soneraclass2ca";
}
elsif ($cert =~ /AAA Certificate Services/)
{
$cert_alias = "comodoaaaca";
}
elsif ($cert =~ /AddTrust Class 1 CA Root/)
{
$cert_alias = "addtrustclass1ca";
}
elsif ($cert =~ /AddTrust External CA Root/)
{
$cert_alias = "addtrustexternalca";
}
elsif ($cert =~ /AddTrust Qualified CA Root/)
{
$cert_alias = "addtrustqualifiedca";
}
elsif ($cert =~ /UTN-USERFirst-Hardware/)
{
$cert_alias = "utnuserfirsthardwareca";
}
elsif ($cert =~ /UTN-USERFirst-Client Authentication and Email/)
{
$cert_alias = "utnuserfirstclientauthemailca";
}
elsif ($cert =~ /UTN - DATACorp SGC/)
{
$cert_alias = "utndatacorpsgcca";
}
elsif ($cert =~ /UTN-USERFirst-Object/)
{
$cert_alias = "utnuserfirstobjectca";
}
elsif ($cert =~ /America Online Root Certification Authority 1/)
{
$cert_alias = "aolrootca1";
}
elsif ($cert =~ /DigiCert Assured ID Root CA/)
{
$cert_alias = "digicertassuredidrootca";
}
elsif ($cert =~ /DigiCert Global Root CA/)
{
$cert_alias = "digicertglobalrootca";
}
elsif ($cert =~ /DigiCert High Assurance EV Root CA/)
{
$cert_alias = "digicerthighassuranceevrootca";
}
elsif ($cert =~ /GlobalSign Root CA$/)
{
$cert_alias = "globalsignca";
}
elsif ($cert =~ /GlobalSign Root CA - R2/)
{
$cert_alias = "globalsignr2ca";
}
elsif ($cert =~ /Elektronik.*Kas.*2005/)
{
$cert_alias = "extra-elektronikkas2005";
}
elsif ($cert =~ /Elektronik/)
{
$cert_alias = "extra-elektronik2005";
}
# Mozilla does not provide these certificates:
# baltimorecodesigningca
# gtecybertrust5ca
# trustcenterclass2caii
# trustcenterclass4caii
# trustcenteruniversalcai
else
{
# Generate an alias using the OU and CN attributes of the
# Issuer field if both are present, otherwise use only the
# CN attribute. The Issuer field must have either the OU
# or the CN attribute.
$_ = $cert;
if ($cert =~ /OU=/)
{
s/Issuer:.*?OU=//;
# Remove other occurrences of OU=.
s/OU=.*CN=//;
# Remove CN= if there were not other occurrences of OU=.
s/CN=//;
s/\/emailAddress.*//;
s/Certificate Authority/ca/g;
s/Certification Authority/ca/g;
}
elsif ($cert =~ /CN=/)
{
s/Issuer:.*CN=//;
s/\/emailAddress.*//;
s/Certificate Authority/ca/g;
s/Certification Authority/ca/g;
}
s/\W//g;
tr/A-Z/a-z/;
$cert_alias = "extra-$_";
}
while (-e "$cert_alias.pem")
{
$cert_alias = "$cert_alias" . "_";
}
}
# When it attempts to parse:
#
# Class 3 Public Primary Certification Authority - G2, Version 3
#
# keytool says:
#
# #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
# Unparseable AuthorityInfoAccess extension due to
# java.io.IOException: Invalid encoding of URI
#
# If we do not exclude this file
# openjdk/jdk/test/lib/security/cacerts/VerifyCACerts.java fails
# on this cert, printing:
#
# Couldn't verify: java.security.SignatureException: Signature
# does not match.
#
elsif ($cert =~
/A6:0F:34:C8:62:6C:81:F6:8B:F7:7D:A9:F6:67:58:8A:90:3F:7D:36/)
{
$write_current_cert = 0;
$pem_file_count--;
}
elsif ($cert eq "-----BEGIN CERTIFICATE-----\n")
{
if ($in_cert_block != 0)
{
die "$file is malformed.";
}
$in_cert_block = 1;
if ($write_current_cert == 1)
{
$pem_file_count++;
if (-e "$cert_alias.pem")
{
print "$cert_alias";
die "already exists"
}
open(PEM, ">$cert_alias.pem");
print PEM $cert;
}
}
elsif ($cert eq "-----END CERTIFICATE-----\n")
{
$in_cert_block = 0;
if ($write_current_cert == 1)
{
print PEM $cert;
close(PEM);
}
$write_current_cert = 1
}
else
{
if ($in_cert_block == 1 && $write_current_cert == 1)
{
print PEM $cert;
}
}
}
# Check that the correct number of .pem files were produced.
@pem_files = <*.pem>;
if (@pem_files != $pem_file_count)
{
print "$pem_file_count";
die "Number of .pem files produced does not match".
" number of certs read from $file.";
}
# Now store each cert in the 'cacerts' file using keytool.
$certs_written_count = 0;
foreach $pem_file (@pem_files)
{
system "$ARGV[0] -noprompt -import".
" -alias `basename $pem_file .pem`".
" -keystore cacerts -storepass 'changeit' -file $pem_file";
unlink($pem_file);
$certs_written_count++;
}
# Check that the correct number of certs were added to the keystore.
if ($certs_written_count != $pem_file_count)
{
die "Number of certs added to keystore does not match".
" number of certs read from $file.";
}

View File

@@ -0,0 +1,577 @@
Taken from:
http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000399.html
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-30 21:15:49.115227000 +0000
@@ -1040,8 +1040,8 @@
object = builder()->CreateInlineOop(field->holder());
BasicType basic_type = field->type()->basic_type();
- const Type *stack_type = SharkType::to_stackType(basic_type);
- const Type *field_type = SharkType::to_arrayType(basic_type);
+ Type *stack_type = SharkType::to_stackType(basic_type);
+ Type *field_type = SharkType::to_arrayType(basic_type);
Value *addr = builder()->CreateAddressOfStructEntry(
object, in_ByteSize(field->offset_in_bytes()),
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-30 21:15:49.315227000 +0000
@@ -47,14 +47,14 @@
// Helpers for accessing structures
Value* SharkBuilder::CreateAddressOfStructEntry(Value* base,
ByteSize offset,
- const Type* type,
+ Type* type,
const char* name) {
return CreateBitCast(CreateStructGEP(base, in_bytes(offset)), type, name);
}
LoadInst* SharkBuilder::CreateValueOfStructEntry(Value* base,
ByteSize offset,
- const Type* type,
+ Type* type,
const char* name) {
return CreateLoad(
CreateAddressOfStructEntry(
@@ -71,7 +71,7 @@
}
Value* SharkBuilder::CreateArrayAddress(Value* arrayoop,
- const Type* element_type,
+ Type* element_type,
int element_bytes,
ByteSize base_offset,
Value* index,
@@ -114,7 +114,7 @@
// Helpers for creating intrinsics and external functions.
-const Type* SharkBuilder::make_type(char type, bool void_ok) {
+Type* SharkBuilder::make_type(char type, bool void_ok) {
switch (type) {
// Primitive types
case 'c':
@@ -159,14 +159,14 @@
}
}
-const FunctionType* SharkBuilder::make_ftype(const char* params,
+FunctionType* SharkBuilder::make_ftype(const char* params,
const char* ret) {
- std::vector<const Type*> param_types;
+ std::vector<Type*> param_types;
for (const char* c = params; *c; c++)
param_types.push_back(make_type(*c, false));
assert(strlen(ret) == 1, "should be");
- const Type *return_type = make_type(*ret, true);
+ Type *return_type = make_type(*ret, true);
return FunctionType::get(return_type, param_types, false);
}
@@ -565,7 +565,7 @@
Value* SharkBuilder::CreateInlineData(void* data,
size_t size,
- const Type* type,
+ Type* type,
const char* name) {
return CreateIntToPtr(
code_buffer_address(code_buffer()->inline_data(data, size)),
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp 2011-08-30 19:52:46.735227001 +0000
@@ -57,18 +57,18 @@
public:
llvm::Value* CreateAddressOfStructEntry(llvm::Value* base,
ByteSize offset,
- const llvm::Type* type,
+ llvm::Type* type,
const char *name = "");
llvm::LoadInst* CreateValueOfStructEntry(llvm::Value* base,
ByteSize offset,
- const llvm::Type* type,
+ llvm::Type* type,
const char *name = "");
// Helpers for accessing arrays.
public:
llvm::LoadInst* CreateArrayLength(llvm::Value* arrayoop);
llvm::Value* CreateArrayAddress(llvm::Value* arrayoop,
- const llvm::Type* element_type,
+ llvm::Type* element_type,
int element_bytes,
ByteSize base_offset,
llvm::Value* index,
@@ -85,8 +85,8 @@
// Helpers for creating intrinsics and external functions.
private:
- static const llvm::Type* make_type(char type, bool void_ok);
- static const llvm::FunctionType* make_ftype(const char* params,
+ static llvm::Type* make_type(char type, bool void_ok);
+ static llvm::FunctionType* make_ftype(const char* params,
const char* ret);
llvm::Value* make_function(const char* name,
const char* params,
@@ -211,7 +211,7 @@
}
llvm::Value* CreateInlineData(void* data,
size_t size,
- const llvm::Type* type,
+ llvm::Type* type,
const char* name = "");
// Helpers for creating basic blocks.
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp 2011-08-30 19:52:46.735227001 +0000
@@ -230,7 +230,7 @@
}
Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset,
- const Type* type) {
+ Type* type) {
Value *result = builder()->CreateStructGEP(osr_buf(), offset);
if (type != SharkType::intptr_type())
result = builder()->CreateBitCast(result, PointerType::getUnqual(type));
@@ -254,12 +254,12 @@
}
}
-void SharkDecacher::write_value_to_frame(const Type* type,
+void SharkDecacher::write_value_to_frame(Type* type,
Value* value,
int offset) {
builder()->CreateStore(value, stack()->slot_addr(offset, type));
}
-Value* SharkCacher::read_value_from_frame(const Type* type, int offset) {
+Value* SharkCacher::read_value_from_frame(Type* type, int offset) {
return builder()->CreateLoad(stack()->slot_addr(offset, type));
}
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp 2011-08-30 19:52:46.745227001 +0000
@@ -192,7 +192,7 @@
// Writer helper
protected:
- void write_value_to_frame(const llvm::Type* type,
+ void write_value_to_frame(llvm::Type* type,
llvm::Value* value,
int offset);
};
@@ -321,7 +321,7 @@
// Writer helper
protected:
- llvm::Value* read_value_from_frame(const llvm::Type* type, int offset);
+ llvm::Value* read_value_from_frame(llvm::Type* type, int offset);
};
class SharkJavaCallCacher : public SharkCacher {
@@ -422,7 +422,7 @@
// Helper
private:
- llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type);
+ llvm::Value* CreateAddressOfOSRBufEntry(int offset, llvm::Type* type);
};
#endif // SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkContext.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkContext.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkContext.cpp 2011-08-30 19:52:46.745227001 +0000
@@ -76,7 +76,7 @@
_zeroStack_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(ZeroStack)));
- std::vector<const Type*> params;
+ std::vector<Type*> params;
params.push_back(methodOop_type());
params.push_back(intptr_type());
params.push_back(thread_type());
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkContext.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkContext.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkContext.hpp 2011-08-30 19:55:03.425227001 +0000
@@ -68,118 +68,118 @@
module()->getFunctionList().push_back(function);
}
llvm::Constant* get_external(const char* name,
- const llvm::FunctionType* sig) {
+ llvm::FunctionType* sig) {
return module()->getOrInsertFunction(name, sig);
}
// Basic types
private:
- const llvm::Type* _void_type;
- const llvm::IntegerType* _bit_type;
- const llvm::IntegerType* _jbyte_type;
- const llvm::IntegerType* _jshort_type;
- const llvm::IntegerType* _jint_type;
- const llvm::IntegerType* _jlong_type;
- const llvm::Type* _jfloat_type;
- const llvm::Type* _jdouble_type;
+ llvm::Type* _void_type;
+ llvm::IntegerType* _bit_type;
+ llvm::IntegerType* _jbyte_type;
+ llvm::IntegerType* _jshort_type;
+ llvm::IntegerType* _jint_type;
+ llvm::IntegerType* _jlong_type;
+ llvm::Type* _jfloat_type;
+ llvm::Type* _jdouble_type;
public:
- const llvm::Type* void_type() const {
+ llvm::Type* void_type() const {
return _void_type;
}
- const llvm::IntegerType* bit_type() const {
+ llvm::IntegerType* bit_type() const {
return _bit_type;
}
- const llvm::IntegerType* jbyte_type() const {
+ llvm::IntegerType* jbyte_type() const {
return _jbyte_type;
}
- const llvm::IntegerType* jshort_type() const {
+ llvm::IntegerType* jshort_type() const {
return _jshort_type;
}
- const llvm::IntegerType* jint_type() const {
+ llvm::IntegerType* jint_type() const {
return _jint_type;
}
- const llvm::IntegerType* jlong_type() const {
+ llvm::IntegerType* jlong_type() const {
return _jlong_type;
}
- const llvm::Type* jfloat_type() const {
+ llvm::Type* jfloat_type() const {
return _jfloat_type;
}
- const llvm::Type* jdouble_type() const {
+ llvm::Type* jdouble_type() const {
return _jdouble_type;
}
- const llvm::IntegerType* intptr_type() const {
+ llvm::IntegerType* intptr_type() const {
return LP64_ONLY(jlong_type()) NOT_LP64(jint_type());
}
// Compound types
private:
- const llvm::PointerType* _itableOffsetEntry_type;
- const llvm::PointerType* _jniEnv_type;
- const llvm::PointerType* _jniHandleBlock_type;
- const llvm::PointerType* _klass_type;
- const llvm::PointerType* _methodOop_type;
- const llvm::ArrayType* _monitor_type;
- const llvm::PointerType* _oop_type;
- const llvm::PointerType* _thread_type;
- const llvm::PointerType* _zeroStack_type;
- const llvm::FunctionType* _entry_point_type;
- const llvm::FunctionType* _osr_entry_point_type;
+ llvm::PointerType* _itableOffsetEntry_type;
+ llvm::PointerType* _jniEnv_type;
+ llvm::PointerType* _jniHandleBlock_type;
+ llvm::PointerType* _klass_type;
+ llvm::PointerType* _methodOop_type;
+ llvm::ArrayType* _monitor_type;
+ llvm::PointerType* _oop_type;
+ llvm::PointerType* _thread_type;
+ llvm::PointerType* _zeroStack_type;
+ llvm::FunctionType* _entry_point_type;
+ llvm::FunctionType* _osr_entry_point_type;
public:
- const llvm::PointerType* itableOffsetEntry_type() const {
+ llvm::PointerType* itableOffsetEntry_type() const {
return _itableOffsetEntry_type;
}
- const llvm::PointerType* jniEnv_type() const {
+ llvm::PointerType* jniEnv_type() const {
return _jniEnv_type;
}
- const llvm::PointerType* jniHandleBlock_type() const {
+ llvm::PointerType* jniHandleBlock_type() const {
return _jniHandleBlock_type;
}
- const llvm::PointerType* klass_type() const {
+ llvm::PointerType* klass_type() const {
return _klass_type;
}
- const llvm::PointerType* methodOop_type() const {
+ llvm::PointerType* methodOop_type() const {
return _methodOop_type;
}
- const llvm::ArrayType* monitor_type() const {
+ llvm::ArrayType* monitor_type() const {
return _monitor_type;
}
- const llvm::PointerType* oop_type() const {
+ llvm::PointerType* oop_type() const {
return _oop_type;
}
- const llvm::PointerType* thread_type() const {
+ llvm::PointerType* thread_type() const {
return _thread_type;
}
- const llvm::PointerType* zeroStack_type() const {
+ llvm::PointerType* zeroStack_type() const {
return _zeroStack_type;
}
- const llvm::FunctionType* entry_point_type() const {
+ llvm::FunctionType* entry_point_type() const {
return _entry_point_type;
}
- const llvm::FunctionType* osr_entry_point_type() const {
+ llvm::FunctionType* osr_entry_point_type() const {
return _osr_entry_point_type;
}
// Mappings
private:
- const llvm::Type* _to_stackType[T_CONFLICT];
- const llvm::Type* _to_arrayType[T_CONFLICT];
+ llvm::Type* _to_stackType[T_CONFLICT];
+ llvm::Type* _to_arrayType[T_CONFLICT];
private:
- const llvm::Type* map_type(const llvm::Type* const* table,
+ llvm::Type* map_type(llvm::Type* const* table,
BasicType type) const {
assert(type >= 0 && type < T_CONFLICT, "unhandled type");
- const llvm::Type* result = table[type];
+ llvm::Type* result = table[type];
assert(type != NULL, "unhandled type");
return result;
}
public:
- const llvm::Type* to_stackType(BasicType type) const {
+ llvm::Type* to_stackType(BasicType type) const {
return map_type(_to_stackType, type);
}
- const llvm::Type* to_arrayType(BasicType type) const {
+ llvm::Type* to_arrayType(BasicType type) const {
return map_type(_to_arrayType, type);
}
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-30 21:16:20.725227002 +0000
@@ -83,9 +83,9 @@
}
// Start building the argument list
- std::vector<const Type*> param_types;
+ std::vector<Type*> param_types;
std::vector<Value*> param_values;
- const PointerType *box_type = PointerType::getUnqual(SharkType::oop_type());
+ PointerType *box_type = PointerType::getUnqual(SharkType::oop_type());
// First argument is the JNIEnv
param_types.push_back(SharkType::jniEnv_type());
@@ -170,7 +170,7 @@
// fall through
default:
- const Type *param_type = SharkType::to_stackType(arg_type(i));
+ Type *param_type = SharkType::to_stackType(arg_type(i));
param_types.push_back(param_type);
param_values.push_back(
@@ -201,7 +201,7 @@
// Make the call
BasicType result_type = target()->result_type();
- const Type* return_type;
+ Type* return_type;
if (result_type == T_VOID)
return_type = SharkType::void_type();
else if (is_returning_oop())
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkStack.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkStack.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkStack.cpp 2011-08-30 19:52:46.745227001 +0000
@@ -163,7 +163,7 @@
}
Value* SharkStack::slot_addr(int offset,
- const Type* type,
+ Type* type,
const char* name) const {
bool needs_cast = type && type != SharkType::intptr_type();
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkStack.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkStack.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkStack.hpp 2011-08-30 19:52:46.755227001 +0000
@@ -204,7 +204,7 @@
// Addresses of things in the frame
public:
llvm::Value* slot_addr(int offset,
- const llvm::Type* type = NULL,
+ llvm::Type* type = NULL,
const char* name = "") const;
llvm::Value* monitor_addr(int index) const {
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-30 19:52:46.755227001 +0000
@@ -829,7 +829,7 @@
builder()->CreateArrayAddress(
array->jarray_value(), basic_type, index->jint_value()));
- const Type *stack_type = SharkType::to_stackType(basic_type);
+ Type *stack_type = SharkType::to_stackType(basic_type);
if (value->getType() != stack_type)
value = builder()->CreateIntCast(value, stack_type, basic_type != T_CHAR);
@@ -916,7 +916,7 @@
ShouldNotReachHere();
}
- const Type *array_type = SharkType::to_arrayType(basic_type);
+ Type *array_type = SharkType::to_arrayType(basic_type);
if (value->getType() != array_type)
value = builder()->CreateIntCast(value, array_type, basic_type != T_CHAR);
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkType.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkType.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkType.hpp 2011-08-30 19:52:46.755227001 +0000
@@ -40,82 +40,82 @@
// Basic types
public:
- static const llvm::Type* void_type() {
+ static llvm::Type* void_type() {
return context().void_type();
}
- static const llvm::IntegerType* bit_type() {
+ static llvm::IntegerType* bit_type() {
return context().bit_type();
}
- static const llvm::IntegerType* jbyte_type() {
+ static llvm::IntegerType* jbyte_type() {
return context().jbyte_type();
}
- static const llvm::IntegerType* jshort_type() {
+ static llvm::IntegerType* jshort_type() {
return context().jshort_type();
}
- static const llvm::IntegerType* jint_type() {
+ static llvm::IntegerType* jint_type() {
return context().jint_type();
}
- static const llvm::IntegerType* jlong_type() {
+ static llvm::IntegerType* jlong_type() {
return context().jlong_type();
}
- static const llvm::Type* jfloat_type() {
+ static llvm::Type* jfloat_type() {
return context().jfloat_type();
}
- static const llvm::Type* jdouble_type() {
+ static llvm::Type* jdouble_type() {
return context().jdouble_type();
}
- static const llvm::IntegerType* intptr_type() {
+ static llvm::IntegerType* intptr_type() {
return context().intptr_type();
}
// Compound types
public:
- static const llvm::PointerType* itableOffsetEntry_type() {
+ static llvm::PointerType* itableOffsetEntry_type() {
return context().itableOffsetEntry_type();
}
- static const llvm::PointerType* jniEnv_type() {
+ static llvm::PointerType* jniEnv_type() {
return context().jniEnv_type();
}
- static const llvm::PointerType* jniHandleBlock_type() {
+ static llvm::PointerType* jniHandleBlock_type() {
return context().jniHandleBlock_type();
}
- static const llvm::PointerType* klass_type() {
+ static llvm::PointerType* klass_type() {
return context().klass_type();
}
- static const llvm::PointerType* methodOop_type() {
+ static llvm::PointerType* methodOop_type() {
return context().methodOop_type();
}
- static const llvm::ArrayType* monitor_type() {
+ static llvm::ArrayType* monitor_type() {
return context().monitor_type();
}
- static const llvm::PointerType* oop_type() {
+ static llvm::PointerType* oop_type() {
return context().oop_type();
}
- static const llvm::PointerType* thread_type() {
+ static llvm::PointerType* thread_type() {
return context().thread_type();
}
- static const llvm::PointerType* zeroStack_type() {
+ static llvm::PointerType* zeroStack_type() {
return context().zeroStack_type();
}
- static const llvm::FunctionType* entry_point_type() {
+ static llvm::FunctionType* entry_point_type() {
return context().entry_point_type();
}
- static const llvm::FunctionType* osr_entry_point_type() {
+ static llvm::FunctionType* osr_entry_point_type() {
return context().osr_entry_point_type();
}
// Mappings
public:
- static const llvm::Type* to_stackType(BasicType type) {
+ static llvm::Type* to_stackType(BasicType type) {
return context().to_stackType(type);
}
- static const llvm::Type* to_stackType(ciType* type) {
+ static llvm::Type* to_stackType(ciType* type) {
return to_stackType(type->basic_type());
}
- static const llvm::Type* to_arrayType(BasicType type) {
+ static llvm::Type* to_arrayType(BasicType type) {
return context().to_arrayType(type);
}
- static const llvm::Type* to_arrayType(ciType* type) {
+ static llvm::Type* to_arrayType(ciType* type) {
return to_arrayType(type->basic_type());
}
};
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp 2011-08-30 20:23:51.805227002 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp 2011-08-30 20:24:26.455227000 +0000
@@ -91,7 +91,7 @@
bool is_osr() const {
return flow()->is_osr_flow();
}
- const llvm::FunctionType* entry_point_type() const {
+ llvm::FunctionType* entry_point_type() const {
if (is_osr())
return SharkType::osr_entry_point_type();
else

View File

@@ -0,0 +1,143 @@
Author: Ralph Sennhaser <sera@gentoo.org>
The idea is to apply the pax markings before using a freshly built jdk. Be it
for running tests or building additonal vms or after bootstrap to build the
final jdk.
There are currently two types of pax markings with the userspace utilities
chpax and paxctl. Both types of pax marking are base on modifing the ELFs. A
third type based on xattrs is in development.
diff --git a/Makefile.am b/Makefile.am
index 82ef261..e17fa5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -421,7 +421,7 @@ else
ICEDTEA_PATCHES += patches/nss-not-enabled-config.patch
endif
-if HAS_PAX
+if WITH_PAX
ICEDTEA_PATCHES += patches/no-test_gamma.patch
endif
@@ -450,7 +450,7 @@ ICEDTEA_ECJ_PATCHES += patches/ecj/cp40188-opengl.patch
endif
endif
-if !HAS_PAX
+if !WITH_PAX
ICEDTEA_ECJ_PATCHES += patches/ecj/no-test_gamma.patch
endif
@@ -1359,6 +1359,7 @@ stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \
$(ICEDTEA_ENV) \
-C openjdk \
$(ICEDTEA_BUILD_TARGET)
+ $(abs_top_builddir)/pax-mark-vm $(BUILD_OUTPUT_DIR)/j2sdk-image
mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR)
mkdir -p $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR)
mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext
@@ -1586,6 +1587,7 @@ stamps/icedtea-ecj.stamp: stamps/bootstrap-directory-symlink-ecj.stamp \
$(ICEDTEA_ENV_ECJ) \
-C openjdk-ecj/ \
$(ICEDTEA_BUILD_TARGET)
+ $(abs_top_builddir)/pax-mark-vm $(ECJ_BUILD_OUTPUT_DIR)/j2sdk-image
@echo "ecj-poured IcedTea is served:" \
$(ECJ_BUILD_OUTPUT_DIR)
mkdir -p stamps
diff --git a/acinclude.m4 b/acinclude.m4
index 503131c..e80b209 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1677,3 +1677,49 @@ AM_CONDITIONAL([CP39408_JAVAH], test x"${it_cv_cp39408_javah}" = "xyes")
AM_CONDITIONAL([CP40188_JAVAH], test x"${it_cv_cp40188_javah}" = "xyes")
AC_PROVIDE([$0])dnl
])
+
+AC_DEFUN_ONCE([IT_WITH_PAX],
+[
+ AC_MSG_CHECKING([for pax utility to use])
+ AC_ARG_WITH([pax],
+ [AS_HELP_STRING(--with-pax=COMMAND,the command used for pax marking)],
+ [
+ PAX_COMMAND=${withval}
+ if test "x${PAX_COMMAND}" = "xno"; then
+ PAX_COMMAND="not specified"
+ fi
+ ],
+ [
+ PAX_COMMAND="not specified"
+ ])
+ case "x${PAX_COMMAND}" in
+ xchpax)
+ case "${host_cpu}" in
+ i?86)
+ PAX_COMMAND_ARGS="-msp"
+ ;;
+ *)
+ PAX_COMMAND_ARGS="-m"
+ ;;
+ esac
+ ;;
+ xpaxctl)
+ case "${host_cpu}" in
+ i?86)
+ PAX_COMMAND_ARGS="-msp"
+ ;;
+ *)
+ PAX_COMMAND_ARGS="-m"
+ ;;
+ esac
+ ;;
+ *)
+ PAX_COMMAND="not specified"
+ PAX_COMMAND_ARGS="not specified"
+ ;;
+ esac
+ AM_CONDITIONAL(WITH_PAX, test "x${PAX_COMMAND}" != "xnot specified")
+ AC_MSG_RESULT(${PAX_COMMAND})
+ AC_SUBST(PAX_COMMAND)
+ AC_SUBST(PAX_COMMAND_ARGS)
+])
diff --git a/configure.ac b/configure.ac
index 580840e..f37ef68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,6 @@ IT_CHECK_GCC_VERSION
IT_CHECK_NUMBER_OF_PARALLEL_JOBS
IT_CP_SUPPORTS_REFLINK
IT_CAN_HARDLINK_TO_SOURCE_TREE
-IT_CHECK_FOR_PAX
IT_LOCATE_NSS
# Use xvfb-run if found to run gui tests (check-jdk).
@@ -189,6 +188,9 @@ IT_WITH_TZDATA_DIR
IT_GETDTDTYPE_CHECK
IT_JAVAH
+IT_WITH_PAX
+AC_CONFIG_FILES([pax-mark-vm], [chmod +x pax-mark-vm])
+
dnl pkgconfig cannot be used to find these headers and libraries.
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
,[AC_MSG_ERROR("CUPS headers were not found -
diff --git a/pax-mark-vm.in b/pax-mark-vm.in
new file mode 100644
index 0000000..bdff735
--- /dev/null
+++ b/pax-mark-vm.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Taken from Gentoo's pax-utils.eclass
+list_paxables() {
+ file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
+}
+
+if test "@PAX_COMMAND@" != "not specified"; then
+ for paxable in `list_paxables "${1}"/bin/* "${1}"/jre/bin/*`; do
+ echo "PaX mark @PAX_COMMAND_ARGS@ ${paxable}"
+ @PAX_COMMAND@ @PAX_COMMAND_ARGS@ "${paxable}"
+ done
+fi

View File

@@ -0,0 +1,217 @@
Author: Ralph Sennhauser <sera@gentoo.org>
Split out add-shark target.
This way the shark build will end up in shark instead of zero and java -zero
will work as expected. Ie. allows for easier setup of per app vm preferences
if desired. Also removes a bunch of conditionals which will simplify writing
jvm.cfg correctly without a full rebuild.
diff --git a/Makefile.am b/Makefile.am
index 82ef261..cfd0d6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1416,24 +1416,24 @@ clean-icedtea-debug:
rm -f stamps/icedtea-debug.stamp
stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp \
- stamps/add-jamvm.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \
+ stamps/add-jamvm.stamp stamps/add-cacao.stamp stamps/add-zero.stamp stamps/add-shark.stamp \
stamps/add-systemtap.stamp stamps/add-pulseaudio.stamp stamps/add-nss.stamp stamps/add-tzdata-support.stamp
mkdir -p stamps
touch stamps/icedtea-against-icedtea.stamp
-clean-icedtea-against-icedtea: clean-add-jamvm clean-add-zero clean-add-cacao \
+clean-icedtea-against-icedtea: clean-add-jamvm clean-add-zero clean-add-cacao clean-add-shark \
clean-add-systemtap clean-add-pulseaudio \
clean-add-nss clean-add-tzdata-support
rm -f stamps/icedtea-against-icedtea.stamp
stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \
- stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \
+ stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp stamps/add-shark-debug.stamp \
stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \
stamps/add-nss-debug.stamp stamps/add-tzdata-support-debug.stamp
mkdir -p stamps
touch stamps/icedtea-debug-against-icedtea.stamp
-clean-icedtea-debug-against-icedtea: clean-add-zero-debug \
+clean-icedtea-debug-against-icedtea: clean-add-zero-debug clean-add-zero-debug \
clean-add-jamvm-debug clean-add-cacao-debug clean-add-systemtap-debug \
clean-add-pulseaudio-debug clean-add-nss-debug clean-add-tzdata-support-debug
rm -f stamps/icedtea-debug-against-icedtea.stamp
@@ -1946,27 +1946,22 @@ clean-add-cacao-debug:
# configure script arguments, quoted in single quotes
CONFIGURE_ARGS = @CONFIGURE_ARGS@
ADD_ZERO_CONFIGURE_ARGS = \
- --with-jdk-home=$(BUILD_OUTPUT_DIR)/j2sdk-image \
- --enable-zero
-if ADD_SHARK_BUILD
-ADD_ZERO_CONFIGURE_ARGS += \
- --enable-shark
-endif
-ADD_ZERO_CONFIGURE_ARGS += \
- --disable-docs \
$(filter-out '--with-jdk-home=% '--with-ecj=% \
'--with-java=% '--with-javah=% \
'--with-rmic=% '--with-additional-vms=% \
'--with-openjdk '--with-openjdk=% , \
$(CONFIGURE_ARGS)) \
$(if $(findstring --with-openjdk-src-zip=, $(CONFIGURE_ARGS)),, \
- --with-openjdk-src-zip=$(abs_top_builddir)/$(OPENJDK_SRC_ZIP))
+ --with-openjdk-src-zip=$(abs_top_builddir)/$(OPENJDK_SRC_ZIP)) \
+ --with-jdk-home=$(BUILD_OUTPUT_DIR)/j2sdk-image \
+ --disable-bootstrap \
+ --enable-zero \
+ --disable-docs
if WITH_ALT_HSBUILD
ADD_ZERO_CONFIGURE_ARGS += \
$(if $(findstring --with-hotspot-src-zip=, $(CONFIGURE_ARGS)),, \
--with-hotspot-src-zip=$(abs_top_builddir)/$(HOTSPOT_SRC_ZIP))
endif
-ADD_ZERO_CONFIGURE_ARGS += --disable-bootstrap
ADD_ZERO_EXTRA_BUILD_ENV = \
BUILD_LANGTOOLS=false ALT_LANGTOOLS_DIST=$(BUILD_OUTPUT_DIR)/langtools/dist \
@@ -2003,34 +1998,19 @@ if ADD_ZERO_BUILD
$(ADD_ZERO_EXTRA_BUILD_ENV) \
$(ARCH_PREFIX) $(MAKE) -C zerovm $(ICEDTEA_BUILD_TARGET)
-if ZERO_BUILD
- mkdir -p $(BUILD_JRE_ARCH_DIR)/shark
- cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
- $(BUILD_JRE_ARCH_DIR)/shark/
- printf -- '-shark KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
-else
mkdir -p $(BUILD_JRE_ARCH_DIR)/zero
cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
$(BUILD_JRE_ARCH_DIR)/zero/
printf -- '-zero KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
-if ADD_SHARK_BUILD
- printf -- '-shark ALIASED_TO -zero\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
-else
- printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
-endif
-endif
else
printf -- '-zero ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
- printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
endif
touch $@
clean-add-zero:
rm -rf $(BUILD_JRE_ARCH_DIR)/zero
- rm -rf $(BUILD_JRE_ARCH_DIR)/shark
rm -rf zerovm
sed -i 's#-zero KNOWN#-zero ERROR#' jvm.cfg
- sed -i 's#-shark KNOWN#-shark ERROR#' jvm.cfg
rm -f stamps/add-zero.stamp
stamps/add-zero-debug.stamp: stamps/icedtea-debug.stamp
@@ -2044,30 +2024,96 @@ if ADD_ZERO_BUILD
$(ADD_ZERO_EXTRA_BUILD_ENV) \
$(ARCH_PREFIX) $(MAKE) -C zerovm $(ICEDTEA_DEBUG_BUILD_TARGET)
-if ZERO_BUILD
- mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
- cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
- $(BUILD_DEBUG_JRE_ARCH_DIR)/shark/
- printf -- '-shark KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
-else
mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/zero
cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
$(BUILD_DEBUG_JRE_ARCH_DIR)/zero/
printf -- '-zero KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
-endif
else
printf -- '-zero ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
- printf -- '-shark ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
endif
touch $@
clean-add-zero-debug:
rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/zero
- rm -rf $(BUILD_JRE_ARCH_DIR)/shark
rm -rf zerovm
sed -i 's#-zero KNOWN#-zero ERROR#' jvm.cfg
- sed -i 's#-shark KNOWN#-shark ERROR#' jvm.cfg
rm -f stamps/add-zero-debug.stamp
+
+ADD_SHARK_CONFIGURE_ARGS = \
+ $(ADD_ZERO_CONFIGURE_ARGS) \
+ --enable-shark
+
+ADD_SHARK_EXTRA_BUILD_ENV = \
+ $(ADD_ZERO_EXTRA_BUILD_ENV)
+
+
+stamps/add-shark.stamp: stamps/icedtea.stamp
+if ADD_SHARK_BUILD
+ mkdir -p sharkvm
+
+ cd sharkvm && \
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(abs_top_srcdir)/configure $(ADD_SHARK_CONFIGURE_ARGS)
+
+ : # create directories which are expected by icedtea components,
+ : # implicitly assumed to be created by the jdk build.
+ mkdir -p $(patsubst $(abs_top_builddir)/%,$(abs_top_builddir)/sharkvm/%, \
+ $(ECJ_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) \
+ $(ECJ_BUILD_OUTPUT_DIR)/j2sdk-image/man/man1 \
+ $(ECJ_BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) \
+ $(ECJ_BUILD_OUTPUT_DIR)/j2re-image/man/man1 \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/man/man1 \
+ $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) \
+ $(BUILD_OUTPUT_DIR)/j2re-image/man/man1 \
+ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) \
+ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/man/man1 \
+ $(DEBUG_BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR) \
+ $(DEBUG_BUILD_OUTPUT_DIR)/j2re-image/man/man1)
+
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(MAKE) -C sharkvm $(ICEDTEA_BUILD_TARGET)
+
+ mkdir -p $(BUILD_JRE_ARCH_DIR)/shark
+ cp -a sharkvm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
+ $(BUILD_JRE_ARCH_DIR)/shark/
+ printf -- '-shark KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+else
+ printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+endif
+ touch $@
+
+clean-add-shark:
+ rm -rf $(BUILD_JRE_ARCH_DIR)/shark
+ rm -rf sharkvm
+ sed -i 's#-shark KNOWN#-shark ERROR#' jvm.cfg
+ rm -f stamps/add-shark.stamp
+
+stamps/add-shark-debug.stamp: stamps/icedtea-debug.stamp
+if ADD_SHARK_BUILD
+ mkdir -p sharkvm
+
+ cd sharkvm && \
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(abs_top_srcdir)/configure $(ADD_SHARK_CONFIGURE_ARGS)
+
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(MAKE) -C sharkvm $(ICEDTEA_DEBUG_BUILD_TARGET)
+
+ mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
+ cp -a shark/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
+ $(BUILD_DEBUG_JRE_ARCH_DIR)/shark/
+ printf -- '-shark KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+else
+ printf -- '-shark ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+endif
+ touch $@
+
+clean-add-shark-debug:
+ rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
+ rm -rf sharkvm
+ sed -i 's#-shark KNOWN#-shark ERROR#' jvm.cfg
+ rm -f stamps/add-shark-debug.stamp
# end additional VMs

View File

@@ -0,0 +1,16 @@
Author: Ralph Sennhauser <sera@gentoo.org>
The llvm libdir isn't in the default search path on Gentoo. Adding path explicitely.
diff --git a/configure.ac b/configure.ac
index 580840e..852f5a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -444,6 +444,7 @@ if test "x${SHARK_BUILD_TRUE}" = x || test "x${ADD_SHARK_BUILD_TRUE}" = x; then
LLVM_LDFLAGS="$LLVM_LDFLAGS$flag"
fi
done
+ LLVM_LDFLAGS="$LLVM_LDFLAGS -Wl,-rpath,$($LLVM_CONFIG --libdir)"
dnl LLVM_LIBS
LIBS_SAVED=$LIBS
LDFLAGS_SAVED=$LDFLAGS

View File

@@ -0,0 +1,578 @@
Taken from:
http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000399.html
Adopted to icedtea-7
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkBlock.cpp 2011-08-30 21:15:49.115227000 +0000
@@ -1040,8 +1040,8 @@
object = builder()->CreateInlineOop(field->holder());
BasicType basic_type = field->type()->basic_type();
- const Type *stack_type = SharkType::to_stackType(basic_type);
- const Type *field_type = SharkType::to_arrayType(basic_type);
+ Type *stack_type = SharkType::to_stackType(basic_type);
+ Type *field_type = SharkType::to_arrayType(basic_type);
Value *addr = builder()->CreateAddressOfStructEntry(
object, in_ByteSize(field->offset_in_bytes()),
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.cpp 2011-08-30 21:15:49.315227000 +0000
@@ -47,14 +47,14 @@
// Helpers for accessing structures
Value* SharkBuilder::CreateAddressOfStructEntry(Value* base,
ByteSize offset,
- const Type* type,
+ Type* type,
const char* name) {
return CreateBitCast(CreateStructGEP(base, in_bytes(offset)), type, name);
}
LoadInst* SharkBuilder::CreateValueOfStructEntry(Value* base,
ByteSize offset,
- const Type* type,
+ Type* type,
const char* name) {
return CreateLoad(
CreateAddressOfStructEntry(
@@ -71,7 +71,7 @@
}
Value* SharkBuilder::CreateArrayAddress(Value* arrayoop,
- const Type* element_type,
+ Type* element_type,
int element_bytes,
ByteSize base_offset,
Value* index,
@@ -114,7 +114,7 @@
// Helpers for creating intrinsics and external functions.
-const Type* SharkBuilder::make_type(char type, bool void_ok) {
+Type* SharkBuilder::make_type(char type, bool void_ok) {
switch (type) {
// Primitive types
case 'c':
@@ -159,14 +159,14 @@
}
}
-const FunctionType* SharkBuilder::make_ftype(const char* params,
+FunctionType* SharkBuilder::make_ftype(const char* params,
const char* ret) {
- std::vector<const Type*> param_types;
+ std::vector<Type*> param_types;
for (const char* c = params; *c; c++)
param_types.push_back(make_type(*c, false));
assert(strlen(ret) == 1, "should be");
- const Type *return_type = make_type(*ret, true);
+ Type *return_type = make_type(*ret, true);
return FunctionType::get(return_type, param_types, false);
}
@@ -565,7 +565,7 @@
Value* SharkBuilder::CreateInlineData(void* data,
size_t size,
- const Type* type,
+ Type* type,
const char* name) {
return CreateIntToPtr(
code_buffer_address(code_buffer()->inline_data(data, size)),
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkBuilder.hpp 2011-08-30 19:52:46.735227001 +0000
@@ -57,18 +57,18 @@
public:
llvm::Value* CreateAddressOfStructEntry(llvm::Value* base,
ByteSize offset,
- const llvm::Type* type,
+ llvm::Type* type,
const char *name = "");
llvm::LoadInst* CreateValueOfStructEntry(llvm::Value* base,
ByteSize offset,
- const llvm::Type* type,
+ llvm::Type* type,
const char *name = "");
// Helpers for accessing arrays.
public:
llvm::LoadInst* CreateArrayLength(llvm::Value* arrayoop);
llvm::Value* CreateArrayAddress(llvm::Value* arrayoop,
- const llvm::Type* element_type,
+ llvm::Type* element_type,
int element_bytes,
ByteSize base_offset,
llvm::Value* index,
@@ -85,8 +85,8 @@
// Helpers for creating intrinsics and external functions.
private:
- static const llvm::Type* make_type(char type, bool void_ok);
- static const llvm::FunctionType* make_ftype(const char* params,
+ static llvm::Type* make_type(char type, bool void_ok);
+ static llvm::FunctionType* make_ftype(const char* params,
const char* ret);
llvm::Value* make_function(const char* name,
const char* params,
@@ -211,7 +211,7 @@
}
llvm::Value* CreateInlineData(void* data,
size_t size,
- const llvm::Type* type,
+ llvm::Type* type,
const char* name = "");
// Helpers for creating basic blocks.
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.cpp 2011-08-30 19:52:46.735227001 +0000
@@ -230,7 +230,7 @@
}
Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset,
- const Type* type) {
+ Type* type) {
Value *result = builder()->CreateStructGEP(osr_buf(), offset);
if (type != SharkType::intptr_type())
result = builder()->CreateBitCast(result, PointerType::getUnqual(type));
@@ -254,12 +254,12 @@
}
}
-void SharkDecacher::write_value_to_frame(const Type* type,
+void SharkDecacher::write_value_to_frame(Type* type,
Value* value,
int offset) {
builder()->CreateStore(value, stack()->slot_addr(offset, type));
}
-Value* SharkCacher::read_value_from_frame(const Type* type, int offset) {
+Value* SharkCacher::read_value_from_frame(Type* type, int offset) {
return builder()->CreateLoad(stack()->slot_addr(offset, type));
}
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkCacheDecache.hpp 2011-08-30 19:52:46.745227001 +0000
@@ -192,7 +192,7 @@
// Writer helper
protected:
- void write_value_to_frame(const llvm::Type* type,
+ void write_value_to_frame(llvm::Type* type,
llvm::Value* value,
int offset);
};
@@ -321,7 +321,7 @@
// Writer helper
protected:
- llvm::Value* read_value_from_frame(const llvm::Type* type, int offset);
+ llvm::Value* read_value_from_frame(llvm::Type* type, int offset);
};
class SharkJavaCallCacher : public SharkCacher {
@@ -422,7 +422,7 @@
// Helper
private:
- llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type);
+ llvm::Value* CreateAddressOfOSRBufEntry(int offset, llvm::Type* type);
};
#endif // SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkContext.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkContext.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkContext.cpp 2011-08-30 19:52:46.745227001 +0000
@@ -76,7 +76,7 @@
_zeroStack_type = PointerType::getUnqual(
ArrayType::get(jbyte_type(), sizeof(ZeroStack)));
- std::vector<const Type*> params;
+ std::vector<Type*> params;
params.push_back(methodOop_type());
params.push_back(intptr_type());
params.push_back(thread_type());
Index: icedtea7-shark/openjdk/hotspot/src/share/vm/shark/sharkContext.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkContext.hpp 2011-09-29 00:13:07.000000000 +0200
+++ openjdk/hotspot/src/share/vm/shark/sharkContext.hpp 2011-12-12 12:49:57.481439513 +0100
@@ -68,118 +68,118 @@ class SharkContext : public llvm::LLVMCo
module()->getFunctionList().push_back(function);
}
llvm::Constant* get_external(const char* name,
- const llvm::FunctionType* sig) {
+ llvm::FunctionType* sig) {
return module()->getOrInsertFunction(name, sig);
}
// Basic types
private:
- const llvm::Type* _void_type;
- const llvm::IntegerType* _bit_type;
- const llvm::IntegerType* _jbyte_type;
- const llvm::IntegerType* _jshort_type;
- const llvm::IntegerType* _jint_type;
- const llvm::IntegerType* _jlong_type;
- const llvm::Type* _jfloat_type;
- const llvm::Type* _jdouble_type;
+ llvm::Type* _void_type;
+ llvm::IntegerType* _bit_type;
+ llvm::IntegerType* _jbyte_type;
+ llvm::IntegerType* _jshort_type;
+ llvm::IntegerType* _jint_type;
+ llvm::IntegerType* _jlong_type;
+ llvm::Type* _jfloat_type;
+ llvm::Type* _jdouble_type;
public:
- const llvm::Type* void_type() const {
+ llvm::Type* void_type() const {
return _void_type;
}
- const llvm::IntegerType* bit_type() const {
+ llvm::IntegerType* bit_type() const {
return _bit_type;
}
- const llvm::IntegerType* jbyte_type() const {
+ llvm::IntegerType* jbyte_type() const {
return _jbyte_type;
}
- const llvm::IntegerType* jshort_type() const {
+ llvm::IntegerType* jshort_type() const {
return _jshort_type;
}
- const llvm::IntegerType* jint_type() const {
+ llvm::IntegerType* jint_type() const {
return _jint_type;
}
- const llvm::IntegerType* jlong_type() const {
+ llvm::IntegerType* jlong_type() const {
return _jlong_type;
}
- const llvm::Type* jfloat_type() const {
+ llvm::Type* jfloat_type() const {
return _jfloat_type;
}
- const llvm::Type* jdouble_type() const {
+ llvm::Type* jdouble_type() const {
return _jdouble_type;
}
- const llvm::IntegerType* intptr_type() const {
+ llvm::IntegerType* intptr_type() const {
return LP64_ONLY(jlong_type()) NOT_LP64(jint_type());
}
// Compound types
private:
- const llvm::PointerType* _itableOffsetEntry_type;
- const llvm::PointerType* _jniEnv_type;
- const llvm::PointerType* _jniHandleBlock_type;
- const llvm::PointerType* _klass_type;
- const llvm::PointerType* _methodOop_type;
- const llvm::ArrayType* _monitor_type;
- const llvm::PointerType* _oop_type;
- const llvm::PointerType* _thread_type;
- const llvm::PointerType* _zeroStack_type;
- const llvm::FunctionType* _entry_point_type;
- const llvm::FunctionType* _osr_entry_point_type;
+ llvm::PointerType* _itableOffsetEntry_type;
+ llvm::PointerType* _jniEnv_type;
+ llvm::PointerType* _jniHandleBlock_type;
+ llvm::PointerType* _klass_type;
+ llvm::PointerType* _methodOop_type;
+ llvm::ArrayType* _monitor_type;
+ llvm::PointerType* _oop_type;
+ llvm::PointerType* _thread_type;
+ llvm::PointerType* _zeroStack_type;
+ llvm::FunctionType* _entry_point_type;
+ llvm::FunctionType* _osr_entry_point_type;
public:
- const llvm::PointerType* itableOffsetEntry_type() const {
+ llvm::PointerType* itableOffsetEntry_type() const {
return _itableOffsetEntry_type;
}
- const llvm::PointerType* jniEnv_type() const {
+ llvm::PointerType* jniEnv_type() const {
return _jniEnv_type;
}
- const llvm::PointerType* jniHandleBlock_type() const {
+ llvm::PointerType* jniHandleBlock_type() const {
return _jniHandleBlock_type;
}
- const llvm::PointerType* klass_type() const {
+ llvm::PointerType* klass_type() const {
return _klass_type;
}
- const llvm::PointerType* methodOop_type() const {
+ llvm::PointerType* methodOop_type() const {
return _methodOop_type;
}
- const llvm::ArrayType* monitor_type() const {
+ llvm::ArrayType* monitor_type() const {
return _monitor_type;
}
- const llvm::PointerType* oop_type() const {
+ llvm::PointerType* oop_type() const {
return _oop_type;
}
- const llvm::PointerType* thread_type() const {
+ llvm::PointerType* thread_type() const {
return _thread_type;
}
- const llvm::PointerType* zeroStack_type() const {
+ llvm::PointerType* zeroStack_type() const {
return _zeroStack_type;
}
- const llvm::FunctionType* entry_point_type() const {
+ llvm::FunctionType* entry_point_type() const {
return _entry_point_type;
}
- const llvm::FunctionType* osr_entry_point_type() const {
+ llvm::FunctionType* osr_entry_point_type() const {
return _osr_entry_point_type;
}
// Mappings
private:
- const llvm::Type* _to_stackType[T_CONFLICT];
- const llvm::Type* _to_arrayType[T_CONFLICT];
+ llvm::Type* _to_stackType[T_CONFLICT];
+ llvm::Type* _to_arrayType[T_CONFLICT];
private:
- const llvm::Type* map_type(const llvm::Type* const* table,
+ llvm::Type* map_type(llvm::Type* const* table,
BasicType type) const {
assert(type >= 0 && type < T_CONFLICT, "unhandled type");
- const llvm::Type* result = table[type];
+ llvm::Type* result = table[type];
assert(result != NULL, "unhandled type");
return result;
}
public:
- const llvm::Type* to_stackType(BasicType type) const {
+ llvm::Type* to_stackType(BasicType type) const {
return map_type(_to_stackType, type);
}
- const llvm::Type* to_arrayType(BasicType type) const {
+ llvm::Type* to_arrayType(BasicType type) const {
return map_type(_to_arrayType, type);
}
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp 2011-08-30 21:16:20.725227002 +0000
@@ -83,9 +83,9 @@
}
// Start building the argument list
- std::vector<const Type*> param_types;
+ std::vector<Type*> param_types;
std::vector<Value*> param_values;
- const PointerType *box_type = PointerType::getUnqual(SharkType::oop_type());
+ PointerType *box_type = PointerType::getUnqual(SharkType::oop_type());
// First argument is the JNIEnv
param_types.push_back(SharkType::jniEnv_type());
@@ -170,7 +170,7 @@
// fall through
default:
- const Type *param_type = SharkType::to_stackType(arg_type(i));
+ Type *param_type = SharkType::to_stackType(arg_type(i));
param_types.push_back(param_type);
param_values.push_back(
@@ -201,7 +201,7 @@
// Make the call
BasicType result_type = target()->result_type();
- const Type* return_type;
+ Type* return_type;
if (result_type == T_VOID)
return_type = SharkType::void_type();
else if (is_returning_oop())
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkStack.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkStack.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkStack.cpp 2011-08-30 19:52:46.745227001 +0000
@@ -163,7 +163,7 @@
}
Value* SharkStack::slot_addr(int offset,
- const Type* type,
+ Type* type,
const char* name) const {
bool needs_cast = type && type != SharkType::intptr_type();
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkStack.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkStack.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkStack.hpp 2011-08-30 19:52:46.755227001 +0000
@@ -204,7 +204,7 @@
// Addresses of things in the frame
public:
llvm::Value* slot_addr(int offset,
- const llvm::Type* type = NULL,
+ llvm::Type* type = NULL,
const char* name = "") const;
llvm::Value* monitor_addr(int index) const {
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp 2011-08-30 19:52:46.755227001 +0000
@@ -829,7 +829,7 @@
builder()->CreateArrayAddress(
array->jarray_value(), basic_type, index->jint_value()));
- const Type *stack_type = SharkType::to_stackType(basic_type);
+ Type *stack_type = SharkType::to_stackType(basic_type);
if (value->getType() != stack_type)
value = builder()->CreateIntCast(value, stack_type, basic_type != T_CHAR);
@@ -916,7 +916,7 @@
ShouldNotReachHere();
}
- const Type *array_type = SharkType::to_arrayType(basic_type);
+ Type *array_type = SharkType::to_arrayType(basic_type);
if (value->getType() != array_type)
value = builder()->CreateIntCast(value, array_type, basic_type != T_CHAR);
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkType.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkType.hpp 2011-07-05 18:31:05.000000000 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkType.hpp 2011-08-30 19:52:46.755227001 +0000
@@ -40,82 +40,82 @@
// Basic types
public:
- static const llvm::Type* void_type() {
+ static llvm::Type* void_type() {
return context().void_type();
}
- static const llvm::IntegerType* bit_type() {
+ static llvm::IntegerType* bit_type() {
return context().bit_type();
}
- static const llvm::IntegerType* jbyte_type() {
+ static llvm::IntegerType* jbyte_type() {
return context().jbyte_type();
}
- static const llvm::IntegerType* jshort_type() {
+ static llvm::IntegerType* jshort_type() {
return context().jshort_type();
}
- static const llvm::IntegerType* jint_type() {
+ static llvm::IntegerType* jint_type() {
return context().jint_type();
}
- static const llvm::IntegerType* jlong_type() {
+ static llvm::IntegerType* jlong_type() {
return context().jlong_type();
}
- static const llvm::Type* jfloat_type() {
+ static llvm::Type* jfloat_type() {
return context().jfloat_type();
}
- static const llvm::Type* jdouble_type() {
+ static llvm::Type* jdouble_type() {
return context().jdouble_type();
}
- static const llvm::IntegerType* intptr_type() {
+ static llvm::IntegerType* intptr_type() {
return context().intptr_type();
}
// Compound types
public:
- static const llvm::PointerType* itableOffsetEntry_type() {
+ static llvm::PointerType* itableOffsetEntry_type() {
return context().itableOffsetEntry_type();
}
- static const llvm::PointerType* jniEnv_type() {
+ static llvm::PointerType* jniEnv_type() {
return context().jniEnv_type();
}
- static const llvm::PointerType* jniHandleBlock_type() {
+ static llvm::PointerType* jniHandleBlock_type() {
return context().jniHandleBlock_type();
}
- static const llvm::PointerType* klass_type() {
+ static llvm::PointerType* klass_type() {
return context().klass_type();
}
- static const llvm::PointerType* methodOop_type() {
+ static llvm::PointerType* methodOop_type() {
return context().methodOop_type();
}
- static const llvm::ArrayType* monitor_type() {
+ static llvm::ArrayType* monitor_type() {
return context().monitor_type();
}
- static const llvm::PointerType* oop_type() {
+ static llvm::PointerType* oop_type() {
return context().oop_type();
}
- static const llvm::PointerType* thread_type() {
+ static llvm::PointerType* thread_type() {
return context().thread_type();
}
- static const llvm::PointerType* zeroStack_type() {
+ static llvm::PointerType* zeroStack_type() {
return context().zeroStack_type();
}
- static const llvm::FunctionType* entry_point_type() {
+ static llvm::FunctionType* entry_point_type() {
return context().entry_point_type();
}
- static const llvm::FunctionType* osr_entry_point_type() {
+ static llvm::FunctionType* osr_entry_point_type() {
return context().osr_entry_point_type();
}
// Mappings
public:
- static const llvm::Type* to_stackType(BasicType type) {
+ static llvm::Type* to_stackType(BasicType type) {
return context().to_stackType(type);
}
- static const llvm::Type* to_stackType(ciType* type) {
+ static llvm::Type* to_stackType(ciType* type) {
return to_stackType(type->basic_type());
}
- static const llvm::Type* to_arrayType(BasicType type) {
+ static llvm::Type* to_arrayType(BasicType type) {
return context().to_arrayType(type);
}
- static const llvm::Type* to_arrayType(ciType* type) {
+ static llvm::Type* to_arrayType(ciType* type) {
return to_arrayType(type->basic_type());
}
};
Index: icedtea6-shark/openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp
===================================================================
--- openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp 2011-08-30 20:23:51.805227002 +0000
+++ openjdk/hotspot/src/share/vm/shark/sharkFunction.hpp 2011-08-30 20:24:26.455227000 +0000
@@ -91,7 +91,7 @@
bool is_osr() const {
return flow()->is_osr_flow();
}
- const llvm::FunctionType* entry_point_type() const {
+ llvm::FunctionType* entry_point_type() const {
if (is_osr())
return SharkType::osr_entry_point_type();
else

View File

@@ -0,0 +1,202 @@
Author: Ralph Sennhaser <sera@gentoo.org>
The idea is to apply the pax markings before using a freshly built jdk. Be it
for running tests or building additonal vms or after bootstrap to build the
final jdk.
There are currently two types of pax markings with the userspace utilities
chpax and paxctl. Both types of pax marking are base on modifing the ELFs. A
third type based on xattrs is in development.
The embedded test_gamma.patch is taken from icedtea 2.0 itself.
diff --git a/Makefile.am b/Makefile.am
index 129edf2..158b149 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -279,6 +279,10 @@ else
ICEDTEA_PATCHES += patches/nss-not-enabled-config.patch
endif
+if WITH_PAX
+ICEDTEA_PATCHES += patches/test_gamma.patch
+endif
+
ICEDTEA_PATCHES += $(DISTRIBUTION_PATCHES)
# Bootstrapping patches
@@ -300,7 +304,6 @@ ICEDTEA_BOOT_PATCHES = \
patches/boot/jar.patch \
patches/boot/symbols.patch \
patches/boot/tobin.patch \
- patches/boot/test_gamma.patch \
patches/boot/tools.jar.patch \
patches/boot/jopt.patch \
patches/boot/jaxp-dependency.patch \
@@ -320,6 +323,10 @@ ICEDTEA_BOOT_PATCHES = \
patches/boot/ecj-autoboxing.patch \
patches/boot/xsltproc.patch
+if !WITH_PAX
+ICEDTEA_BOOT_PATCHES += patches/boot/test_gamma.patch
+endif
+
if CP39408_JAVAH
ICEDTEA_BOOT_PATCHES += patches/boot/pr39408.patch
endif
@@ -1612,6 +1619,7 @@ stamps/icedtea.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
$(ICEDTEA_ENV) \
-C openjdk/ \
$(ICEDTEA_BUILD_TARGET)
+ $(abs_top_builddir)/pax-mark-vm $(BUILD_OUTPUT_DIR)/j2sdk-image
mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR)
mkdir -p $(BUILD_OUTPUT_DIR)/j2re-image/lib/$(INSTALL_ARCH_DIR)
mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/ext
@@ -1765,6 +1773,7 @@ stamps/icedtea-boot.stamp: stamps/bootstrap-directory-symlink-stage1.stamp \
$(ICEDTEA_ENV_BOOT) \
-C openjdk-boot \
$(ICEDTEA_BUILD_TARGET)
+ $(abs_top_builddir)/pax-mark-vm $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image
@echo "Bootstrapped IcedTea is served:" \
$(BOOT_BUILD_OUTPUT_DIR)
mkdir -p stamps
diff --git a/acinclude.m4 b/acinclude.m4
index 5310d71..f08f1a9 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2181,3 +2181,49 @@ rmdir tmp.$$
AM_CONDITIONAL([NO_BYTECODE7], test x"${it_cv_bytecode7}" = "xyes")
AC_PROVIDE([$0])dnl
])
+
+AC_DEFUN_ONCE([IT_WITH_PAX],
+[
+ AC_MSG_CHECKING([for pax utility to use])
+ AC_ARG_WITH([pax],
+ [AS_HELP_STRING(--with-pax=COMMAND,the command used for pax marking)],
+ [
+ PAX_COMMAND=${withval}
+ if test "x${PAX_COMMAND}" = "xno"; then
+ PAX_COMMAND="not specified"
+ fi
+ ],
+ [
+ PAX_COMMAND="not specified"
+ ])
+ case "x${PAX_COMMAND}" in
+ xchpax)
+ case "${host_cpu}" in
+ i?86)
+ PAX_COMMAND_ARGS="-msp"
+ ;;
+ *)
+ PAX_COMMAND_ARGS="-m"
+ ;;
+ esac
+ ;;
+ xpaxctl)
+ case "${host_cpu}" in
+ i?86)
+ PAX_COMMAND_ARGS="-msp"
+ ;;
+ *)
+ PAX_COMMAND_ARGS="-m"
+ ;;
+ esac
+ ;;
+ *)
+ PAX_COMMAND="not specified"
+ PAX_COMMAND_ARGS="not specified"
+ ;;
+ esac
+ AM_CONDITIONAL(WITH_PAX, test "x${PAX_COMMAND}" != "xnot specified")
+ AC_MSG_RESULT(${PAX_COMMAND})
+ AC_SUBST(PAX_COMMAND)
+ AC_SUBST(PAX_COMMAND_ARGS)
+])
diff --git a/configure.ac b/configure.ac
index e0b866b..7c665ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,6 +146,9 @@ IT_WITH_PROJECT
IT_ENABLE_HG
IT_WITH_TZDATA_DIR
+IT_WITH_PAX
+AC_CONFIG_FILES([pax-mark-vm], [chmod +x pax-mark-vm])
+
AC_PATH_TOOL([HG],[hg])
if test "x${enable_hg}" = "xyes"; then
if test "x${HG}" = x; then
diff --git a/patches/test_gamma.patch b/patches/test_gamma.patch
new file mode 100644
index 0000000..7e8d3d6
--- /dev/null
+++ b/patches/test_gamma.patch
@@ -0,0 +1,47 @@
+diff -Nru ../openjdk.orig/openjdk/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile
+--- ../openjdk.orig/openjdk/hotspot/make/linux/Makefile 2009-10-30 17:37:07.000000000 +0000
++++ openjdk/hotspot/make/linux/Makefile 2009-10-30 17:45:40.000000000 +0000
+@@ -287,42 +287,36 @@
+
+ $(TARGETS_C2): $(SUBDIRS_C2)
+ cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
+- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
+ ifdef INSTALL
+ cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
+ endif
+
+ $(TARGETS_TIERED): $(SUBDIRS_TIERED)
+ cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
+- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma
+ ifdef INSTALL
+ cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
+ endif
+
+ $(TARGETS_C1): $(SUBDIRS_C1)
+ cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
+- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
+ ifdef INSTALL
+ cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
+ endif
+
+ $(TARGETS_CORE): $(SUBDIRS_CORE)
+ cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
+- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
+ ifdef INSTALL
+ cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
+ endif
+
+ $(TARGETS_ZERO): $(SUBDIRS_ZERO)
+ cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
+- cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && ./test_gamma
+ ifdef INSTALL
+ cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
+ endif
+
+ $(TARGETS_SHARK): $(SUBDIRS_SHARK)
+ cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
+- cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && ./test_gamma
+ ifdef INSTALL
+ cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
+ endif
+
diff --git a/pax-mark-vm.in b/pax-mark-vm.in
new file mode 100644
index 0000000..118bb61
--- /dev/null
+++ b/pax-mark-vm.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Taken from Gentoo's pax-utils.eclass
+list_paxables() {
+ file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
+}
+
+if test "@PAX_COMMAND@" != "not specified"; then
+ for paxable in `list_paxables "${1}"/bin/* "${1}"/jre/bin/*`; do
+ echo "PaX mark @PAX_COMMAND_ARGS@ ${paxable}"
+ @PAX_COMMAND@ @PAX_COMMAND_ARGS@ "${paxable}"
+ done
+fi

View File

@@ -0,0 +1,178 @@
Author: Ralph Sennhauser <sera@gentoo.org>
Split out add-shark target.
This way the shark build will end up in shark instead of zero and java -zero
will work as expected. Ie. allows for easier setup of per app vm preferences
if desired. Also removes a bunch of conditionals which will simplify writing
jvm.cfg correctly without a full rebuild.
diff --git a/Makefile.am b/Makefile.am
index 129edf2..fc4cc20 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1740,7 +1740,7 @@ clean-icedtea:
rm -f stamps/icedtea.stamp stamps/icedtea-debug.stamp
stamps/icedtea-stage2.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp \
- stamps/add-zero.stamp stamps/add-jamvm.stamp
+ stamps/add-zero.stamp stamps/add-jamvm.stamp stamps/add-shark.stamp
mkdir -p stamps
touch $@
@@ -1748,7 +1748,8 @@ clean-icedtea-stage2: clean-add-jamvm
rm -f stamps/icedtea-stage2.stamp
stamps/icedtea-debug-stage2.stamp: stamps/icedtea-debug.stamp \
- stamps/add-cacao-debug.stamp stamps/add-zero-debug.stamp stamps/add-jamvm-debug.stamp
+ stamps/add-cacao-debug.stamp stamps/add-zero-debug.stamp stamps/add-jamvm-debug.stamp \
+ stamps/add-shark-debug.stamp
mkdir -p stamps
touch $@
@@ -2060,12 +2061,7 @@ clean-add-cacao-debug:
CONFIGURE_ARGS = @CONFIGURE_ARGS@
ADD_ZERO_CONFIGURE_ARGS = \
--with-jdk-home=$(BUILD_OUTPUT_DIR)/j2sdk-image \
- --disable-bootstrap --enable-zero
-if ADD_SHARK_BUILD
-ADD_ZERO_CONFIGURE_ARGS += \
- --enable-shark
-endif
-ADD_ZERO_CONFIGURE_ARGS += \
+ --disable-bootstrap --enable-zero \
--disable-docs \
$(filter-out '--with-jdk-home=% '--with-ecj=% \
'--with-java=% '--with-javah=% \
@@ -2096,32 +2092,20 @@ if ADD_ZERO_BUILD
$(ADD_ZERO_EXTRA_BUILD_ENV) \
$(ARCH_PREFIX) $(MAKE) -C zerovm ICEDTEA_BUILD_TARGET=hotspot icedtea-stage2
-if ZERO_BUILD
- mkdir -p $(BUILD_JRE_ARCH_DIR)/shark
- cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
- $(BUILD_JRE_ARCH_DIR)/shark/
- printf -- '-shark KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
- printf -- '-zero ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
-else
mkdir -p $(BUILD_JRE_ARCH_DIR)/zero
cp -a zerovm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
$(BUILD_JRE_ARCH_DIR)/zero/
printf -- '-zero KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
- printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
-endif
else
printf -- '-zero ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
- printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
endif
touch $@
clean-add-zero:
rm -rf $(BUILD_JRE_ARCH_DIR)/zero
- rm -rf $(BUILD_JRE_ARCH_DIR)/shark
rm -rf zerovm
if [ -e $(BUILD_JRE_ARCH_DIR)/jvm.cfg ] ; then \
sed -i 's#-zero KNOWN#-zero ERROR#' $(BUILD_JRE_ARCH_DIR)/jvm.cfg ; \
- sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_JRE_ARCH_DIR)/jvm.cfg ; \
fi
rm -f stamps/add-zero.stamp
@@ -2137,33 +2121,88 @@ if ADD_ZERO_BUILD
$(ADD_ZERO_EXTRA_BUILD_ENV) \
$(ARCH_PREFIX) $(MAKE) -C zerovm ICEDTEA_DEBUG_BUILD_TARGET=hotspot icedtea-stage2
-if ZERO_BUILD
- mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
- cp -a zerovm/$(BUILD_OUTPUT_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
- $(BUILD_DEBUG_JRE_ARCH_DIR)/shark/
- printf -- '-shark KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
-else
mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/zero
cp -a zerovm/$(BUILD_OUTPUT_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
$(BUILD_DEBUG_JRE_ARCH_DIR)/zero/
printf -- '-zero KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
-endif
else
printf -- '-zero ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
- printf -- '-shark ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
endif
touch $@
clean-add-zero-debug:
rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/zero
- rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
rm -rf zerovm
if [ -e $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ] ; then \
sed -i 's#-zero KNOWN#-zero ERROR#' $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ; \
- sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ; \
fi
rm -f stamps/add-zero-debug.stamp
+ADD_SHARK_CONFIGURE_ARGS = \
+ $(ADD_ZERO_CONFIGURE_ARGS) \
+ --enable-shark
+
+ADD_SHARK_EXTRA_BUILD_ENV = \
+ $(ADD_ZERO_EXTRA_BUILD_ENV)
+
+stamps/add-shark.stamp: stamps/icedtea.stamp
+ mkdir -p stamps
+if ADD_SHARK_BUILD
+ mkdir -p sharkvm
+
+ cd sharkvm && \
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(abs_top_srcdir)/configure $(ADD_SHARK_CONFIGURE_ARGS)
+
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(MAKE) -C sharkvm ICEDTEA_BUILD_TARGET=hotspot icedtea-stage2
+
+ mkdir -p $(BUILD_JRE_ARCH_DIR)/shark
+ cp -a sharkvm/$(BUILD_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
+ $(BUILD_JRE_ARCH_DIR)/shark/
+ printf -- '-shark KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+else
+ printf -- '-shark ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+endif
+ touch $@
+
+clean-add-shark:
+ rm -rf $(BUILD_JRE_ARCH_DIR)/shark
+ rm -rf sharkvm
+ if [ -e $(BUILD_JRE_ARCH_DIR)/jvm.cfg ] ; then \
+ sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_JRE_ARCH_DIR)/jvm.cfg ; \
+ fi
+ rm -f stamps/add-shark.stamp
+
+stamps/add-shark-debug.stamp: stamps/icedtea-debug.stamp
+ mkdir -p stamps
+if ADD_SHARK_BUILD
+ mkdir -p sharkvm
+
+ cd sharkvm && \
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(abs_top_srcdir)/configure $(ADD_SHARK_CONFIGURE_ARGS)
+
+ $(ADD_SHARK_EXTRA_BUILD_ENV) \
+ $(ARCH_PREFIX) $(MAKE) -C sharkvm ICEDTEA_DEBUG_BUILD_TARGET=hotspot icedtea-stage2
+
+ mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
+ cp -a sharkvm/$(BUILD_OUTPUT_DIR)/hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server/* \
+ $(BUILD_DEBUG_JRE_ARCH_DIR)/shark/
+ printf -- '-shark KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+else
+ printf -- '-shark ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+endif
+ touch $@
+
+clean-add-shark-debug:
+ rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/shark
+ rm -rf sharkvm
+ if [ -e $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ] ; then \
+ sed -i 's#-shark KNOWN#-shark ERROR#' $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg ; \
+ fi
+ rm -f stamps/add-shark-debug.stamp
+
# end additional VMs
# jtreg

View File

@@ -0,0 +1,16 @@
Author: Ralph Sennhauser <sera@gentoo.org>
The llvm libdir isn't in the default search path on Gentoo. Adding path explicitely.
diff --git a/configure.ac b/configure.ac
index e0b866b..4a10cf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -405,6 +405,7 @@ if test "x${SHARK_BUILD_TRUE}" = x || test "x${ADD_SHARK_BUILD_TRUE}" = x; then
LLVM_LDFLAGS="$LLVM_LDFLAGS$flag"
fi
done
+ LLVM_LDFLAGS="$LLVM_LDFLAGS -Wl,-rpath,$($LLVM_CONFIG --libdir)"
dnl LLVM_LIBS
LIBS_SAVED=$LIBS
LDFLAGS_SAVED=$LDFLAGS

View File

@@ -0,0 +1,38 @@
Author: Ralph Sennhauser <sera@gentoo.org>
This was fixed in openjdk6, this is a partial forward port of
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639
diff --git a/Makefile.am b/Makefile.am
index 129edf2..d77ac42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -233,7 +233,8 @@ REWRITER_SRCS = $(top_srcdir)/rewriter/com/redhat/rewriter/ClassRewriter.java
# Patch list
-ICEDTEA_PATCHES =
+ICEDTEA_PATCHES = \
+ patches/shark-llvm-flags.patch
# Conditional patches
diff --git a/patches/shark-llvm-flags.patch b/patches/shark-llvm-flags.patch
new file mode 100644
index 0000000..3efcf7e
--- /dev/null
+++ b/patches/shark-llvm-flags.patch
@@ -0,0 +1,13 @@
+--- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2011-02-22 16:51:24.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/launcher.make 2011-02-24 03:01:36.000000000 +0000
+@@ -52,6 +52,10 @@
+ LAUNCHER.o = launcher.o
+ LFLAGS_LAUNCHER += -L `pwd`
+ LIBS_LAUNCHER += -l$(JVM) $(LIBS)
++ ifeq ($(SHARK_BUILD), true)
++ LFLAGS_LAUNCHER += $(LLVM_LDFLAGS)
++ LIBS_LAUNCHER += $(LLVM_LIBS)
++ endif
+ endif
+
+ LINK_LAUNCHER = $(LINK.c)

View File

@@ -0,0 +1,18 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/files/icedtea.env,v 1.3 2011/11/28 15:29:59 sera Exp $
VERSION="IcedTea JDK @PV@"
JAVA_HOME="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/icedtea@SLOT@"
JDK_HOME="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/icedtea@SLOT@"
JAVAC="${JAVA_HOME}/bin/javac"
PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
LDPATH="${JAVA_HOME}/jre/lib/@PLATFORM@/:${JAVA_HOME}/jre/lib/@PLATFORM@/native_threads/:${JAVA_HOME}/jre/lib/@PLATFORM@/xawt/:${JAVA_HOME}/jre/lib/@PLATFORM@/server/"
MANPATH="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/icedtea@SLOT@/man"
PROVIDES_TYPE="JDK JRE"
PROVIDES_VERSION="1.@SLOT@"
# Taken from sun.boot.class.path property
BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/jsse.jar:${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar"
GENERATION="2"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"