libgo.exp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright (C) 2010 Free Software Foundation, Inc.
  2. # This program is free software; you can redistribute it and/or modify
  3. # it under the terms of the GNU General Public License as published by
  4. # the Free Software Foundation; either version 3 of the License, or
  5. # (at your option) any later version.
  6. #
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. #
  12. # You should have received a copy of the GNU General Public License
  13. # along with GCC; see the file COPYING3. If not see
  14. # <http://www.gnu.org/licenses/>.
  15. set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
  16. if {$gccdir != ""} {
  17. set gccdir [file dirname $gccdir]
  18. }
  19. set GOC_UNDER_TEST "$gccdir/gccgo -B$gccdir/"
  20. set TESTING_IN_BUILD_TREE 1
  21. if [info exists GOTEST_TMPDIR] {
  22. set tmpdir $GOTEST_TMPDIR
  23. }
  24. proc go_maybe_build_wrapper { args } {
  25. libgo_maybe_build_wrapper $args
  26. }
  27. # DejaGnu does not have proper library search paths for load_lib.
  28. # We have to explicitly load everything that go.exp wants to load.
  29. proc load_gcc_lib { filename } {
  30. global srcdir loaded_libs
  31. load_file $srcdir/../../gcc/testsuite/lib/$filename
  32. set loaded_libs($filename) ""
  33. }
  34. load_gcc_lib prune.exp
  35. load_gcc_lib target-libpath.exp
  36. load_gcc_lib wrapper.exp
  37. load_gcc_lib target-supports.exp
  38. load_gcc_lib target-utils.exp
  39. load_gcc_lib gcc-defs.exp
  40. load_gcc_lib timeout.exp
  41. load_gcc_lib go.exp
  42. proc libgo_init { args } {
  43. go_init $args
  44. }