[PATCH, libphobos] Fix libphobos.shared testsuite for multilib tests

Iain Buclaw ibuclaw@gdcproject.org
Thu Nov 22 06:16:00 GMT 2018


On Sat, 17 Nov 2018 at 16:07, Johannes Pfau <johannespfau@gmail.com> wrote:
>
> Hi,
>
> the loadDR test in the libphobos.shared testsuite tries to dynamically load the phobos library. The path for the library currently points to the main multilib variant phobos library, causing other multilib variants to fail the test. The attached patch uses $blddir instead of $objdir to fix this issue.
>
> ---
> libphobos/ChangeLog:
>
> 2018-11-17  Johannes Pfau  <johannespfau@gmail.com>
>
>     PR d/87824
>     * testsuite/libphobos.shared/shared.exp: Set proper path to phobos library for multilib builds.
>
> diff --git a/libphobos/testsuite/libphobos.shared/shared.exp b/libphobos/testsuite/libphobos.shared/shared.exp
> index 5555b3bdd..623e06259 100644
> --- a/libphobos/testsuite/libphobos.shared/shared.exp
> +++ b/libphobos/testsuite/libphobos.shared/shared.exp
> @@ -94,7 +94,7 @@ if { [is-effective-target dlopen] && [is-effective-target pthread] } {
>      dg-test "$srcdir/$subdir/host.c" "-ldl -pthread" "$DEFAULT_CFLAGS"
>
>      # Test requires a command line argument to be passed to the program.
> -    set libphobos_run_args "$objdir/../src/.libs/libgphobos.so"
> +    set libphobos_run_args "${blddir}/src/.libs/libgphobos.${shlib_ext}"
>      dg-test "$srcdir/$subdir/loadDR.c" "-ldl -pthread -g" "$DEFAULT_CFLAGS"
>      set libphobos_run_args ""
>  }

OK.

I've checked and committed this, however perhaps we should get you
write after approval set-up.

-- 
Iain



More information about the Gcc-patches mailing list