0009-libvtv-test-fix.diff 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am
  2. index 561b7e2..2548a1b 100644
  3. --- a/libvtv/testsuite/Makefile.am
  4. +++ b/libvtv/testsuite/Makefile.am
  5. @@ -11,3 +11,9 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
  6. _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  7. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  8. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  9. +
  10. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  11. +
  12. +extra.exp:
  13. + echo 'set BUILD_CC "$(CC)"' > [email protected]
  14. + mv [email protected] $@
  15. diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in
  16. index e19e13e..6528f38 100644
  17. --- a/libvtv/testsuite/Makefile.in
  18. +++ b/libvtv/testsuite/Makefile.in
  19. @@ -227,6 +227,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  20. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  21. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  22. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  23. all: all-am
  24. .SUFFIXES:
  25. @@ -433,6 +434,10 @@ uninstall-am:
  26. uninstall uninstall-am
  27. +extra.exp:
  28. + echo 'set BUILD_CC "$(CC)"' > [email protected]
  29. + mv [email protected] $@
  30. +
  31. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  32. # Otherwise a system limit (for SysV at least) may be exceeded.
  33. .NOEXPORT:
  34. diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp
  35. index edf5fdd..a596091 100644
  36. --- a/libvtv/testsuite/lib/libvtv.exp
  37. +++ b/libvtv/testsuite/lib/libvtv.exp
  38. @@ -74,6 +74,7 @@ proc libvtv_init { args } {
  39. global ALWAYS_CFLAGS
  40. global CFLAGS
  41. global TOOL_EXECUTABLE TOOL_OPTIONS
  42. + global BUILD_CC
  43. global GCC_UNDER_TEST
  44. global TESTING_IN_BUILD_TREE
  45. global target_triplet
  46. @@ -89,6 +90,8 @@ proc libvtv_init { args } {
  47. if ![info exists GCC_UNDER_TEST] then {
  48. if [info exists TOOL_EXECUTABLE] {
  49. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  50. + } elseif [info exists BUILD_CC] {
  51. + set GCC_UNDER_TEST $BUILD_CC
  52. } else {
  53. set GCC_UNDER_TEST "[find_gcc]"
  54. }