Always run LTO tests on Linux with GCC 4.9 or newer
[deliverable/binutils-gdb.git] / ld / testsuite / lib / ld-lib.exp
index 52b63ee6a8c460f903bb533a8106cca343cf799e..88afc5afb5ef9b2e92f16394e203945080a2fc76 100644 (file)
@@ -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] {
This page took 0.024962 seconds and 4 git commands to generate.