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