]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite: Also exclude `*-*-kfreebsd*-gnu' from STB_GNU_UNIQUE tests
authorMaciej W. Rozycki <macro@orcam.me.uk>
Thu, 23 Jul 2026 18:57:07 +0000 (19:57 +0100)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Thu, 23 Jul 2026 18:57:07 +0000 (19:57 +0100)
Fix commit 02e0be69012a ("mbind gas tests and supports_gnu_osabi
testsuite infrastructure") and also match `*-*-kfreebsd*-gnu' targets
when determining whether STB_GNU_UNIQUE binding is supported for
symbols.  These targets use the same BFD vectors as `*-*-freebsd*' do,
choosing ELFOSABI_FREEBSD, and therefore need to be treated analogously.

This fixes numerous regressions, e.g.:

mips-kfreebsd-gnu  -FAIL: weaken STB_GNU_UNIQUE symbols
mips-kfreebsd-gnu  -FAIL: strip on STB_GNU_UNIQUE
mips-kfreebsd-gnu  -FAIL: diagnostics for visibility directives
mips-kfreebsd-gnu  -FAIL: ld-unique/pr21529
mips-kfreebsd-gnu  -FAIL: Linker setting GNU OSABI on STB_GNU_UNIQUE symbol (PR 10549)

caused by the missing feature:

.../gas/testsuite/gas/elf/visibility.s:14: Error: symbol type "gnu_unique_object" is supported only by GNU targets

binutils/testsuite/lib/binutils-common.exp

index 3fd19e247ca863a211a56676e48f05358a217cce..3c7ca48dbe4038ab515d1a650cd81badb02f45d8 100644 (file)
@@ -308,7 +308,7 @@ proc is_elf_unused_section_symbols {} {
 # This require ELFOSABI_GNU, and `bfd_elf_final_link'.
 #
 proc supports_gnu_unique {} {
-    if { [istarget *-*-freebsd*] } {
+    if { [istarget *-*-freebsd*] || [istarget *-*-kfreebsd*-gnu] } {
        return 0
     }
     if { [supports_gnu_osabi] && ![is_generic] } {