aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2019-09-03 08:24:03 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2019-09-03 08:24:03 +0000
commitbca3073692c0858f4b8151faaf8ccd963541e787 (patch)
treeb83cd2416bd1ed89a00fe8962b02da5d93791f5f /libphobos
parent75f935365dba3eb5e9cbd11bc0d75009cad3d019 (diff)
downloadgcc-bca3073692c0858f4b8151faaf8ccd963541e787.zip
gcc-bca3073692c0858f4b8151faaf8ccd963541e787.tar.gz
gcc-bca3073692c0858f4b8151faaf8ccd963541e787.tar.bz2
libphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path var.
2019-09-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * testsuite/lib/libphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path var. From-SVN: r275332
Diffstat (limited to 'libphobos')
-rw-r--r--libphobos/ChangeLog5
-rw-r--r--libphobos/testsuite/lib/libphobos.exp19
2 files changed, 24 insertions, 0 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index 76b13f4..80730c8 100644
--- a/libphobos/ChangeLog
+++ b/libphobos/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * testsuite/lib/libphobos.exp (libphobos_init): Add multi-lib libgcc
+ dirs to the ld_library_path var.
+
2019-08-20 Iain Buclaw <ibuclaw@gdcproject.org>
* libdruntime/Makefile.am (DRUNTIME_DSOURCES_BIONIC): Add
diff --git a/libphobos/testsuite/lib/libphobos.exp b/libphobos/testsuite/lib/libphobos.exp
index d3fe753..056e8f1 100644
--- a/libphobos/testsuite/lib/libphobos.exp
+++ b/libphobos/testsuite/lib/libphobos.exp
@@ -170,6 +170,25 @@ proc libphobos_init { args } {
append ld_library_path ":${blddir}/src/.libs"
}
+ # Compute what needs to be added to the existing LD_LIBRARY_PATH.
+ if {$gccdir != ""} {
+ set compiler ${gccdir}/gdc
+
+ if { [is_remote host] == 0 && [which $compiler] != 0 } {
+ foreach i "[exec $compiler --print-multi-lib]" {
+ set mldir ""
+ regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
+ set mldir [string trimright $mldir "\;@"]
+ if { "$mldir" == "." } {
+ continue
+ }
+ if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+ append ld_library_path ":${gccdir}/${mldir}"
+ }
+ }
+ }
+ }
+
set_ld_library_path_env_vars
libphobos_maybe_build_wrapper "${objdir}/testglue.o"