0005-libatomic-test-fix.patch 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. From 82cde54d45da469cc8aa762193318919d88a7eef Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Sat, 20 Aug 2016 17:02:31 +0000
  4. Subject: [PATCH 5/8] libatomic-test-fix
  5. ---
  6. libatomic/configure | 5 +++-
  7. libatomic/configure.ac | 1 +
  8. libatomic/testsuite/Makefile.am | 2 ++
  9. libatomic/testsuite/Makefile.in | 33 +++++++++++++----------
  10. libatomic/testsuite/lib/libatomic.exp | 5 ++++
  11. libatomic/testsuite/libatomic-test-support.exp.in | 1 +
  12. 6 files changed, 32 insertions(+), 15 deletions(-)
  13. create mode 100644 libatomic/testsuite/libatomic-test-support.exp.in
  14. diff --git a/libatomic/configure b/libatomic/configure
  15. index 8526abf..d185e9d 100755
  16. --- a/libatomic/configure
  17. +++ b/libatomic/configure
  18. @@ -9083,7 +9083,7 @@ _LT_EOF
  19. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  20. export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  21. else
  22. - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  23. + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  24. fi
  25. aix_use_runtimelinking=no
  26. @@ -15264,6 +15264,8 @@ fi
  27. ac_config_files="$ac_config_files Makefile testsuite/Makefile"
  28. +ac_config_files="$ac_config_files testsuite/libatomic-test-support.exp"
  29. +
  30. cat >confcache <<\_ACEOF
  31. # This file is a shell script that caches the results of configure
  32. # tests run on this system so they can be shared between configure
  33. @@ -16312,6 +16314,7 @@ do
  34. "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
  35. "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  36. "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
  37. + "testsuite/libatomic-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libatomic-test-support.exp" ;;
  38. *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  39. esac
  40. diff --git a/libatomic/configure.ac b/libatomic/configure.ac
  41. index cf40ea1..7ed2bcc 100644
  42. --- a/libatomic/configure.ac
  43. +++ b/libatomic/configure.ac
  44. @@ -261,4 +261,5 @@ else
  45. fi
  46. AC_CONFIG_FILES(Makefile testsuite/Makefile)
  47. +AC_CONFIG_FILES(testsuite/libatomic-test-support.exp)
  48. AC_OUTPUT
  49. diff --git a/libatomic/testsuite/Makefile.am b/libatomic/testsuite/Makefile.am
  50. index 561b7e2..6c5e5fc 100644
  51. --- a/libatomic/testsuite/Makefile.am
  52. +++ b/libatomic/testsuite/Makefile.am
  53. @@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
  54. _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  55. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  56. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  57. +
  58. +all-local: libatomic-test-support.exp
  59. diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in
  60. index 34f83e0..16f28fa 100644
  61. --- a/libatomic/testsuite/Makefile.in
  62. +++ b/libatomic/testsuite/Makefile.in
  63. @@ -52,7 +52,8 @@ build_triplet = @build@
  64. host_triplet = @host@
  65. target_triplet = @target@
  66. subdir = testsuite
  67. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
  68. +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  69. + $(srcdir)/libatomic-test-support.exp.in
  70. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  71. am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
  72. $(top_srcdir)/../config/depstand.m4 \
  73. @@ -69,7 +70,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  74. $(ACLOCAL_M4)
  75. mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
  76. CONFIG_HEADER = $(top_builddir)/auto-config.h
  77. -CONFIG_CLEAN_FILES =
  78. +CONFIG_CLEAN_FILES = libatomic-test-support.exp
  79. CONFIG_CLEAN_VPATH_FILES =
  80. SOURCES =
  81. am__can_run_installinfo = \
  82. @@ -255,6 +256,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  83. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  84. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  85. $(am__aclocal_m4_deps):
  86. +libatomic-test-support.exp: $(top_builddir)/config.status $(srcdir)/libatomic-test-support.exp.in
  87. + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  88. mostlyclean-libtool:
  89. -rm -f *.lo
  90. @@ -315,7 +318,7 @@ distclean-DEJAGNU:
  91. check-am: all-am
  92. $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
  93. check: check-am
  94. -all-am: Makefile
  95. +all-am: Makefile all-local
  96. installdirs:
  97. install: install-am
  98. install-exec: install-exec-am
  99. @@ -415,19 +418,21 @@ uninstall-am:
  100. .MAKE: check-am install-am install-strip
  101. -.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
  102. - clean-libtool distclean distclean-DEJAGNU distclean-generic \
  103. - distclean-libtool dvi dvi-am html html-am info info-am install \
  104. - install-am install-data install-data-am install-dvi \
  105. - install-dvi-am install-exec install-exec-am install-html \
  106. - install-html-am install-info install-info-am install-man \
  107. - install-pdf install-pdf-am install-ps install-ps-am \
  108. - install-strip installcheck installcheck-am installdirs \
  109. - maintainer-clean maintainer-clean-generic mostlyclean \
  110. - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  111. - uninstall uninstall-am
  112. +.PHONY: all all-am all-local check check-DEJAGNU check-am clean \
  113. + clean-generic clean-libtool distclean distclean-DEJAGNU \
  114. + distclean-generic distclean-libtool dvi dvi-am html html-am \
  115. + info info-am install install-am install-data install-data-am \
  116. + install-dvi install-dvi-am install-exec install-exec-am \
  117. + install-html install-html-am install-info install-info-am \
  118. + install-man install-pdf install-pdf-am install-ps \
  119. + install-ps-am install-strip installcheck installcheck-am \
  120. + installdirs maintainer-clean maintainer-clean-generic \
  121. + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
  122. + ps ps-am uninstall uninstall-am
  123. +all-local: libatomic-test-support.exp
  124. +
  125. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  126. # Otherwise a system limit (for SysV at least) may be exceeded.
  127. .NOEXPORT:
  128. diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp
  129. index cafab54..e374c64 100644
  130. --- a/libatomic/testsuite/lib/libatomic.exp
  131. +++ b/libatomic/testsuite/lib/libatomic.exp
  132. @@ -47,6 +47,8 @@ load_gcc_lib timeout.exp
  133. load_gcc_lib timeout-dg.exp
  134. load_gcc_lib fortran-modules.exp
  135. +load_file libatomic-test-support.exp
  136. +
  137. set dg-do-what-default run
  138. #
  139. @@ -74,6 +76,7 @@ proc libatomic_init { args } {
  140. global ALWAYS_CFLAGS
  141. global CFLAGS
  142. global TOOL_EXECUTABLE TOOL_OPTIONS
  143. + global BUILD_CC
  144. global GCC_UNDER_TEST
  145. global TESTING_IN_BUILD_TREE
  146. global target_triplet
  147. @@ -89,6 +92,8 @@ proc libatomic_init { args } {
  148. if ![info exists GCC_UNDER_TEST] then {
  149. if [info exists TOOL_EXECUTABLE] {
  150. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  151. + } elseif [info exists BUILD_CC] {
  152. + set GCC_UNDER_TEST $BUILD_CC
  153. } else {
  154. set GCC_UNDER_TEST "[find_gcc]"
  155. }
  156. diff --git a/libatomic/testsuite/libatomic-test-support.exp.in b/libatomic/testsuite/libatomic-test-support.exp.in
  157. new file mode 100644
  158. index 0000000..972f8d5
  159. --- /dev/null
  160. +++ b/libatomic/testsuite/libatomic-test-support.exp.in
  161. @@ -0,0 +1 @@
  162. +set BUILD_CC "@CC@"
  163. --
  164. 2.8.1