Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / ld / testsuite / ld-powerpc / export-class.exp
index 5b721fcd2f17abbf9d82ae6fce654f64a17cbb67..e244be329051e90e583083855015e29b171ed6fd 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for symbol export classes, PowerPC variation.
 #
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -30,22 +30,11 @@ if { ![istarget powerpc*-*-linux*] } {
     return
 }
 
-proc supports_ppc64 { } {
-    global ld
+proc powerpc_export_class_test { abi endian emul } {
 
-    catch "exec $ld --help | grep emulations" tmp
-    if [string match "*elf64ppc*" $tmp] then {
-       return 1
-    } else {
-       return 0
-    }
-}
-
-proc powerpc_export_class_test { abi emul } {
-
-    set testname "PowerPC $abi symbol export class test"
+    set testname "PowerPC $abi $endian symbol export class test"
 
-    set AFLAGS "-a$abi -be"
+    set AFLAGS "-a$abi -$endian"
     set LDFLAGS "-m$emul"
 
     # Build an auxiliary shared object with conflicting versioned symbol
@@ -96,11 +85,13 @@ proc powerpc_export_class_test { abi emul } {
     ]
 }
 
-if { [supports_ppc64] } {
-    set abis { 32 elf32ppclinux 64 elf64ppc }
-} else {
-    set abis { 32 elf32ppclinux }
-}
-foreach { abi emul } $abis {
-    powerpc_export_class_test $abi $emul
+set abis { 32 be elf32ppclinux 32 le elf32lppclinux 64 be elf64ppc 64 le elf64lppc }
+
+global ld
+catch "exec $ld --help | grep emulations" ldemul
+
+foreach { abi endian emul } $abis {
+    if { [string first $emul $ldemul] != -1 } then {
+       powerpc_export_class_test $abi $endian $emul
+    }
 }
This page took 0.025445 seconds and 4 git commands to generate.