Support using -flto with libstdc++ testsuite

* testsuite/lib/libstdc++.exp (v3-build_support): Add -fno-lto
	to additional flags for compiling libtestc++.a objects.

From-SVN: r238980
This commit is contained in:
Jonathan Wakely 2016-08-02 10:53:45 +01:00 committed by Jonathan Wakely
parent 7a9cb0a4a6
commit 882c54bb4a
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-08-02 Jonathan Wakely <jwakely@redhat.com>
* testsuite/lib/libstdc++.exp (v3-build_support): Add
-fno-lto to additional flags for compiling libtestc++.a objects.
2016-07-19 Jonathan Wakely <jwakely@redhat.com>
Backport from mainline

View File

@ -628,8 +628,9 @@ proc v3-build_support { } {
set object_file [file tail $obj]
# Compile with "-w" so that warnings issued by the compiler
# do not prevent compilation.
# Disable LTO so that ar/ranlib don't need the LTO plugin.
if { [v3_target_compile $srcdir/util/$f $object_file "object" \
[list "incdir=$srcdir" "additional_flags=-w"]]
[list "incdir=$srcdir" "additional_flags=-w -fno-lto"]]
!= "" } {
error "could not compile $f"
}