]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
hwasan: Always set target_hwasan_flags
authorH.J. Lu <(no_default)>
Thu, 18 Jan 2024 15:11:12 +0000 (07:11 -0800)
committerH.J. Lu <(no_default)>
Thu, 18 Jan 2024 15:14:16 +0000 (07:14 -0800)
Fix the "make check" error:

Running .../gcc/testsuite/gcc.dg/hwasan/hwasan.exp ...
ERROR: tcl error sourcing .../gcc/testsuite/gcc.dg/hwasan/hwasan.exp.
ERROR: tcl error code TCL LOOKUP VARNAME target_hwasan_flags
ERROR: can't read "target_hwasan_flags": no such variable
...

on non-x86-64 targets.

* lib/hwasan-dg.exp (hwasan_init): Always set target_hwasan_flags.

gcc/testsuite/lib/hwasan-dg.exp

index 76057502ee6ec7f0f74b1e36b7ba41c37025ca27..8d66b4db3e39b0047d0e68383b5dc0b6dc0d1766 100644 (file)
@@ -119,6 +119,8 @@ proc hwasan_init { args } {
 
     if [istarget x86_64-*-*] {
       set target_hwasan_flags "-mlam=u57"
+    } else {
+      set target_hwasan_flags ""
     }
 
     set link_flags ""