diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp index 73c1552e682..15e34f8a646 100644 --- a/libstdc++-v3/testsuite/lib/dg-options.exp +++ b/libstdc++-v3/testsuite/lib/dg-options.exp @@ -269,8 +269,10 @@ proc dg-require-target-fs-lwt { args } { } proc add_options_for_no_pch { flags } { + # Remove any inclusion of bits/stdc++.h from the options. + regsub -all -- "-include bits/stdc...h" $flags "" flags # This forces any generated and possibly included PCH to be invalid. - return "-D__GLIBCXX__=99999999" + return "$flags -D__GLIBCXX__=99999999" } # Add to FLAGS all the target-specific flags needed for networking.