From 14f2c476752f3cc4bfa7baee2a5a5183aafad975 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 31 Oct 2013 19:30:24 +1030 Subject: [PATCH] ld crossref test fix * ld-scripts/crossref.exp: Don't allow changes made to CFLAGS for this test to bleed into following tests. Don't set -mcall-aixdesc for powerpc64le. --- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-scripts/crossref.exp | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 369333a..213a909 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-11-04 Alan Modra + + * ld-scripts/crossref.exp: Don't allow changes made to CFLAGS + for this test to bleed into following tests. Don't set + -mcall-aixdesc for powerpc64le. + 2013-11-02 Alan Modra * ld-pe/cfi.d: Allow wide display of addresses. diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp index 061b5aa..01fdeb4 100644 --- a/ld/testsuite/ld-scripts/crossref.exp +++ b/ld/testsuite/ld-scripts/crossref.exp @@ -31,9 +31,11 @@ if { ![is_remote host] && [which $CC] == 0 } { return } +global CFLAGS +set old_CFLAGS "$CFLAGS" + # Xtensa targets currently default to putting literal values in a separate # section and that requires linker script support, so put literals in text. -global CFLAGS if [istarget xtensa*-*-*] { set CFLAGS "$CFLAGS -mtext-section-literals" } @@ -41,7 +43,7 @@ if [istarget xtensa*-*-*] { # If we have a compiler that doesn't use/reference dot-symbols, then # calls to functions reference the .opd section function descriptor. # This makes NOCROSSREFS rather useless on powerpc64. -if [istarget powerpc64*-*-*] { +if [istarget powerpc64-*-*] { set CFLAGS "$CFLAGS -mcall-aixdesc" } @@ -61,6 +63,7 @@ if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \ || ![ld_compile $CC "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } { unresolved $test1 unresolved $test2 + set CFLAGS "$old_CFLAGS" return } @@ -95,6 +98,7 @@ if [string match "" $exec_output] then { if { ![ld_compile $CC "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } { unresolved $test2 + set CFLAGS "$old_CFLAGS" return } @@ -118,11 +122,13 @@ if [string match "" $exec_output] then { if { ![ld_compile $CC "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } { unresolved $test3 + set CFLAGS "$old_CFLAGS" return } if ![ld_relocate $ld tmpdir/cross3-partial.o "tmpdir/cross1.o tmpdir/cross4.o"] { unresolved $test3 + set CFLAGS "$old_CFLAGS" return } @@ -138,3 +144,5 @@ if [string match "" $exec_output] then { verbose -log "$exec_output" fail $test3 } + +set CFLAGS "$old_CFLAGS" -- 2.7.4