summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.8/add-install-ptest-to-Makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8/add-install-ptest-to-Makefile.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/add-install-ptest-to-Makefile.patch162
1 files changed, 162 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/add-install-ptest-to-Makefile.patch b/meta/recipes-devtools/gcc/gcc-4.8/add-install-ptest-to-Makefile.patch
new file mode 100644
index 0000000..3dedde5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/add-install-ptest-to-Makefile.patch
@@ -0,0 +1,162 @@
1Add 'install-ptest' rule.
2
3Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
4Upstream-status: Pending
5---
6diff -uNr a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
7--- a/libstdc++-v3/Makefile.in 2013-07-01 13:01:43.659958328 +0200
8+++ b/libstdc++-v3/Makefile.in 2013-08-23 13:22:41.962029555 +0200
9@@ -710,6 +710,26 @@
10 dvi:
11 install-dvi:
12
13+spath=$(subst /,\/,$(SOURCE_DIR))
14+bpath=$(subst /,\/,$(BUILD_DIR))
15+rpath=$(subst /,\/,$(REPLACE_DIR))
16+install-ptest:
17+ mkdir -p $(DEST_DIR)/gcc/testsuite
18+ mkdir -p $(DEST_DIR)/libstdc++-v3
19+ mkdir -p $(DEST_DIR)/contrib
20+ cp -r $(SOURCE_DIR)/libstdc++-v3/testsuite $(DEST_DIR)/libstdc++-v3
21+ cp $(SOURCE_DIR)/contrib/dg-extract-results.sh $(DEST_DIR)/contrib
22+ cp $(SOURCE_DIR)/gcc/BASE-VER $(DEST_DIR)/gcc
23+ cp -r $(SOURCE_DIR)/gcc/testsuite/lib $(DEST_DIR)/gcc/testsuite
24+ cp -r $(SOURCE_DIR)/libstdc++-v3/scripts $(DEST_DIR)/libstdc++-v3
25+ cp $(BUILD_DIR)/libstdc++-v3/scripts/* $(DEST_DIR)/libstdc++-v3/scripts
26+ cp $(BUILD_DIR)/libstdc++-v3/testsuite/Makefile $(DEST_DIR)/libstdc++-v3/testsuite
27+ cp $(BUILD_DIR)/libstdc++-v3/Makefile $(DEST_DIR)/libstdc++-v3
28+ sed -i -e 's|^Makefile:|_Makefile:|' $(DEST_DIR)/libstdc++-v3/testsuite/Makefile
29+ sed -i -e "s/$(spath)/$(rpath)/g" -e "s/$(bpath)/$(rpath)/g" $(DEST_DIR)/libstdc++-v3/testsuite/Makefile
30+ sed -i -e "s/$(spath)/$(rpath)/g" -e "s/$(bpath)/$(rpath)/g" $(DEST_DIR)/libstdc++-v3/Makefile
31+ sed -i -e 's/RUNTESTDEFAULTFLAGS.=/RUNTESTDEFAULTFLAGS =-a/g' ${DEST_DIR}/libstdc++-v3/testsuite/Makefile
32+
33 # All the machinations with string instantiations messes up the
34 # automake-generated TAGS rule. Make a simple one here.
35 TAGS: tags-recursive $(LISP)
36diff -uNr a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
37--- a/libstdc++-v3/testsuite/Makefile.in 2013-07-05 16:06:08.995480821 +0200
38+++ b/libstdc++-v3/testsuite/Makefile.in 2013-08-26 08:50:04.698546942 +0200
39@@ -478,6 +478,8 @@
40 maintainer-clean-generic mostlyclean mostlyclean-generic \
41 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
42
43+buildtest-TESTS:
44+ -@runtest $(AM_RUNTESTFLAGS) --tool libstdc++ $(RUNTESTFLAGS) buildtest.exp
45
46 # This rule generates all of the testsuite_files* lists at once.
47 ${lists_of_files}:
48@@ -545,7 +547,7 @@
49
50 # Run the testsuite in normal mode.
51 check-DEJAGNU $(check_DEJAGNU_normal_targets): check-DEJAGNU%: site.exp
52- AR="$(AR)"; export AR; \
53+ -@(AR="$(AR)"; export AR; \
54 RANLIB="$(RANLIB)"; export RANLIB; \
55 if [ -z "$*$(filter-out --target_board=%, $(RUNTESTFLAGS))" ] \
56 && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
57@@ -563,6 +565,7 @@
58 exit 0; \
59 fi; \
60 srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
61+ $(SHELL) command -v g++ >/dev/null 2>&1 || echo "g++ is not installed on your system! Please note that most of the tests need g++."; \
62 EXPECT=$(EXPECT); export EXPECT; \
63 runtest=$(RUNTEST); \
64 if [ -z "$$runtest" ]; then runtest=runtest; fi; \
65@@ -606,7 +609,7 @@
66 $(RUNTESTFLAGS); \
67 fi; \
68 else echo "WARNING: could not find \`runtest'" 1>&2; :;\
69- fi
70+ fi)
71
72 check-am:
73 $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
74diff -uNr a/libstdc++-v3/testsuite/buildtest.exp b/libstdc++-v3/testsuite/buildtest.exp
75--- a/libstdc++-v3/testsuite/buildtest.exp 1970-01-01 01:00:00.000000000 +0100
76+++ b/libstdc++-v3/testsuite/buildtest.exp 2013-08-14 09:25:57.773587133 +0200
77@@ -0,0 +1,33 @@
78+# Copyright (C) 2013 Free Software Foundation, Inc.
79+#
80+# This program is free software; you can redistribute it and/or modify
81+# it under the terms of the GNU General Public License as published by
82+# the Free Software Foundation; either version 3 of the License, or
83+# (at your option) any later version.
84+#
85+# This program is distributed in the hope that it will be useful,
86+# but WITHOUT ANY WARRANTY; without even the implied warranty of
87+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88+# GNU General Public License for more details.
89+#
90+# You should have received a copy of the GNU General Public License
91+# along with this program; see the file COPYING3. If not see
92+# <http://www.gnu.org/licenses/>.
93+
94+# If there is no baseline file, or we can't find the library, skip
95+# this test. Or, hey, if we don't support this kind of symbol
96+# versioning test: don't run it.
97+
98+
99+set baseline_subdir "[eval exec $cxx $baseline_subdir_switch]"
100+
101+# Build the support objects.
102+v3-build_support
103+
104+# Build the abi_check program.
105+if { [v3_target_compile "$srcdir/util/testsuite_abi_check.cc" "abi_check" \
106+ "executable" [list "additional_flags=-w"]] != "" } {
107+ error "could not compile testsuite_abi_check.cc"
108+}
109+
110+
111diff -uNr a/libstdc++-v3/testsuite/libstdc++-abi/abi.exp b/libstdc++-v3/testsuite/libstdc++-abi/abi.exp
112--- a/libstdc++-v3/testsuite/libstdc++-abi/abi.exp 2013-08-09 10:02:56.769743266 +0200
113+++ b/libstdc++-v3/testsuite/libstdc++-abi/abi.exp 2013-08-14 09:27:15.722299887 +0200
114@@ -24,11 +24,6 @@
115 set lib $blddir/src/.libs/libstdc++.so
116 }
117
118-set baseline_subdir "[eval exec $cxx $baseline_subdir_switch]"
119-
120-# Build the support objects.
121-v3-build_support
122-
123 if { (${v3-symver} == 0) || ![info exists baseline_dir] \
124 || ![file exists $baseline_dir] \
125 || ![file exists $lib] } {
126@@ -50,12 +45,6 @@
127 remote_exec "build" "$objdir/../scripts/extract_symvers" \
128 [list $lib "current_symbols.txt"]
129
130-# Build the abi_check program.
131-if { [v3_target_compile "$srcdir/util/testsuite_abi_check.cc" "abi_check" \
132- "executable" [list "additional_flags=-w"]] != "" } {
133- error "could not compile testsuite_abi_check.cc"
134-}
135-
136 remote_download "target" $baseline_file "baseline_symbols.txt"
137 remote_download "target" "current_symbols.txt" "current_symbols.txt"
138 set result [${tool}_load "./abi_check" \
139diff -uNr a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
140--- a/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp 2013-08-09 13:06:20.795174486 +0200
141+++ b/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp 2013-08-23 13:25:31.290856664 +0200
142@@ -21,9 +21,6 @@
143 # Initialization.
144 dg-init
145
146-# Build the support objects.
147-v3-build_support
148-
149 set tests [list]
150
151 # If there is a "testsuite_files" file, use it.
152diff -uNr a/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp b/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
153--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp 2013-08-09 13:08:17.946244225 +0200
154+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp 2013-08-09 13:31:19.812003255 +0200
155@@ -17,7 +17,6 @@
156 load_lib gdb-test.exp
157
158 dg-init
159-v3-build_support
160
161 global GDB
162 if ![info exists ::env(GUALITY_GDB_NAME)] {