This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Always run LTO tests on Linux with GCC 4.9 or newer
- From: H.J.Lu <hjl at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 21 Apr 2016 16:11:38 -0000
- Subject: [binutils-gdb] Always run LTO tests on Linux with GCC 4.9 or newer
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=00f4a6024f23a592a34b8a9bf46e28aa0b747fc5
commit 00f4a6024f23a592a34b8a9bf46e28aa0b747fc5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Apr 21 09:04:18 2016 -0700
Always run LTO tests on Linux with GCC 4.9 or newer
Check for LTO availability will hide LTO bugs in ld. Since GCC 4.9 adds
-ffat-lto-objects, we always run LTO tests on Linux with GCC 4.9 or newer.
* testsuite/lib/ld-lib.exp (check_lto_available): Return 1 on
Linux with GCC 4.9 or newer.
(check_lto_fat_available): Likewise.
(check_lto_shared_available): Likewise.
Diff:
---
ld/testsuite/lib/ld-lib.exp | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 52b63ee..88afc5a 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1797,6 +1797,13 @@ proc check_lto_available { } {
set lto_available_saved 0
return 0
}
+ # This test will hide LTO bugs in ld. Since GCC 4.9 adds
+ # -ffat-lto-objects, we always run LTO tests on Linux with
+ # GCC 4.9 or newer.
+ if { [istarget "*-*-linux*"] && [at_least_gcc_version 4 9] } {
+ set lto_available_saved 1
+ return 1
+ }
# Check if gcc supports -flto -fuse-linker-plugin
set flags ""
if [board_info [target_info name] exists cflags] {
@@ -1831,6 +1838,13 @@ proc check_lto_fat_available { } {
set lto_fat_available_saved 0
return 0
}
+ # This test will hide LTO bugs in ld. Since GCC 4.9 adds
+ # -ffat-lto-objects, we always run LTO tests on Linux with
+ # GCC 4.9 or newer.
+ if { [istarget "*-*-linux*"] && [at_least_gcc_version 4 9] } {
+ set lto_fat_available_saved 1
+ return 1
+ }
# Check if gcc supports -flto -fuse-linker-plugin
set flags ""
if [board_info [target_info name] exists cflags] {
@@ -1865,6 +1879,13 @@ proc check_lto_shared_available { } {
set lto_shared_available_saved 0
return 0
}
+ # This test will hide LTO bugs in ld. Since GCC 4.9 adds
+ # -ffat-lto-objects, we always run LTO tests on Linux with
+ # GCC 4.9 or newer.
+ if { [istarget "*-*-linux*"] && [at_least_gcc_version 4 9] } {
+ set lto_shared_available_saved 1
+ return 1
+ }
# Check if gcc supports -flto -fuse-linker-plugin -shared
set flags ""
if [board_info [target_info name] exists cflags] {