These operations don't exist on x86-32 bits, and when running multilibed tests, the target is still x86_64-unknown-linux-gnu but the target is 32-bits when using -m32.

The following change checks that we are actually running in 64-bits before assuming sync_int_128 or sync_long_long exist on the target.

OK for branch?
        * lib/target-supports.exp (check_effective_target_sync_int_128):
        Only set when running in 64-bit mode.
        (check_effective_target_sync_long_long): Same.

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp     (revision 180156)
+++ lib/target-supports.exp     (working copy)
@@ -3456,7 +3456,7 @@ proc check_effective_target_sync_int_128
         verbose "check_effective_target_sync_int_128: using cached result" 2
     } else {
         set et_sync_int_128_saved 0
-        if { [istarget x86_64-*-*] } {
+        if { [istarget x86_64-*-*] && [is-effective-target lp64] } {
            set et_sync_int_128_saved 1
         }
     }
@@ -3474,7 +3474,7 @@ proc check_effective_target_sync_long_lo
         verbose "check_effective_target_sync_long_long: using cached result" 2
     } else {
         set et_sync_long_long_saved 0
-        if { [istarget x86_64-*-*] } {
+        if { [istarget x86_64-*-*] && [is-effective-target lp64] } {
            set et_sync_long_long_saved 1
         }
     }

Reply via email to