0006-libvtv-test-fix.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From 7f2a2adba4f14eb144671b632fefa49af179e5d5 Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Sun, 6 Nov 2016 03:16:23 +0000
  4. Subject: [PATCH 06/12] libvtv test fix
  5. ---
  6. libvtv/testsuite/Makefile.am | 6 ++++++
  7. libvtv/testsuite/Makefile.in | 5 +++++
  8. libvtv/testsuite/lib/libvtv.exp | 3 +++
  9. 3 files changed, 14 insertions(+)
  10. diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am
  11. index a9a0144185a..a19101aac54 100644
  12. --- a/libvtv/testsuite/Makefile.am
  13. +++ b/libvtv/testsuite/Makefile.am
  14. @@ -11,3 +11,9 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
  15. _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  16. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  17. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  18. +
  19. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  20. +
  21. +extra.exp:
  22. + echo 'set BUILD_CC "$(CC)"' > $@.tmp
  23. + mv $@.tmp $@
  24. diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in
  25. index f6314708e9f..cd281ac1ff7 100644
  26. --- a/libvtv/testsuite/Makefile.in
  27. +++ b/libvtv/testsuite/Makefile.in
  28. @@ -229,6 +229,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  29. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  30. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  31. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  32. all: all-am
  33. .SUFFIXES:
  34. @@ -435,6 +436,10 @@ uninstall-am:
  35. uninstall uninstall-am
  36. +extra.exp:
  37. + echo 'set BUILD_CC "$(CC)"' > $@.tmp
  38. + mv $@.tmp $@
  39. +
  40. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  41. # Otherwise a system limit (for SysV at least) may be exceeded.
  42. .NOEXPORT:
  43. diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp
  44. index edf5fddbad2..a596091573b 100644
  45. --- a/libvtv/testsuite/lib/libvtv.exp
  46. +++ b/libvtv/testsuite/lib/libvtv.exp
  47. @@ -74,6 +74,7 @@ proc libvtv_init { args } {
  48. global ALWAYS_CFLAGS
  49. global CFLAGS
  50. global TOOL_EXECUTABLE TOOL_OPTIONS
  51. + global BUILD_CC
  52. global GCC_UNDER_TEST
  53. global TESTING_IN_BUILD_TREE
  54. global target_triplet
  55. @@ -89,6 +90,8 @@ proc libvtv_init { args } {
  56. if ![info exists GCC_UNDER_TEST] then {
  57. if [info exists TOOL_EXECUTABLE] {
  58. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  59. + } elseif [info exists BUILD_CC] {
  60. + set GCC_UNDER_TEST $BUILD_CC
  61. } else {
  62. set GCC_UNDER_TEST "[find_gcc]"
  63. }
  64. --
  65. 2.17.1