target-utils.exp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright (C) 2014-2015 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. #
  16. # ${tool}_check_unsupported_p -- Check the compiler(/assembler/linker) output
  17. # for text indicating that the testcase should be marked as "unsupported"
  18. #
  19. # When dealing with a large number of tests, it's difficult to weed out the
  20. # ones that are too big for a particular cpu (eg: 16 bit with a small amount
  21. # of memory). There are various ways to deal with this. Here's one.
  22. # Fortunately, all of the cases where this is likely to happen will be using
  23. # gld so we can tell what the error text will look like.
  24. #
  25. load_lib target-supports.exp
  26. proc ${tool}_check_unsupported_p { output } {
  27. if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
  28. return "memory full"
  29. }
  30. if { [regexp "(^|\n)\[^\n\]*: relocation truncated to fit" $output]
  31. && [check_effective_target_tiny] } {
  32. return "memory full"
  33. }
  34. if { [istarget spu-*-*] && \
  35. [string match "*exceeds local store*" $output] } {
  36. return "memory full"
  37. }
  38. return ""
  39. }