From 99753d9d70bc219217ea4045eebf8ecb778720ac Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 18 Nov 2010 06:57:57 +0000 Subject: [PATCH] * ld-elf/binutils.exp: Correct x86 gnu target match. * ld-i386/i386.exp: Likewise. * ld-ifunc/binutils.exp: Likewise. * ld-ifunc/ifunc.exp: Likewise. * ld-discard/discard.exp: Remove unnecessary line continuations. * ld-elfvers/vers.exp: Likewise. Simplify linuxaout and linuxoldld test. * ld-elfweak/elfweak.exp: Likewise. --- ld/testsuite/ChangeLog | 11 ++++++ ld/testsuite/ld-discard/discard.exp | 8 ++--- ld/testsuite/ld-elf/binutils.exp | 4 +-- ld/testsuite/ld-elfvers/vers.exp | 55 ++++++++++++++--------------- ld/testsuite/ld-elfweak/elfweak.exp | 53 ++++++++++++++------------- ld/testsuite/ld-i386/i386.exp | 4 +-- ld/testsuite/ld-ifunc/binutils.exp | 4 +-- ld/testsuite/ld-ifunc/ifunc.exp | 6 ++-- 8 files changed, 77 insertions(+), 68 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4bb353d114..d500db2c91 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2010-11-18 Alan Modra + + * ld-elf/binutils.exp: Correct x86 gnu target match. + * ld-i386/i386.exp: Likewise. + * ld-ifunc/binutils.exp: Likewise. + * ld-ifunc/ifunc.exp: Likewise. + * ld-discard/discard.exp: Remove unnecessary line continuations. + * ld-elfvers/vers.exp: Likewise. Simplify linuxaout and linuxoldld + test. + * ld-elfweak/elfweak.exp: Likewise. + 2010-11-17 Andreas Schwab * ld-gc/pr11218-2.c: Declare diff --git a/ld/testsuite/ld-discard/discard.exp b/ld/testsuite/ld-discard/discard.exp index c2e032e049..f1038cdde0 100644 --- a/ld/testsuite/ld-discard/discard.exp +++ b/ld/testsuite/ld-discard/discard.exp @@ -25,14 +25,14 @@ # Test for ELF here, so we don't have to qualify on ELF specifically # in every .d-file. -if { ![istarget *-*-linux*] \ - && ![istarget *-*-gnu*] \ - && ![istarget hppa*64*-*-hpux*] \ +if { ![istarget *-*-linux*] + && ![istarget *-*-gnu*] + && ![istarget hppa*64*-*-hpux*] && ![istarget *-*-elf] } { return } -if { [istarget *-*-linux*aout*] \ +if { [istarget *-*-linux*aout*] || [istarget *-*-linux*oldld*] } { return } diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp index 4f8a6fb5ca..6f881f3490 100644 --- a/ld/testsuite/ld-elf/binutils.exp +++ b/ld/testsuite/ld-elf/binutils.exp @@ -109,10 +109,10 @@ binutils_test strip "-z relro -shared" relro1 binutils_test objcopy "-z relro" relro1 binutils_test objcopy "-z relro -shared" relro1 if { ([istarget "i?86-*-elf*"] - || ([istarget "i?86-*-linux*"] + || (([istarget "i?86-*-linux*"] + || [istarget "i?86-*-gnu*"]) && ![istarget "*-*-*aout*"] && ![istarget "*-*-*oldld*"]) - || [istarget "i?86-*-gnu*"] || [istarget "x86_64-*-linux*"] || [istarget "amd64-*-linux*"]) } { binutils_test strip "-z relro -shared" relro2 diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 9f85b83580..01cda47974 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -29,35 +29,34 @@ if ![isnative] then {return} # This test can only be run on a couple of ELF platforms. # Square bracket expressions seem to confuse istarget. # This is similar to the test that is used in ld-shared, BTW. -if { ![istarget hppa*64*-*-hpux*] \ - && ![istarget hppa*-*-linux*] \ - && ![istarget i?86-*-sysv4*] \ - && ![istarget i?86-*-unixware] \ - && ![istarget i?86-*-elf*] \ - && ![istarget i?86-*-linux*] \ - && ![istarget i?86-*-gnu*] \ - && ![istarget ia64-*-elf*] \ - && ![istarget ia64-*-linux*] \ - && ![istarget m68k-*-linux*] \ - && ![istarget mips*-*-irix5*] \ - && ![istarget powerpc*-*-elf*] \ - && ![istarget powerpc*-*-linux*] \ - && ![istarget powerpc*-*-sysv4*] \ - && ![istarget sparc*-*-elf] \ - && ![istarget sparc*-*-solaris2*] \ - && ![istarget sparc*-*-linux*] \ - && ![istarget arm*-*-linux*] \ - && ![istarget mips*-*-linux*] \ - && ![istarget alpha*-*-linux*] \ - && ![istarget s390*-*-linux*] \ - && ![istarget sh\[34\]*-*-linux*] \ +if { ![istarget hppa*64*-*-hpux*] + && ![istarget hppa*-*-linux*] + && ![istarget i?86-*-sysv4*] + && ![istarget i?86-*-unixware] + && ![istarget i?86-*-elf*] + && ![istarget i?86-*-linux*] + && ![istarget i?86-*-gnu*] + && ![istarget ia64-*-elf*] + && ![istarget ia64-*-linux*] + && ![istarget m68k-*-linux*] + && ![istarget mips*-*-irix5*] + && ![istarget powerpc*-*-elf*] + && ![istarget powerpc*-*-linux*] + && ![istarget powerpc*-*-sysv4*] + && ![istarget sparc*-*-elf] + && ![istarget sparc*-*-solaris2*] + && ![istarget sparc*-*-linux*] + && ![istarget arm*-*-linux*] + && ![istarget mips*-*-linux*] + && ![istarget alpha*-*-linux*] + && ![istarget s390*-*-linux*] + && ![istarget sh\[34\]*-*-linux*] && ![istarget x86_64-*-linux*] } { return } -if { [istarget i?86-*-linux*aout*] \ - || [istarget i?86-*-linux*oldld*] \ - || [istarget m68k-*-linux*aout*] } { +if { [istarget *-*-linux*aout*] + || [istarget *-*-linux*oldld*] } { return } @@ -84,9 +83,9 @@ if [istarget mips*-*-*] { catch "exec $CC $picflag" exec_output send_log "$exec_output\n" verbose "--" "$exec_output" - if { [string match "*illegal option*" $exec_output] \ - || [string match "*option ignored*" $exec_output] \ - || [string match "*unrecognized option*" $exec_output] \ + if { [string match "*illegal option*" $exec_output] + || [string match "*option ignored*" $exec_output] + || [string match "*unrecognized option*" $exec_output] || [string match "*passed to ld*" $exec_output] } { if [istarget *-*-sunos4*] { set picflag "-pic" diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp index 3854e64c6e..e6d4d6f2e8 100644 --- a/ld/testsuite/ld-elfweak/elfweak.exp +++ b/ld/testsuite/ld-elfweak/elfweak.exp @@ -29,33 +29,32 @@ if ![isnative] then {return} # This test can only be run on a couple of ELF platforms. # Square bracket expressions seem to confuse istarget. # This is similar to the test that is used in ld-shared, BTW. -if { ![istarget alpha*-*-linux*] \ - && ![istarget arm*-*-linux*] \ - && ![istarget hppa*64*-*-hpux*] \ - && ![istarget hppa*-*-linux*] \ - && ![istarget i?86-*-sysv4*] \ - && ![istarget i?86-*-unixware] \ - && ![istarget i?86-*-elf*] \ - && ![istarget i?86-*-linux*] \ - && ![istarget i?86-*-gnu*] \ - && ![istarget ia64-*-elf*] \ - && ![istarget ia64-*-linux*] \ - && ![istarget m68k-*-linux*] \ - && ![istarget mips*-*-irix5*] \ - && ![istarget mips*-*-linux*] \ - && ![istarget powerpc*-*-elf*] \ - && ![istarget powerpc*-*-linux*] \ - && ![istarget powerpc*-*-sysv4*] \ - && ![istarget sh\[34\]*-*-linux*] \ - && ![istarget sparc*-*-elf] \ - && ![istarget sparc*-*-solaris2*] \ +if { ![istarget alpha*-*-linux*] + && ![istarget arm*-*-linux*] + && ![istarget hppa*64*-*-hpux*] + && ![istarget hppa*-*-linux*] + && ![istarget i?86-*-sysv4*] + && ![istarget i?86-*-unixware] + && ![istarget i?86-*-elf*] + && ![istarget i?86-*-linux*] + && ![istarget i?86-*-gnu*] + && ![istarget ia64-*-elf*] + && ![istarget ia64-*-linux*] + && ![istarget m68k-*-linux*] + && ![istarget mips*-*-irix5*] + && ![istarget mips*-*-linux*] + && ![istarget powerpc*-*-elf*] + && ![istarget powerpc*-*-linux*] + && ![istarget powerpc*-*-sysv4*] + && ![istarget sh\[34\]*-*-linux*] + && ![istarget sparc*-*-elf] + && ![istarget sparc*-*-solaris2*] && ![istarget sparc*-*-linux*] } { return } -if { [istarget i?86-*-linux*aout*] \ - || [istarget i?86-*-linux*oldld*] \ - || [istarget m68k-*-linux*aout*] } { +if { [istarget *-*-linux*aout*] + || [istarget *-*-linux*oldld*] } { return } @@ -304,7 +303,7 @@ proc build_lib {test libname objs dynsymexp} { return } - if {![string match "" $dynsymexp] \ + if {![string match "" $dynsymexp] && ![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$dynsymexp]} { fail $test return @@ -382,9 +381,9 @@ if [istarget mips*-*-*] { catch "exec $CC $picflag" exec_output send_log "$exec_output\n" verbose "--" "$exec_output" - if { [string match "*illegal option*" $exec_output] \ - || [string match "*option ignored*" $exec_output] \ - || [string match "*unrecognized option*" $exec_output] \ + if { [string match "*illegal option*" $exec_output] + || [string match "*option ignored*" $exec_output] + || [string match "*unrecognized option*" $exec_output] || [string match "*passed to ld*" $exec_output] } { if [istarget *-*-sunos4*] { set picflag "-pic" diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 2aed89b07c..de8f892e0a 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -99,10 +99,10 @@ if [istarget "*-*-go32*"] { } if { !([istarget "i?86-*-elf*"] - || ([istarget "i?86-*-linux*"] + || (([istarget "i?86-*-linux*"] + || [istarget "i?86-*-gnu*"]) && ![istarget "*-*-*aout*"] && ![istarget "*-*-*oldld*"]) - || [istarget "i?86-*-gnu*"] || [istarget "x86_64-*-linux*"] || [istarget "amd64-*-linux*"]) } { return diff --git a/ld/testsuite/ld-ifunc/binutils.exp b/ld/testsuite/ld-ifunc/binutils.exp index d386035bdc..d24caf8edf 100644 --- a/ld/testsuite/ld-ifunc/binutils.exp +++ b/ld/testsuite/ld-ifunc/binutils.exp @@ -25,10 +25,10 @@ # STT_GNU_IFUNC symbols. if { !([istarget "i?86-*-elf*"] - || ([istarget "i?86-*-linux*"] + || (([istarget "i?86-*-linux*"] + || [istarget "i?86-*-gnu*"]) && ![istarget "*-*-*aout*"] && ![istarget "*-*-*oldld*"]) - || [istarget "i?86-*-gnu*"] || [istarget "x86_64-*-linux*"] || [istarget "amd64-*-linux*"]) } { return diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index 3ea434ad50..6c20dc079b 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -30,10 +30,10 @@ if {!(([istarget "i?86-*-*"] || [istarget "powerpc*-*-*"] || [istarget "sparc*-*-*"]) && ([istarget "*-*-elf*"] - || ([istarget "*-*-linux*"] + || (([istarget "*-*-linux*"] + || [istarget "*-*-gnu*"]) && ![istarget "*-*-*aout*"] - && ![istarget "*-*-*oldld*"]) - || ([istarget "*-*-gnu*"]))) } { + && ![istarget "*-*-*oldld*"]))) } { verbose "IFUNC tests not run - target does not support IFUNC" return } -- 2.34.1