summaryrefslogtreecommitdiffstats
path: root/debian/patches/libstdc++-test-installed.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:58:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:58:36 +0000
commit1d3b23e6bdbf53eb74161c37d8c355c2ec858a19 (patch)
treee279a67ec4f447e99b0754e7964666f7b48b5c05 /debian/patches/libstdc++-test-installed.diff
parentAdding upstream version 14-20240201. (diff)
downloadgcc-14-1d3b23e6bdbf53eb74161c37d8c355c2ec858a19.tar.xz
gcc-14-1d3b23e6bdbf53eb74161c37d8c355c2ec858a19.zip
Adding debian version 14-20240201-3.debian/14-20240201-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/libstdc++-test-installed.diff')
-rw-r--r--debian/patches/libstdc++-test-installed.diff76
1 files changed, 76 insertions, 0 deletions
diff --git a/debian/patches/libstdc++-test-installed.diff b/debian/patches/libstdc++-test-installed.diff
new file mode 100644
index 0000000..298b229
--- /dev/null
+++ b/debian/patches/libstdc++-test-installed.diff
@@ -0,0 +1,76 @@
+# DP: Add support to run the libstdc++-v3 testsuite using the
+# DP: installed shared libraries.
+
+--- a/src/libstdc++-v3/testsuite/lib/libstdc++.exp
++++ b/src/libstdc++-v3/testsuite/lib/libstdc++.exp
+@@ -37,6 +37,12 @@
+ # the last thing before testing begins. This can be defined in, e.g.,
+ # ~/.dejagnurc or $DEJAGNU.
+
++set test_installed 0
++if [info exists env(TEST_INSTALLED)] {
++ verbose -log "test installed libstdc++-v3"
++ set test_installed 1
++}
++
+ proc load_gcc_lib { filename } {
+ global srcdir loaded_libs
+
+@@ -116,6 +122,7 @@ proc libstdc++_init { testfile } {
+ global tool_timeout
+ global DEFAULT_CXXFLAGS
+ global STATIC_LIBCXXFLAGS
++ global test_installed
+
+ # We set LC_ALL and LANG to C so that we get the same error
+ # messages as expected.
+@@ -135,6 +142,9 @@ proc libstdc++_init { testfile } {
+
+ set blddir [lookfor_file [get_multilibs] libstdc++-v3]
+ set flags_file "${blddir}/scripts/testsuite_flags"
++ if {$test_installed} {
++ set flags_file "${blddir}/scripts/testsuite_flags.installed"
++ }
+ set shlib_ext [get_shlib_extension]
+ v3track flags_file 2
+
+@@ -167,7 +177,11 @@ proc libstdc++_init { testfile } {
+
+ # Locate libgcc.a so we don't need to account for different values of
+ # SHLIB_EXT on different platforms
+- set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
++ if {$test_installed} {
++ set gccdir ""
++ } else {
++ set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
++ }
+ if {$gccdir != ""} {
+ set gccdir [file dirname $gccdir]
+ append ld_library_path_tmp ":${gccdir}"
+@@ -187,7 +201,11 @@ proc libstdc++_init { testfile } {
+
+ # Locate libgomp. This is only required for parallel mode.
+ set v3-libgomp 0
+- set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext]
++ if {$test_installed} {
++ set libgompdir ""
++ } else {
++ set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext]
++ }
+ if {$libgompdir != ""} {
+ set v3-libgomp 1
+ set libgompdir [file dirname $libgompdir]
+@@ -209,7 +227,12 @@ proc libstdc++_init { testfile } {
+
+ # Locate libstdc++ shared library. (ie libstdc++.so.)
+ set v3-sharedlib 0
+- set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.$shlib_ext]
++ if {$test_installed} {
++ set sharedlibdir ""
++ set v3-sharedlib 1
++ } else {
++ set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.$shlib_ext]
++ }
+ if {$sharedlibdir != ""} {
+ if { ([string match "*-*-gnu*" $target_triplet]
+ || [string match "*-*-linux*" $target_triplet]