0004-libgomp-test-fix.diff 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am
  2. index 2100f49e53b..fa25b3a0604 100644
  3. --- a/libgomp/testsuite/Makefile.am
  4. +++ b/libgomp/testsuite/Makefile.am
  5. @@ -12,6 +12,12 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  6. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  7. RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
  8. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  9. +
  10. +extra.exp:
  11. + echo 'set BUILD_CC "$(CC)"' > [email protected]
  12. + mv [email protected] $@
  13. +
  14. # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
  15. # following variables have to be "routed through" this Makefile, for expansion
  16. # of the several (Makefile) variables used therein.
  17. diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
  18. index 80315b15a7d..cdbf35695f7 100644
  19. --- a/libgomp/testsuite/Makefile.in
  20. +++ b/libgomp/testsuite/Makefile.in
  21. @@ -303,6 +303,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  22. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  23. RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
  24. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  25. all: all-am
  26. .SUFFIXES:
  27. @@ -464,6 +465,10 @@ uninstall-am:
  28. .PRECIOUS: Makefile
  29. +extra.exp:
  30. + echo 'set BUILD_CC "$(CC)"' > [email protected]
  31. + mv [email protected] $@
  32. +
  33. # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
  34. # following variables have to be "routed through" this Makefile, for expansion
  35. # of the several (Makefile) variables used therein.
  36. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
  37. index 14d9b5f1305..186b0ba0b57 100644
  38. --- a/libgomp/testsuite/lib/libgomp.exp
  39. +++ b/libgomp/testsuite/lib/libgomp.exp
  40. @@ -68,6 +68,7 @@ proc libgomp_init { args } {
  41. global ALWAYS_CFLAGS
  42. global CFLAGS
  43. global TOOL_EXECUTABLE TOOL_OPTIONS
  44. + global BUILD_CC
  45. global GCC_UNDER_TEST
  46. global TESTING_IN_BUILD_TREE
  47. global target_triplet
  48. @@ -90,6 +91,8 @@ proc libgomp_init { args } {
  49. if ![info exists GCC_UNDER_TEST] then {
  50. if [info exists TOOL_EXECUTABLE] {
  51. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  52. + } elseif [info exists BUILD_CC] {
  53. + set GCC_UNDER_TEST $BUILD_CC
  54. } else {
  55. set GCC_UNDER_TEST "[find_gcc]"
  56. }