0004-libatomic-test-fix.diff 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. diff --git a/libatomic/testsuite/Makefile.am b/libatomic/testsuite/Makefile.am
  2. index a9a0144185a..a19101aac54 100644
  3. --- a/libatomic/testsuite/Makefile.am
  4. +++ b/libatomic/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)"' > $@.tmp
  14. + mv $@.tmp $@
  15. diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in
  16. index adfc231484a..5400ac3ce11 100644
  17. --- a/libatomic/testsuite/Makefile.in
  18. +++ b/libatomic/testsuite/Makefile.in
  19. @@ -223,6 +223,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. @@ -429,6 +430,10 @@ uninstall-am:
  26. uninstall uninstall-am
  27. +extra.exp:
  28. + echo 'set BUILD_CC "$(CC)"' > $@.tmp
  29. + mv $@.tmp $@
  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/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp
  35. index cafab5432b7..dd2e1a4de49 100644
  36. --- a/libatomic/testsuite/lib/libatomic.exp
  37. +++ b/libatomic/testsuite/lib/libatomic.exp
  38. @@ -74,6 +74,7 @@ proc libatomic_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 libatomic_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. }