From a0673ec5f9236dca6ada23f28343c591ccd575e4 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Fri, 16 Apr 2021 20:01:40 +0100 Subject: Testsuite: allow non-installed testing on darwin DYLD_LIBRARY_PATH is now removed from the environment for all system tools, including the shell. Adapt the testsuite and pass the right options to allow testing, even when the compiler and libraries have not been installed. gcc/ChangeLog: * Makefile.in: set ENABLE_DARWIN_AT_RPATH in site.tmp. gcc/testsuite/ChangeLog: * gfortran.dg/coarray/caf.exp: Correctly set libatomic flags. * gfortran.dg/dg.exp: Likewise. * lib/asan-dg.exp: Set correct -B flags. * lib/atomic-dg.exp: Likewise. * lib/target-libpath.exp: Handle ENABLE_DARWIN_AT_RPATH. libatomic/ChangeLog: * testsuite/lib/libatomic.exp: Pass correct flags on darwin. libffi/ChangeLog: * testsuite/lib/libffi.exp: Likewise. libitm/ChangeLog: * testsuite/lib/libitm.exp: Likewise. * testsuite/libitm.c++/c++.exp: Likewise. --- libatomic/testsuite/lib/libatomic.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libatomic') diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp index 10f3847..c6d645e 100644 --- a/libatomic/testsuite/lib/libatomic.exp +++ b/libatomic/testsuite/lib/libatomic.exp @@ -148,11 +148,15 @@ proc libatomic_init { args } { if { $blddir != "" } { lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" - lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" + if [istarget *-*-darwin*] { + lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs" + } else { + lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" + } } lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." - if [istarget *-*-darwin*] { + if [istarget *-*-darwin\[89\]*] { lappend ALWAYS_CFLAGS "additional_flags=-shared-libgcc" } -- cgit v1.1