0004-libgomp-test-fix.patch 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. From 61c15ebc2895bdee5f4460a17b015bb47177fa90 Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Sun, 6 Nov 2016 03:11:18 +0000
  4. Subject: [PATCH 04/13] libgomp test fix
  5. ---
  6. libgomp/testsuite/Makefile.am | 6 ++++++
  7. libgomp/testsuite/Makefile.in | 5 +++++
  8. libgomp/testsuite/lib/libgomp.exp | 3 +++
  9. 3 files changed, 14 insertions(+)
  10. diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am
  11. index 2100f49e53b..fa25b3a0604 100644
  12. --- a/libgomp/testsuite/Makefile.am
  13. +++ b/libgomp/testsuite/Makefile.am
  14. @@ -12,6 +12,12 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  15. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  16. RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
  17. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  18. +
  19. +extra.exp:
  20. + echo 'set BUILD_CC "$(CC)"' > $@.tmp
  21. + mv $@.tmp $@
  22. +
  23. # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
  24. # following variables have to be "routed through" this Makefile, for expansion
  25. # of the several (Makefile) variables used therein.
  26. diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in
  27. index 80315b15a7d..cdbf35695f7 100644
  28. --- a/libgomp/testsuite/Makefile.in
  29. +++ b/libgomp/testsuite/Makefile.in
  30. @@ -303,6 +303,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  31. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  32. RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
  33. +EXTRA_DEJAGNU_SITE_CONFIG = extra.exp
  34. all: all-am
  35. .SUFFIXES:
  36. @@ -464,6 +465,10 @@ uninstall-am:
  37. .PRECIOUS: Makefile
  38. +extra.exp:
  39. + echo 'set BUILD_CC "$(CC)"' > $@.tmp
  40. + mv $@.tmp $@
  41. +
  42. # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
  43. # following variables have to be "routed through" this Makefile, for expansion
  44. # of the several (Makefile) variables used therein.
  45. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
  46. index 14d9b5f1305..186b0ba0b57 100644
  47. --- a/libgomp/testsuite/lib/libgomp.exp
  48. +++ b/libgomp/testsuite/lib/libgomp.exp
  49. @@ -68,6 +68,7 @@ proc libgomp_init { args } {
  50. global ALWAYS_CFLAGS
  51. global CFLAGS
  52. global TOOL_EXECUTABLE TOOL_OPTIONS
  53. + global BUILD_CC
  54. global GCC_UNDER_TEST
  55. global TESTING_IN_BUILD_TREE
  56. global target_triplet
  57. @@ -90,6 +91,8 @@ proc libgomp_init { args } {
  58. if ![info exists GCC_UNDER_TEST] then {
  59. if [info exists TOOL_EXECUTABLE] {
  60. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  61. + } elseif [info exists BUILD_CC] {
  62. + set GCC_UNDER_TEST $BUILD_CC
  63. } else {
  64. set GCC_UNDER_TEST "[find_gcc]"
  65. }
  66. --
  67. 2.21.0