0007-libgomp-test-fix.diff 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am
  2. index 66a9d94..83d3f67 100644
  3. --- a/libgomp/testsuite/Makefile.am
  4. +++ b/libgomp/testsuite/Makefile.am
  5. @@ -12,6 +12,11 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  6. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  7. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  8. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  9. +
  10. +extra.exp:
  11. + echo 'set BUILD_CC "$(CC)"' > [email protected]
  12. + mv [email protected] $@
  13. # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
  14. # following variables have to be "routed through" this Makefile, for expansion
  15. diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
  16. index 4dbb406..001a163 100644
  17. --- a/libgomp/testsuite/Makefile.in
  18. +++ b/libgomp/testsuite/Makefile.in
  19. @@ -254,6 +254,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. @@ -462,6 +463,10 @@ uninstall-am:
  26. ps ps-am uninstall uninstall-am
  27. +extra.exp:
  28. + echo 'set BUILD_CC "$(CC)"' > [email protected]
  29. + mv [email protected] $@
  30. +
  31. # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
  32. # following variables have to be "routed through" this Makefile, for expansion
  33. # of the several (Makefile) variables used therein.
  34. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
  35. index 1cb4991..398ba1f 100644
  36. --- a/libgomp/testsuite/lib/libgomp.exp
  37. +++ b/libgomp/testsuite/lib/libgomp.exp
  38. @@ -85,6 +85,7 @@ proc libgomp_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. @@ -107,6 +108,8 @@ proc libgomp_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. }