[RFA] Handle unsupported "-shared" in gdb1555.exp test

Daniel Jacobowitz drow@false.org
Wed Feb 25 05:19:00 GMT 2004


On Tue, Feb 24, 2004 at 09:57:59PM -0700, Fred Fish wrote:
> There are 8 gdb tests that attempt to create a shared file using the
> "-shared" option:
> 
> 	gdb.base/gdb1555.exp
> 	gdb.base/pending.exp
> 	gdb.base/shlib-call.exp
> 	gdb.base/shreloc.exp:51
> 	gdb.base/so-impl-ld.exp
> 	gdb.base/so-indr-cl.exp
> 	gdb.base/solib.exp:101
> 	gdb.threads/tls-shared.exp
> 
> All of them, with the exception of gdb1555.exp and tls-shared.exp,
> first do some test to see if this is expected to work for the target.

This suggests that we need code in lib/gdb.exp to:
  - check whether shared library tests should be run
  - build shared libraries

> I propose that the gdb1555.exp test use the "isnative" check.
> Attached is a patch for review and comment.

Please don't.  I run cross-debugger tests which should test shared
library support on a regular basis.  I know this disagrees with prior
art in the testsuite, but I would prefer not to propogate it further.

How about something like:
proc gdb_compile_solib { whatever } {
  if {[istarget whatever]} {
    return -1
  }
  whatever
}

and using that to issue an unsupported (or silently return, I don't
know which is the accepted practice).

An alternative would be inclusive lists: {[istarget *-*-linux*] ||
[istarget *-*-bsd*] || ...} and so on as we teach the function how to
build shared libraries in different settings.  This might be the best
idea.


It is at this point that in any conversation about building shared
librares that someone should normally suggest making the testsuite use
libtool.  I give advance warning that I will do my worst to anyone who
makes such a suggestion.  Libtool is a disgusting pile of dung.  That's
my opinion and I'll stand by it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list