http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51498
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-15 12:41:49 UTC --- Do you have a new enough version of dejagnu? There is no need for any of these variables. libjava.exp has: if ![info exists GCJ_UNDER_TEST] { if [info exists TOOL_EXECUTABLE] { set GCJ_UNDER_TEST $TOOL_EXECUTABLE; } else { if [info exists env(GCJ)] { set GCJ_UNDER_TEST $env(GCJ) } else { set GCJ_UNDER_TEST "[find_gcj]" } } } and my dejagnu does (in /usr/share/dejagnu/libgloss.exp): proc find_gcj {} { global tool_root_dir if {![is_remote host]} { set file [lookfor_file $tool_root_dir gcj] if { $file == "" } { set file [lookfor_file $tool_root_dir gcc/gcj] } if { $file != "" } { set CC "$file -B[file dirname $file]/" } else { set CC [transform gcj] } } else { set CC [transform gcj] } return $CC } so it should figure that out automatically. Aren't you e.g. building in source directory (./configure ...)? Otherwise it would be good if you could debug why in your case it isn't finding the right tool_root_dir and gcj in it (debugging printouts in libjava.exp and libgloss.exp).