From 035f5b9e0b9fd181aea5d228ddfd91a5a7161dcf Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 12 Mar 2019 19:37:31 +0100 Subject: [PATCH] re PR d/87824 (x86_64-linux multilib issues) PR d/87824 * lib/gdc.exp (gdc_include_flags): Find C++ headers by calling libstdc++v3/scripts/testsuite_flags. Filter out unsupported -nostdinc++ flag. From-SVN: r269625 --- gcc/testsuite/ChangeLog | 10 ++++++++-- gcc/testsuite/lib/gdc.exp | 13 ++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index edde1c1..893953d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-03-12 Uroš Bizjak + + PR d/87824 + * lib/gdc.exp (gdc_include_flags): Find C++ headers by calling + libstdc++v3/scripts/testsuite_flags. Filter out unsupported + -nostdinc++ flag. + 2019-03-12 Thomas Koenig PR fortran/87673 @@ -9,8 +16,7 @@ 2019-03-12 Martin Liska - * gfortran.dg/abstract_type_3.f03: Amend test-case scan - patterns. + * gfortran.dg/abstract_type_3.f03: Amend test-case scan patterns. * gfortran.dg/binding_label_tests_4.f03: Likewise. * gfortran.dg/c_f_pointer_tests_6.f90: Likewise. * gfortran.dg/c_funloc_tests_6.f90: Likewise. diff --git a/gcc/testsuite/lib/gdc.exp b/gcc/testsuite/lib/gdc.exp index 59aec67..f5957c3 100644 --- a/gcc/testsuite/lib/gdc.exp +++ b/gcc/testsuite/lib/gdc.exp @@ -88,14 +88,13 @@ proc gdc_include_flags { paths } { append flags "-I${srcdir}/../../libphobos/libdruntime " append flags "-I${srcdir}/../../libphobos/src " - # For the tests that mix C++ and D, we should try and handle this better. - if { $gccpath != "" } { - if [file exists "${gccpath}/libstdc++-v3/include"] { - append flags "-I${gccpath}/libstdc++-v3/include " - append flags "-I${gccpath}/libstdc++-v3/include/$target " - } + # For the tests that mix C++ and D, need to know where headers are located. + set odir [lookfor_file ${gccpath} libstdc++-v3] + if { ${odir} != "" } { + set cxxflags [exec sh ${odir}/scripts/testsuite_flags --build-includes] + set idx [lsearch $cxxflags "-nostdinc++"] + append flags [lreplace $cxxflags $idx $idx] } - append flags "-I${srcdir}/../../libstdc++-v3/libsupc++" } # -- 2.7.4