Run PR ld/17618 test only with 64-bit ELF linker
[deliverable/binutils-gdb.git] / ld / testsuite / config / default.exp
index f5cb188478af011d54226b3a952f33fddc101c2b..355d98f24a89fcdf0cc6b917a3c8bb5afe1b3bb6 100644 (file)
@@ -251,6 +251,16 @@ if ![info exists LDFLAGS] then {
     set LDFLAGS {}
 }
 
+# Set LD_CLASS to "64bit" for 64-bit LD.
+if { ![info exists LD_CLASS] } then {
+    set readelf_output [run_host_cmd "$READELF" "-h $LD"]
+    if { [regexp {[ \t]+Class:[ \t]+ELF64} $readelf_output] } then {
+       set LD_CLASS "64bit"
+    } else {
+       set LD_CLASS "32bit"
+    }
+}
+
 # Set PLT_CFLAGS to "-fplt" if target compiler supports it.
 
 if { ![info exists PLT_CFLAGS] } then {
This page took 0.02424 seconds and 4 git commands to generate.