0006-libitm-test-fix.diff 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. diff --git a/libitm/testsuite/Makefile.am b/libitm/testsuite/Makefile.am
  2. index a9a0144185a..a19101aac54 100644
  3. --- a/libitm/testsuite/Makefile.am
  4. +++ b/libitm/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/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in
  16. index eb9e992279d..1250e7f9a5a 100644
  17. --- a/libitm/testsuite/Makefile.in
  18. +++ b/libitm/testsuite/Makefile.in
  19. @@ -234,6 +234,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. @@ -440,6 +441,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/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp
  35. index 041629687f6..748f492c03d 100644
  36. --- a/libitm/testsuite/lib/libitm.exp
  37. +++ b/libitm/testsuite/lib/libitm.exp
  38. @@ -74,6 +74,7 @@ proc libitm_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 libitm_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. }