public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ld: testsuite: Filter unique.exp cases for shared lib capability
@ 2017-01-17 20:08 Dimitar Dimitrov
  2017-01-18 12:25 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Dimitar Dimitrov @ 2017-01-17 20:08 UTC (permalink / raw)
  To: binutils; +Cc: Dimitar Dimitrov

This patch fixes testsuite failures on PRU (an embedded target). I did not notice any new testsuite regressions on x86_64.

ld/

2017-01-17  Dimitar Dimitrov  <dimitar@dinux.eu>

	* testsuite/ld-unique/unique.exp: Filter shared lib cases in uniqeue.exp, as not all targets have such support.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 ld/testsuite/ld-unique/unique.exp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp
index 668ac95377..15566d4214 100644
--- a/ld/testsuite/ld-unique/unique.exp
+++ b/ld/testsuite/ld-unique/unique.exp
@@ -109,7 +109,7 @@ if ![ld_compile "$CC -c" "$srcdir/$subdir/unique_empty.s" "tmpdir/unique_empty.o
 }
 
 # Create pic object file containing unique symbol.
-if ![ld_compile "$CC -c -fPIC" "$srcdir/$subdir/unique_shared.s" "tmpdir/unique_shared.o"] {
+if { [check_shared_lib_support] && ![ld_compile "$CC -c -fPIC" "$srcdir/$subdir/unique_shared.s" "tmpdir/unique_shared.o"] } {
     fail "Could not create a pic unique object"
     set fails [expr $fails + 1]
 }
@@ -121,19 +121,19 @@ if ![ld_link $CC "tmpdir/unique_prog" "tmpdir/unique.o"] {
 }
 
 # Create shared library containing unique symbol.
-if ![ld_link $ld "tmpdir/libunique_shared.so" "-shared tmpdir/unique_shared.o"] {
+if { [check_shared_lib_support] && ![ld_link $ld "tmpdir/libunique_shared.so" "-shared tmpdir/unique_shared.o"] } {
     fail "Could not create a shared library containing an unique symbol"
     set fails [expr $fails + 1]
 }
 
 # Create executable NOT containing unique symbol linked against library.
-if ![ld_link $CC "tmpdir/unique_shared_prog" "-Ltmpdir tmpdir/unique_empty.o -Wl,-Bdynamic,-rpath=./tmpdir -lunique_shared"] {
+if { [check_shared_lib_support] && ![ld_link $CC "tmpdir/unique_shared_prog" "-Ltmpdir tmpdir/unique_empty.o -Wl,-Bdynamic,-rpath=./tmpdir -lunique_shared"] } {
     fail "Could not link a dynamic executable"
     set fails [expr $fails + 1]
 }
 
 # Create shared library containing unique symbol with reference.
-if ![ld_link $ld "tmpdir/libunique_shared_ref.so" "-shared tmpdir/unique_shared.o tmpdir/unique_empty.o"] {
+if { [check_shared_lib_support] && ![ld_link $ld "tmpdir/libunique_shared_ref.so" "-shared tmpdir/unique_shared.o tmpdir/unique_empty.o"] } {
     fail "Could not create a shared library containing an unique symbol with reference"
     set fails [expr $fails + 1]
 }
@@ -191,6 +191,11 @@ if { $fails == 0 } {
   pass "Checking empty unique object"
 }
 
+# Only shared library tests below.
+if { ![check_shared_lib_support] } {
+    return
+}
+
 # Check the unique PIC file.
 if {! [check_osabi tmpdir/unique_shared.o {UNIX - GNU}]} {
     fail "PIC Object containing unique does not have an OS/ABI field of GNU"
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ld: testsuite: Filter unique.exp cases for shared lib capability
  2017-01-17 20:08 [PATCH] ld: testsuite: Filter unique.exp cases for shared lib capability Dimitar Dimitrov
@ 2017-01-18 12:25 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2017-01-18 12:25 UTC (permalink / raw)
  To: Dimitar Dimitrov, binutils

Hi Dimitar,

> 2017-01-17  Dimitar Dimitrov  <dimitar@dinux.eu>
> 
> 	* testsuite/ld-unique/unique.exp: Filter shared lib cases in uniqeue.exp, as not all targets have such support.

Approved and applied.

Cheers
  Nick



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-18 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 20:08 [PATCH] ld: testsuite: Filter unique.exp cases for shared lib capability Dimitar Dimitrov
2017-01-18 12:25 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).