This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Compile libjava.jvmti C++ code with -pthread on Tru64 UNIX
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: java-patches at gcc dot gnu dot org
- Date: Mon, 08 Nov 2010 18:29:12 +0100
- Subject: Compile libjava.jvmti C++ code with -pthread on Tru64 UNIX
[Please keep me on the Cc: since I'm not subscribed to java-patches. Thanks.]
The libjava.jvmti tests currently fail to compile on Tru64 UNIX:
FAIL: natevents.cc compilation
FAIL: natgetallthreads.cc compilation
FAIL: natgeterrorname.cc compilation
FAIL: natgetmethodname.cc compilation
The problem can be seen here:
In file included from /var/gcc/regression/trunk/5.1b-gcc/build/alpha-dec-osf5.1b/libjava/testsuite/../include/java-threads.h:20:0,
from /vol/gcc/src/hg/trunk/local/libjava/testsuite/../include/jvm.h:23,
from /vol/gcc/src/hg/trunk/local/libjava/testsuite/libjava.jvmti/natevents.cc:3:
/var/gcc/regression/trunk/5.1b-gcc/build/gcc/include-fixed/pthread.h:1427:4: error: #error "Please compile the module including pthread.h with -pthread"
<pthread.h> needs to be compiled with -pthread. This is exactly what
this patch does. It fixes all failures from jvmti.exp and
jvmti-interp.exp. Ok for mainline?
Rainer
2010-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libjava:
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o):
Add -pthread on alpha*-dec-osf*.
* testsuite/libjava.jvmti/jvmti-interp.exp
(gcj_jni_compile_c_to_so): Likewise.
diff -r a14f4b299bd2 libjava/testsuite/libjava.jvmti/jvmti-interp.exp
--- a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp Sun Nov 07 13:33:00 2010 +0100
+++ b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp Sun Nov 07 13:34:38 2010 +0100
@@ -37,6 +37,10 @@
if { [istarget "arm*"] } {
lappend options "additional_flags=-Wno-abi"
}
+ # Tru64 UNIX requires <pthread.h> to be compiled with -pthread.
+ if { [istarget "alpha*-dec-osf*"] } {
+ lappend options "additional_flags=-pthread"
+ }
set filename [file tail $file]
set name [file rootname $filename]
diff -r a14f4b299bd2 libjava/testsuite/libjava.jvmti/jvmti.exp
--- a/libjava/testsuite/libjava.jvmti/jvmti.exp Sun Nov 07 13:33:00 2010 +0100
+++ b/libjava/testsuite/libjava.jvmti/jvmti.exp Sun Nov 07 13:34:38 2010 +0100
@@ -20,6 +20,10 @@
if { [istarget "arm*"] } {
lappend options "additional_flags=-Wno-abi"
}
+ # Tru64 UNIX requires <pthread.h> to be compiled with -pthread.
+ if { [istarget "alpha*-dec-osf*"] } {
+ lappend options "additional_flags=-pthread"
+ }
set x [libjava_prune_warnings \
[target_compile $file $oname object $options]]
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University