public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ld/testsuite: skip ld-size when -shared is not supported
@ 2022-11-09 16:26 Clément Chigot
  2022-11-09 21:37 ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Clément Chigot @ 2022-11-09 16:26 UTC (permalink / raw)
  To: binutils; +Cc: Clément Chigot

ld/ChangeLog:

        * testsuite/ld-size/size.exp: Skip when -shared is not
	supported.
---
 ld/testsuite/ld-size/size.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ld/testsuite/ld-size/size.exp b/ld/testsuite/ld-size/size.exp
index e15962886cd..64793c00948 100644
--- a/ld/testsuite/ld-size/size.exp
+++ b/ld/testsuite/ld-size/size.exp
@@ -33,6 +33,12 @@ if {!(([istarget "i?86-*-*"]
     return
 }
 
+# Skip when -shared is not supported
+if { ![check_shared_lib_support] } {
+    verbose "Size relocation tests not run - shared support disabled"
+    return
+}
+
 # So as to avoid rewriting every last test case here in a nacl variant,
 # we use black magic to massage the generic cases into nacl-variant cases.
 if [istarget "*-*-nacl*"] {
-- 
2.25.1


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

* Re: [PATCH] ld/testsuite: skip ld-size when -shared is not supported
  2022-11-09 16:26 [PATCH] ld/testsuite: skip ld-size when -shared is not supported Clément Chigot
@ 2022-11-09 21:37 ` Alan Modra
  2022-11-10  7:54   ` Clément Chigot
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2022-11-09 21:37 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On Wed, Nov 09, 2022 at 05:26:11PM +0100, Clément Chigot via Binutils wrote:
>         * testsuite/ld-size/size.exp: Skip when -shared is not
> 	supported.

What does this catch that isn't already covered by the target test?

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [PATCH] ld/testsuite: skip ld-size when -shared is not supported
  2022-11-09 21:37 ` Alan Modra
@ 2022-11-10  7:54   ` Clément Chigot
  2022-11-10  9:00     ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: Clément Chigot @ 2022-11-10  7:54 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

On Wed, Nov 9, 2022 at 10:37 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Wed, Nov 09, 2022 at 05:26:11PM +0100, Clément Chigot via Binutils wrote:
> >         * testsuite/ld-size/size.exp: Skip when -shared is not
> >       supported.
>
> What does this catch that isn't already covered by the target test?

It does in a wide approach. But it doesn't allow custom targets (as I
do) where shared support is explicitly disabled.
It might not have a big impact but it looks logical to me to check for
-shared (both linker and compiler by the way) before running any tests
related to that.
I've pushed other similar patches recently (see ld-arm or ld-shared).

Thanks,
Clément

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

* Re: [PATCH] ld/testsuite: skip ld-size when -shared is not supported
  2022-11-10  7:54   ` Clément Chigot
@ 2022-11-10  9:00     ` Alan Modra
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2022-11-10  9:00 UTC (permalink / raw)
  To: Clément Chigot; +Cc: binutils

On Thu, Nov 10, 2022 at 08:54:04AM +0100, Clément Chigot wrote:
> On Wed, Nov 9, 2022 at 10:37 PM Alan Modra <amodra@gmail.com> wrote:
> >
> > On Wed, Nov 09, 2022 at 05:26:11PM +0100, Clément Chigot via Binutils wrote:
> > >         * testsuite/ld-size/size.exp: Skip when -shared is not
> > >       supported.
> >
> > What does this catch that isn't already covered by the target test?
> 
> It does in a wide approach. But it doesn't allow custom targets (as I
> do) where shared support is explicitly disabled.
> It might not have a big impact but it looks logical to me to check for
> -shared (both linker and compiler by the way) before running any tests
> related to that.
> I've pushed other similar patches recently (see ld-arm or ld-shared).

OK, the patch is fine.

-- 
Alan Modra
Australia Development Lab, IBM

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

end of thread, other threads:[~2022-11-10  9:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 16:26 [PATCH] ld/testsuite: skip ld-size when -shared is not supported Clément Chigot
2022-11-09 21:37 ` Alan Modra
2022-11-10  7:54   ` Clément Chigot
2022-11-10  9:00     ` Alan Modra

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).