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: r238978
This commit is contained in:
Jonathan Wakely 2016-08-02 10:40:50 +01:00 committed by Jonathan Wakely
parent 1efafef383
commit c1b6948e1b
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-08-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/basic_string.h (data() const): Update comment.

View File

@ -636,8 +636,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"
}