On 09/26/2018 05:50 AM, Rainer Orth wrote: > Hi Sandra, > >> gdb.base/gnu-ifunc.exp doesn't fail gracefully on targets that don't >> support this feature -- on nios2-linux-gnu I've seen TCL errors from trying >> to copy the nonexistent shared library that fails to build to the target. > > I just tried the patch on Solaris which also doesn't have (and never > will have) ifunc support: unfortunately, there's still lots of noise in > gdb.sum: > > [snip] > > It would be good to further reduce this. > > Btw., shouldn't gdb.compile/compile-ifunc.exp get similar treatment? Yeah, although that test is broken for other reasons in my environment. >> I see that ld/testsuite/ld-ifunc/ifunc.exp explicitly lists all the targets >> where IFUNC is expected to work, but it seemed more maintainable to me to >> tweak these gdb tests to pay attention to the return status from trying to >> build the test cases. Is this OK to commit? > > gcc has gcc/testsuite/lib/target-supports.exp (check_ifunc_available) > instead, again a compile test instead of a hardcoded list. I wonder, > though, if it wouldn't be better to run such a check early in the two > gdb ifunc tests and skip them if that fails, rather than producing lots > of noise and UNSUPPORTED tests? Here's a revised patch that adapts the same compile test that gcc uses. Is this one OK? -Sandra