1 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
3 proc load_gcc_lib { filename } {
5 load_file $srcdir/../../gcc/testsuite/lib/$filename
9 load_gcc_lib target-libpath.exp
11 # GCJ_UNDER_TEST is the compiler under test.
15 if ![info exists tmpdir] {
19 # This is like `prune_warnings', but it also prunes away a warning
20 # from the bytecode front end that we don't care about.
21 proc libjava_prune_warnings {text} {
22 set text [prune_warnings $text]
23 set tlist [split $text \n]
24 set len [llength $tlist]
25 for {set i [expr {$len - 1}]} {$i >= 2} {incr i -1} {
26 if {[string match "*unreachable bytecode*" [lindex $tlist $i]]} {
27 # Delete this line, all other unreachable warnings and the previous
28 # two lines containing the method and class.
30 while {[string match "*unreachable bytecode*" [lindex $tlist $j]]} {
34 set tlist [lreplace $tlist $j $i]
38 return [join $tlist \n]
41 # This is like `target_compile' but it does some surgery to work
42 # around stupid DejaGNU bugs. In particular DejaGNU has very poor
43 # quoting, so for instance a `$' will be re-evaluated at spawn time.
45 proc libjava_tcompile {source destfile type options} {
46 # This strange-looking expression really does quote the `$'.
47 regsub -all -- {\$} $source {\$} source
48 regsub -all -- {\$} $destfile {\$} destfile
49 return [target_compile $source $destfile $type $options]
52 # Read an `xfail' file if it exists. Returns a list of xfail tokens.
53 proc libjava_read_xfail {file} {
54 if {! [file exists $file]} {
58 set tokens [string trim [read $fd]]
63 # Find a particular executable. FIXME: this relies on DejaGnu
64 # internals. These should probably be exposed in a better way.
65 proc libjava_find_program {prog} {
68 set file [lookfor_file $tool_root_dir $prog]
70 set file [lookfor_file $tool_root_dir gcc/$prog];
80 return [libjava_find_program jv-scan]
85 return [libjava_find_program gcjh]
89 global SUN_JAVAC GCJ_UNDER_TEST env libgcj_jar
90 # If JDK doesn't run on your platform but some other
91 # JDK-compatible javac does, you may set SUN_JAVAC to point to it.
92 # One of the most important properties of a SUN_JAVAC is that it
93 # must create class-files even for classes that have not been
94 # specified in the command line, but that were needed to compile
95 # those that have. For example, Pizza won't do it, but you can
96 # use `kaffe sun.tools.javac.Main', if you have Sun's classes.zip
97 # in the kaffe's default search path.
98 if {![info exists SUN_JAVAC]} {
99 if {[info exists env(SUN_JAVAC)]} {
100 set SUN_JAVAC $env(SUN_JAVAC)
102 set SUN_JAVAC "$GCJ_UNDER_TEST -C -I$libgcj_jar"
108 proc bytecompile_file { file objdir {classpath {}} } {
110 set dirname [file dirname $file]
112 set javac [find_javac]
113 if {$classpath != ""} then {
114 set env(CLASSPATH) $classpath
118 send_log "byte compile: $javac -g [list $file] -d $objdir 2>@ stdout\n"
120 set q [eval exec "$javac -g [list $file] -d $objdir 2>@ stdout"]
122 send_log "couldn't compile $file: $msg\n"
131 set libjava_initialized 0
134 # Build the status wrapper library as needed.
136 proc libjava_init { args } {
138 global wrap_compile_flags;
139 global libjava_initialized libjava_uses_threads
140 global GCJ_UNDER_TEST
141 global TOOL_EXECUTABLE
143 global env libgcj_jar
145 global libjava_libgcc_s_path
146 global target_triplet
148 # We set LC_ALL and LANG to C so that we get the same error messages as expected.
152 if { $libjava_initialized == 1 } { return; }
154 if ![info exists GCJ_UNDER_TEST] {
155 if [info exists TOOL_EXECUTABLE] {
156 set GCJ_UNDER_TEST $TOOL_EXECUTABLE;
158 if [info exists env(GCJ)] {
159 set GCJ_UNDER_TEST $env(GCJ)
161 set GCJ_UNDER_TEST "[find_gcj]"
166 # Find the libgcj jar file.
167 set libgcj_jar [glob $objdir/../libgcj-*.jar]
168 verbose "jar file is $libgcj_jar"
170 # FIXME: This finds libgcj.spec for the default multilib.
171 # If thread models differ between multilibs, this has to be moved
172 # to libjava_arguments
173 set specdir [libjava_find_spec]
175 # The -B is so we find libgcj.spec.
176 set text [eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout"]
177 regexp -- "Thread model: (\[^\n\]+)\n" $text ignore model
178 set libjava_uses_threads [expr {! ($model == "no"
180 || $model == "single")}]
182 # Always set encoding used by gcj.
183 append GCJ_UNDER_TEST " --encoding=UTF-8"
186 set wrap_compile_flags "";
187 if [target_info exists needs_status_wrapper] {
188 set result [build_wrapper "testglue.o"];
189 if { $result != "" } {
190 set wrapper_file [lindex $result 0];
191 set wrap_compile_flags [lindex $result 1];
193 warning "Status wrapper failed to build."
197 # Finally, add the gcc build directory so that we can find the
198 # shared libgcc. This, like much of dejagnu, is hideous.
199 set libjava_libgcc_s_path {}
201 if { [string match "powerpc-*-darwin*" $target_triplet] } {
202 set so_extension "dylib"
204 set so_extension "so"
206 set gccdir [lookfor_file $tool_root_dir gcc/libgcc_s.${so_extension}]
208 set gccdir [file dirname $gccdir]
209 lappend libjava_libgcc_s_path $gccdir
210 verbose "libjava_libgcc_s_path = $libjava_libgcc_s_path"
211 set compiler ${gccdir}/xgcc
212 if { [is_remote host] == 0 && [which $compiler] != 0 } {
213 foreach i "[exec $compiler --print-multi-lib]" {
215 regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
216 set mldir [string trimright $mldir "\;@"]
217 if { "$mldir" == "." } {
220 if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.${so_extension}.*]] >= 1 } {
221 lappend libjava_libgcc_s_path "${gccdir}/${mldir}"
227 set libjava_initialized 1
230 # Find a library. We know where libtool puts the actual libraries,
231 # and we look there. The implementation is fairly hacky. We can't
232 # compile with -nodefaultlibs, because that will also eliminate the
233 # system libraries we need. In order to have gcj still work, it must
234 # find the appropriate libraries so we must add -L options for their
235 # paths. However we can't simply use those libraries; we still need
236 # libtool for linking.
237 # Don't return the the lib${name}.la files here, since this causes the
238 # libraries to be linked twice: once as lib${name}.so/dylib and another time
239 # via gcj's implicit -l${name}. This is both unnecessary and causes the
240 # Solaris ld to warn: attempted multiple inclusion of file. This warning
241 # is not ignored by the dejagnu framework and cannot be disabled.
242 proc libjava_find_lib {dir name} {
244 set gp [get_multilibs]
245 foreach extension {so dll a} {
246 foreach sub {.libs _libs} {
248 if {[file exists $gp/$dir/$sub/lib${name}.${extension}]} then {
249 # Just return the `-L' option. The library itself
250 # will be picked up via the spec file.
251 return "-L$gp/$dir/$sub"
254 # Just return the `-L' option. The library itself will be
255 # picked up via the spec file.
257 $base_dir/../../$dir/$sub/lib${name}.${extension} \
258 "-L$base_dir/../../$dir/$sub" \
268 # Find libgcj.spec. We need to use the file corresponding to the multilib
269 # under test since they might differ. Append a trailing slash since this
271 proc libjava_find_spec {} {
276 # Find `gij'. Return empty string if not found.
277 proc libjava_find_gij {} {
278 global base_dir objdir
280 if {! [file exists $objdir/../gij]} {
283 return $objdir/../gij
286 # Remove a bunch of files.
287 proc gcj_cleanup {args} {
289 if {[string match *.o $file]} {
290 verbose "removing [file rootname $file].lo"
291 file delete -force [file rootname $file].lo
293 file delete -force -- $file
294 verbose "removing $file"
296 # It is simplest to do this instead of trying to figure out what
297 # bits in .libs ought to be removed.
298 catch {system "rm -rf .libs"}
301 # Compute arguments needed for compiler. MODE is a libtool mode:
302 # either compile or link.
303 proc libjava_arguments {{mode compile}} {
306 global srcdir subdir objdir
308 global GCJ_UNDER_TEST
314 global libjava_libgcc_s_path
315 global libjava_ld_library_path
316 global ld_library_path
317 global target_triplet
319 if [info exists LIBJAVA] {
320 set libjava $LIBJAVA;
322 set libjava [libjava_find_lib libjava gcj]
325 verbose "using LIBJAVA = $libjava" 2
328 # Basically we want to build up a colon separated path list from
329 # the value of $libjava.
332 foreach dir [list $libjava] {
333 foreach item [split $dir " "] {
334 switch -glob -- $item {
336 lappend lpath [string range $item 2 end]
342 set lpath [concat $lpath $libjava_libgcc_s_path]
343 verbose "lpath = $lpath ; libgcc_s_path = $libjava_libgcc_s_path"
344 set ld_library_path [join $lpath :]
345 set libjava_ld_library_path "$ld_library_path"
347 # That's enough to make things work for the normal case.
348 # If we wanted to handle an arbitrary value of libjava,
349 # then we'd have to do a lot more work.
351 set_ld_library_path_env_vars
352 if [info exists env(LD_LIBRARY_PATH)] {
353 verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
356 # Determine CLASSPATH separator
357 if { [string match "i?86-pc-mingw32*" $target_triplet] } {
363 # Set the CLASSPATH environment variable
366 [join [list . $srcdir/$subdir $objdir $libgcj_jar] $sep]
367 verbose "CLASSPATH is $env(CLASSPATH)"
369 if {$mode == "link"} {
370 global wrapper_file wrap_compile_flags
371 lappend args "additional_flags=$wrap_compile_flags"
372 lappend args "libs=$wrapper_file"
373 lappend args "libs=$libjava"
377 if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
378 lappend args "libs=${gluefile}"
379 lappend args "ldflags=$wrap_flags"
382 if [info exists TOOL_OPTIONS] {
383 lappend args "additional_flags=$TOOL_OPTIONS"
386 # Determine libgcj.spec corresponding to multilib under test.
387 set specdir [libjava_find_spec]
389 # Search for libtool. We need it to link.
391 set d [absolute $objdir]
392 foreach x {. .. ../.. ../../..} {
393 if {[file exists $d/$x/libtool]} then {
394 # We have to run silently to avoid DejaGNU lossage.
396 "compiler=$d/$x/libtool --silent --tag=GCJ --mode=$mode $GCJ_UNDER_TEST -B$specdir"
401 if {! $found_compiler} {
402 # Append -B$specdir so that we find libgcj.spec before it
404 lappend args "compiler=$GCJ_UNDER_TEST -B$specdir"
407 # Avoid libtool wrapper scripts when possible.
408 # but not if libtool warnings results in FAILs
409 if {$mode == "link"} {
410 if {! [istarget "*-*-cygwin*"] && ! [istarget "*-*-mingw*"] } {
411 lappend args "additional_flags=-no-install"
413 if { [istarget "*-*-darwin*"] } {
414 lappend args "additional_flags=-bind_at_load"
415 lappend args "additional_flags=-multiply_defined suppress"
422 # Link a bunch of objects into a program. MAIN is the name of the
423 # class holding `main'. Return 0 on failure.
424 proc gcj_link {program main files {options {}}} {
425 set arguments [libjava_arguments link]
426 if {[llength $options]} {
427 eval lappend arguments $options
429 lappend arguments "additional_flags=--main=$main"
430 set x [libjava_prune_warnings \
431 [libjava_tcompile $files $program executable $arguments]]
433 verbose "link failure: $x" 2
434 fail "linking $program"
436 fail "running $program"
440 pass "linking $program"
444 # Invoke the program and see what happens. Return 0 on failure.
445 proc gcj_invoke {program expectFile ld_library_additions} {
447 global libjava_ld_library_path
448 global ld_library_path
450 set ld_library_path "$libjava_ld_library_path"
451 if {[llength $ld_library_additions] > 0} {
452 append ld_library_path :[join $ld_library_additions :]
455 set_ld_library_path_env_vars
456 if [info exists env(LD_LIBRARY_PATH)] {
457 verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)"
460 set result [libjava_load ./$program]
461 set status [lindex $result 0]
462 set output [lindex $result 1]
465 restore_ld_library_path_env_vars
467 if {$status != "pass"} {
468 verbose "got $output"
470 untested "$program output"
474 set id [open $expectFile r]
475 set expected [read $id]
478 if {! [string compare $output $expected]} {
479 pass "$program output"
482 fail "$program output"
487 # Invoke a program and check its output. EXECUTABLE is the program;
488 # ARGS are the arguments to the program. Returns 1 if tests passed
489 # (or things were left untested), 0 otherwise.
490 proc libjava_invoke {errname testName optName executable inpfile resultfile
491 ld_library_additions args} {
493 global libjava_ld_library_path
494 global ld_library_path
496 set ld_library_path "$libjava_ld_library_path"
497 if {[llength $ld_library_additions] > 0} {
498 append ld_library_path :[join $ld_library_additions :]
501 set_ld_library_path_env_vars
502 if [info exists env(LD_LIBRARY_PATH)] {
503 verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)"
508 if {[info exists opts(no-exec)]} {
509 if {[info exists opts(need-threads)]} {
510 # This means we wanted to try to run it but we couldn't
511 # because threads aren't supported. So we have to
512 # generate an `untested'.
513 untested "$errname execution - $testName"
514 untested "$errname output - $testName"
519 set result [libjava_load $executable $args "$inpfile"]
520 set status [lindex $result 0]
521 set output [lindex $result 1]
523 # Restore LD_LIBRARY_PATH setting.
524 restore_ld_library_path_env_vars
526 if {[info exists opts(xfail-exec)]} then {
529 $status "$errname execution - $testName"
530 if { $status != "pass" } {
531 untested "$errname output - $testName"
535 verbose "resultfile is $resultfile"
536 set id [open $resultfile r]
538 append expected [read $id]
539 regsub -all "\r" "$output" "" output
540 regsub "\n*$" $expected "" expected
541 regsub "\n*$" $output "" output
542 regsub "^\n*" $expected "" expected
543 regsub "^\n*" $output "" output
544 regsub -all "\[ \t\]\[ \t\]*" $expected " " expected
545 regsub -all "\[ \t\]*\n\n*" $expected "\n" expected
546 regsub -all "\[ \t\]\[ \t\]*" $output " " output
547 regsub -all "\[ \t\]*\n\n*" $output "\n" output
548 verbose "expected is $expected"
549 verbose "actual is $output"
551 if {[info exists opts(regexp_match)]} {
552 if [regexp $expected $output] {
556 if { $expected == $output } {
560 if {[info exists opts(xfail-output)]} {
563 if { $passed == 1 } {
564 pass "$errname output - $testName"
566 fail "$errname output - $testName"
574 # Run the test specified by srcfile and resultfile. compile_args and
575 # exec_args are options telling this proc how to work.
577 proc test_libjava_from_source { options srcfile compile_args inpfile resultfile exec_args } {
579 global srcdir subdir objdir
581 global GCJ_UNDER_TEST
585 # Make opts into an array.
588 foreach item $exec_args {
592 # If we need threads and we don't have them then set the `no-exec'
593 # flag. This is case is also handled specially later.
594 if {[info exists opts(need-threads)]} {
595 global libjava_uses_threads
596 if {! $libjava_uses_threads} {
601 set errname [file rootname [file tail $srcfile]]
602 if {! [runtest_file_p $runtests $errname]} {
606 if {[info exists opts(no-link)]} {
611 set args [libjava_arguments $mode]
612 if {! [info exists opts(no-link)]} {
613 # Add the --main flag
614 lappend args "additional_flags=--main=[file rootname [file tail $srcfile]]"
615 if { $compile_args != "" } {
616 lappend args "additional_flags=$compile_args"
620 regsub "^.*/(\[^/.\]+)\[.\]\[^/]*$" "$srcfile" "\\1" out
621 set executable "${objdir}/$out"
622 if {[info exists opts(no-link)]} {
623 append executable ".o"
626 # DOS/win32 targets default to .exe if no suffix is given
627 # We then try to delete a file that doesn't exist. It is
628 # simpler to add the suffix everywhere.
629 append executable ".exe"
630 set target executable
632 if { $compile_args != "" } {
633 set errname "$errname $compile_args"
636 set removeList [list $executable]
638 set x [libjava_prune_warnings \
639 [libjava_tcompile $srcfile "$executable" $target $args]]
640 if {[info exists opts(xfail-gcj)]} {
644 verbose "target_compile failed: $x" 2
646 if {[info exists opts(shouldfail)]} {
647 pass "$errname compilation from source"
648 eval gcj_cleanup $removeList
652 fail "$errname compilation from source"
653 if {[info exists opts(xfail-gcj)]
654 || ! [info exists opts(no-exec)]
655 || [info exists opts(need-threads)]} {
656 untested "$errname execution from source compiled test"
657 untested "$errname output from source compiled test"
661 if {[info exists opts(shouldfail)]} {
662 fail "$errname compilation from source"
665 pass "$errname compilation from source"
667 # Set up the options the way they are expected by libjava_invoke.
668 if {[info exists opts(xfail-source-output)]} {
669 set opts(xfail-output) x
671 if {[libjava_invoke $errname "source compiled test" opts $executable \
672 $inpfile $resultfile ""]} {
673 # Everything ok, so clean up.
674 eval gcj_cleanup $removeList
679 # Run the test specified by srcfile and resultfile. compile_args and
680 # exec_args are options telling this proc how to work.
682 proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile exec_args } {
684 global srcdir subdir objdir
686 global GCJ_UNDER_TEST
691 # Make opts into an array.
694 foreach item $exec_args {
698 # If we need threads and we don't have them then set the `no-exec'
699 # flag. This is case is also handled specially later.
700 if {[info exists opts(need-threads)]} {
701 global libjava_uses_threads
702 if {! $libjava_uses_threads} {
706 set errname [file rootname [file tail $srcfile]]
707 if {! [runtest_file_p $runtests $errname]} {
711 # bytecompile files with Sun's compiler for now.
712 set bc_ok [bytecompile_file $srcfile $objdir]
714 set javac [find_javac]
715 # This is an ugly heuristic but it will have to do.
716 if {[string match *gcj* $javac]} {
721 if {[info exists opts(xfail-$tag)]} {
725 if {[info exists opts(shouldfail)]} {
726 pass "$errname byte compilation"
729 fail "$errname byte compilation"
730 untested "$errname compilation from bytecode"
731 if {! [info exists opts(no-exec)]
732 || [info exists opts(need-threads)]} {
733 untested "$errname execution from bytecode->native test"
734 untested "$errname output from bytecode->native test"
738 if {[info exists opts(shouldfail)]} {
739 fail "$errname byte compilation"
742 pass "$errname byte compilation"
746 # Find name to use for --main, and name of all class files.
747 set jvscan [find_jvscan]
748 verbose "jvscan is $jvscan"
749 set main_name [string trim \
750 [libjava_prune_warnings \
751 [lindex [local_exec "$jvscan --encoding=UTF-8 $srcfile --print-main" "" "" 300] 1]]]
752 verbose "main name is $main_name"
753 set class_out [string trim \
754 [libjava_prune_warnings \
755 [lindex [local_exec "$jvscan --encoding=UTF-8 $srcfile --list-class" "" "" 300] 1]]]
756 verbose "class list is $class_out"
758 if {[string match "*parse error*" $main_name]
759 || [string match "*parse error*" $class_out]} {
760 untested "$errname compilation from bytecode"
761 if {! [info exists opts(no-exec)]
762 || [info exists opts(need-threads)]} {
763 untested "$errname execution from bytecode->native test"
764 untested "$errname output from bytecode->native test"
769 # Turn "a b" into "a.class b.class".
770 # Also, turn "foo.bar" into "foo/bar.class".
772 foreach file [split [string trim $class_out]] {
773 set file [join [split $file .] /]
774 lappend class_files $objdir/$file.class
777 eval lappend removeList $class_files
779 # Usually it is an error for a test program not to have a `main'
780 # method. However, for no-exec tests it is ok. Treat no-link
782 if {[info exists opts(no-link)]} {
787 if {[info exists opts(no-exec)]} {
790 } elseif {$main_name == ""} {
791 perror "No `main' given in program $errname"
795 lappend largs "additional_flags=--main=$main_name"
796 # DOS/win32 targets default to .exe if no suffix is given
797 # We then try to delete a file that doesn't exist. It is
798 # simpler to add the suffix everywhere.
799 set executable "${objdir}/${main_name}.exe"
803 # We purposely ignore errors here; we still want to run the other
805 set gij [libjava_find_gij]
806 # libjava_find_gij will return "" if it couldn't find the
807 # program; in this case we want to skip the test.
808 if {$INTERPRETER == "yes" && $gij != ""} {
809 libjava_invoke $errname "gij test" opts $gij \
810 $inpfile $resultfile "" $main_name
814 set args [libjava_arguments $mode]
815 eval lappend args $largs
817 if { $compile_args != "" } {
818 lappend args "additional_flags=$compile_args"
821 if { $compile_args != "" } {
822 set errname "$errname $compile_args"
825 verbose "compilation command = $args" 2
826 # When compiling and not linking, we have to build each .o
827 # separately. We do this because DejaGNU's target_compile won't
828 # accept an empty "destfile" argument when the mode is "compile".
829 if {$mode == "compile"} {
830 foreach c_file $class_files {
831 set executable [file rootname [file tail $c_file]].o
832 # Don't write files which contain $ chars.
833 regsub -all "\\$" $executable "\^" executable
834 set x [libjava_prune_warnings \
835 [libjava_tcompile '$c_file' "$executable" $type $args]]
836 lappend removeList $executable
842 # This is so evil: we de-listify CLASS_FILES so that we can
843 # turn around and quote the `$' in it for the shell. I really
844 # hate DejaGNU. It is so !@#$!@# unpredictable.
846 foreach stupid $class_files {
847 set hack "$hack $stupid"
849 lappend removeList $executable
850 set x [libjava_prune_warnings \
851 [libjava_tcompile $hack "$executable" $type $args]]
853 if {[info exists opts(xfail-byte)]} {
857 verbose "target_compile failed: $x" 2
858 fail "$errname compilation from bytecode"
859 if {! [info exists opts(no-exec)]
860 || [info exists opts(need-threads)]} {
861 untested "$errname execution from bytecode->native test"
862 untested "$errname output from bytecode->native test"
866 pass "$errname compilation from bytecode"
868 # Set up the options the way they are expected by libjava_invoke.
869 if {[info exists opts(xfail-byte-output)]} {
870 set opts(xfail-output) x
872 if {[libjava_invoke $errname "bytecode->native test" opts $executable \
873 $inpfile $resultfile ""]} {
874 # Everything ok, so clean up.
875 eval gcj_cleanup $removeList
880 # Run the test specified by srcfile and resultfile. compile_args and
881 # exec_args are options telling this proc how to work.
882 # `no-link' don't try to link the program
883 # `no-exec' don't try to run the test
884 # `xfail-gcj' compilation from source will fail
885 # `xfail-javac' compilation with javac will fail
886 # `xfail-gcjC' compilation with gcj -C will fail
887 # `shouldfail' compilation from source is supposed to fail
888 # This is different from xfail, which marks a known
889 # failure that we just haven't fixed.
890 # A compilation marked this way should fail with any
892 # `xfail-byte' compilation from bytecode will fail
893 # `xfail-exec' exec will fail
895 # output will be wrong
896 # `xfail-byte-output'
897 # output will be wrong when compiled from bytecode
898 # `xfail-source-output'
899 # output will be wrong when compiled from source code
901 # test relies on thread support
903 proc test_libjava { options srcfile compile_args inpfile resultfile exec_args } {
904 test_libjava_from_source $options $srcfile $compile_args $inpfile $resultfile $exec_args
905 test_libjava_from_javac $options $srcfile $compile_args $inpfile $resultfile $exec_args
909 # libjava_version -- extract and print the version number of libjavap
911 proc default_libjava_version {} {
914 proc default_libjava_start { } {