aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.jni/jni.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-12-14 21:56:29 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-12-14 21:56:29 +0000
commit1808372b58b95d18ce62168ddf78c0ffbbcc6d6e (patch)
tree5a220d504853a608283a932d2ac9a64d8df7490e /libjava/testsuite/libjava.jni/jni.exp
parent27b2c32e31da807ee1c01e371447db238c7ad02c (diff)
downloadgcc-1808372b58b95d18ce62168ddf78c0ffbbcc6d6e.zip
gcc-1808372b58b95d18ce62168ddf78c0ffbbcc6d6e.tar.gz
gcc-1808372b58b95d18ce62168ddf78c0ffbbcc6d6e.tar.bz2
For PR libgcj/5103:
* libjava.jni/cxxtest.out: New file. * libjava.jni/cxxtest.cc: New file. * libjava.jni/cxxtest.java: New file. * libjava.jni/jni.exp (gcj_jni_test_one): If there is no .c file, assume there is a .cc file. From-SVN: r48012
Diffstat (limited to 'libjava/testsuite/libjava.jni/jni.exp')
-rw-r--r--libjava/testsuite/libjava.jni/jni.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp
index 583462b..ec59945 100644
--- a/libjava/testsuite/libjava.jni/jni.exp
+++ b/libjava/testsuite/libjava.jni/jni.exp
@@ -106,6 +106,13 @@ proc gcj_jni_test_one {file} {
}
set cfile [file rootname $file].c
+ set cxxflags ""
+ # If there is no `.c' file, assume there is a `.cc' file.
+ if {! [file exists $cfile]} {
+ set cfile [file rootname $file].cc
+ set cxxflags "-lstdc++"
+ }
+
if {! [gcj_jni_compile_c_to_so $cfile]} {
# FIXME
return 0
@@ -113,7 +120,7 @@ proc gcj_jni_test_one {file} {
# We use -l$main because the .so is named the same as the main
# program.
- set args [list "additional_flags=-fjni -L. -l$main"]
+ set args [list "additional_flags=-fjni -L. -l$main $cxxflags"]
if {! [gcj_link $main $main $file $args]} {
# FIXME
return 0