diff -urN src/gdb/testsuite/lib/gdb.exp dev/gdb/testsuite/lib/gdb.exp --- src/gdb/testsuite/lib/gdb.exp 2007-04-02 05:53:41.000000000 +0200 +++ dev/gdb/testsuite/lib/gdb.exp 2007-05-16 09:56:44.000000000 +0200 @@ -1608,7 +1608,14 @@ # first. proc gdb_compile_shlib {sources dest options} { - set obj_options $options + + # Remove linker options from obj_options. + set obj_options "" + foreach obj $options { + if ![regexp {.*-Wl,*} $obj --] { + lappend obj_options $obj + } + } switch -glob [test_compiler_info] { "xlc-*" {