[binutils-gdb] testsuite: Also exclude `*-*-kfreebsd*-gnu' from STB_GNU_UNIQUE tests

Maciej W. Rozycki macro@sourceware.org
Thu Jul 23 18:58:34 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ae94fe0664f7801cdf0f485d7632186fa1859719

commit ae94fe0664f7801cdf0f485d7632186fa1859719
Author: Maciej W. Rozycki <macro@orcam.me.uk>
Date:   Thu Jul 23 19:57:07 2026 +0100

    testsuite: Also exclude `*-*-kfreebsd*-gnu' from STB_GNU_UNIQUE tests
    
    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

Diff:
---
 binutils/testsuite/lib/binutils-common.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 3fd19e247ca..3c7ca48dbe4 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -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] } {


More information about the Binutils-cvs mailing list