0007-libitm-test-fix.patch 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. From 37a62bfb856637c5e869ab8e74695ffbb6e668a4 Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Sat, 20 Aug 2016 19:16:39 +0000
  4. Subject: [PATCH 7/8] libitm-test-fix
  5. ---
  6. libitm/configure | 7 ++++--
  7. libitm/configure.ac | 1 +
  8. libitm/testsuite/Makefile.am | 2 ++
  9. libitm/testsuite/Makefile.in | 33 +++++++++++++++++------------
  10. libitm/testsuite/lib/libitm.exp | 5 +++++
  11. libitm/testsuite/libitm-test-support.exp.in | 1 +
  12. 6 files changed, 33 insertions(+), 16 deletions(-)
  13. create mode 100644 libitm/testsuite/libitm-test-support.exp.in
  14. diff --git a/libitm/configure b/libitm/configure
  15. index 55332bb..09fd041 100644
  16. --- a/libitm/configure
  17. +++ b/libitm/configure
  18. @@ -9762,7 +9762,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. @@ -14248,7 +14248,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
  27. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  28. export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  29. else
  30. - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  31. + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  32. fi
  33. ;;
  34. pw32*)
  35. @@ -17638,6 +17638,8 @@ fi
  36. ac_config_files="$ac_config_files Makefile testsuite/Makefile libitm.spec"
  37. +ac_config_files="$ac_config_files testsuite/libitm-test-support.exp"
  38. +
  39. cat >confcache <<\_ACEOF
  40. # This file is a shell script that caches the results of configure
  41. # tests run on this system so they can be shared between configure
  42. @@ -18799,6 +18801,7 @@ do
  43. "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  44. "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
  45. "libitm.spec") CONFIG_FILES="$CONFIG_FILES libitm.spec" ;;
  46. + "testsuite/libitm-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libitm-test-support.exp" ;;
  47. *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  48. esac
  49. diff --git a/libitm/configure.ac b/libitm/configure.ac
  50. index 3875aa0..70ce8dc 100644
  51. --- a/libitm/configure.ac
  52. +++ b/libitm/configure.ac
  53. @@ -287,4 +287,5 @@ AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes])
  54. AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes])
  55. AC_CONFIG_FILES(Makefile testsuite/Makefile libitm.spec)
  56. +AC_CONFIG_FILES(testsuite/libitm-test-support.exp)
  57. AC_OUTPUT
  58. diff --git a/libitm/testsuite/Makefile.am b/libitm/testsuite/Makefile.am
  59. index 561b7e2..688d48f 100644
  60. --- a/libitm/testsuite/Makefile.am
  61. +++ b/libitm/testsuite/Makefile.am
  62. @@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
  63. _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  64. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  65. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  66. +
  67. +all-local: libitm-test-support.exp
  68. diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in
  69. index 4d79781..8b7bc8e 100644
  70. --- a/libitm/testsuite/Makefile.in
  71. +++ b/libitm/testsuite/Makefile.in
  72. @@ -52,7 +52,8 @@ build_triplet = @build@
  73. host_triplet = @host@
  74. target_triplet = @target@
  75. subdir = testsuite
  76. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
  77. +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  78. + $(srcdir)/libitm-test-support.exp.in
  79. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  80. am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
  81. $(top_srcdir)/../config/asmcfi.m4 \
  82. @@ -74,7 +75,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  83. $(ACLOCAL_M4)
  84. mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
  85. CONFIG_HEADER = $(top_builddir)/config.h
  86. -CONFIG_CLEAN_FILES =
  87. +CONFIG_CLEAN_FILES = libitm-test-support.exp
  88. CONFIG_CLEAN_VPATH_FILES =
  89. SOURCES =
  90. am__can_run_installinfo = \
  91. @@ -265,6 +266,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  92. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  93. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  94. $(am__aclocal_m4_deps):
  95. +libitm-test-support.exp: $(top_builddir)/config.status $(srcdir)/libitm-test-support.exp.in
  96. + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  97. mostlyclean-libtool:
  98. -rm -f *.lo
  99. @@ -325,7 +328,7 @@ distclean-DEJAGNU:
  100. check-am: all-am
  101. $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
  102. check: check-am
  103. -all-am: Makefile
  104. +all-am: Makefile all-local
  105. installdirs:
  106. install: install-am
  107. install-exec: install-exec-am
  108. @@ -425,19 +428,21 @@ uninstall-am:
  109. .MAKE: check-am install-am install-strip
  110. -.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
  111. - clean-libtool distclean distclean-DEJAGNU distclean-generic \
  112. - distclean-libtool dvi dvi-am html html-am info info-am install \
  113. - install-am install-data install-data-am install-dvi \
  114. - install-dvi-am install-exec install-exec-am install-html \
  115. - install-html-am install-info install-info-am install-man \
  116. - install-pdf install-pdf-am install-ps install-ps-am \
  117. - install-strip installcheck installcheck-am installdirs \
  118. - maintainer-clean maintainer-clean-generic mostlyclean \
  119. - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  120. - uninstall uninstall-am
  121. +.PHONY: all all-am all-local check check-DEJAGNU check-am clean \
  122. + clean-generic clean-libtool distclean distclean-DEJAGNU \
  123. + distclean-generic distclean-libtool dvi dvi-am html html-am \
  124. + info info-am install install-am install-data install-data-am \
  125. + install-dvi install-dvi-am install-exec install-exec-am \
  126. + install-html install-html-am install-info install-info-am \
  127. + install-man install-pdf install-pdf-am install-ps \
  128. + install-ps-am install-strip installcheck installcheck-am \
  129. + installdirs maintainer-clean maintainer-clean-generic \
  130. + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
  131. + ps ps-am uninstall uninstall-am
  132. +all-local: libitm-test-support.exp
  133. +
  134. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  135. # Otherwise a system limit (for SysV at least) may be exceeded.
  136. .NOEXPORT:
  137. diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp
  138. index 0416296..a896e02 100644
  139. --- a/libitm/testsuite/lib/libitm.exp
  140. +++ b/libitm/testsuite/lib/libitm.exp
  141. @@ -47,6 +47,8 @@ load_gcc_lib timeout-dg.exp
  142. load_gcc_lib torture-options.exp
  143. load_gcc_lib fortran-modules.exp
  144. +load_file libitm-test-support.exp
  145. +
  146. set dg-do-what-default run
  147. #
  148. @@ -74,6 +76,7 @@ proc libitm_init { args } {
  149. global ALWAYS_CFLAGS
  150. global CFLAGS
  151. global TOOL_EXECUTABLE TOOL_OPTIONS
  152. + global BUILD_CC
  153. global GCC_UNDER_TEST
  154. global TESTING_IN_BUILD_TREE
  155. global target_triplet
  156. @@ -89,6 +92,8 @@ proc libitm_init { args } {
  157. if ![info exists GCC_UNDER_TEST] then {
  158. if [info exists TOOL_EXECUTABLE] {
  159. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  160. + } elseif [info exists BUILD_CC] {
  161. + set GCC_UNDER_TEST $BUILD_CC
  162. } else {
  163. set GCC_UNDER_TEST "[find_gcc]"
  164. }
  165. diff --git a/libitm/testsuite/libitm-test-support.exp.in b/libitm/testsuite/libitm-test-support.exp.in
  166. new file mode 100644
  167. index 0000000..972f8d5
  168. --- /dev/null
  169. +++ b/libitm/testsuite/libitm-test-support.exp.in
  170. @@ -0,0 +1 @@
  171. +set BUILD_CC "@CC@"
  172. --
  173. 2.8.1