[binutils-gdb] mips64*-linux-gnuabi64 ld tests

Alan Modra via Binutils-cvs <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=08a7d4a65aaf92a0f0836f316c1c7b828aa88d34

commit 08a7d4a65aaf92a0f0836f316c1c7b828aa88d34
Author: Alan Modra <[email protected]>
Date:   Thu Mar 19 19:38:58 2026 +1030

    mips64*-linux-gnuabi64 ld tests
    
    I noticed recently that my mips64-linux-gnuabi64 binutils build was
    not doing compiled ld tests due to check_compiler_available returning
    false, despite having a cross-compiler installed.  My compiler fails
    to build the test executable when both -mabi=n32 and -L options with
    the lib64 dir first are passed, complaining
    ld-new: .../lib64/libgcc_s.so.1: error adding symbols: file in wrong format
    
    The -mabi=n32 comes from config/default.exp, the -L options from
    genscripts.sh via libpath.exp.  The -mabi=n32 is wrong because
    contrary to the comment in default.exp, the abi64 compiler does not
    default to N32.  And the -L options interfere with the correct -L
    passed by the compiler for -mabi=n32.
    
            * testsuite/config/default.exp (mips64*-*-linux*): Do not
            supply -mabi=n32 for abi64 configuration.

Diff:
---
 ld/testsuite/config/default.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index ba73f11aeb1..8a67721fa4e 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -183,7 +183,7 @@ if {! [info exists env(CCC_OVERRIDE_OPTIONS)]} {
 # installed, but to the O32 ABI in the build tree, because of some
 # specs-file hacks.  Make sure we use an ABI that is compatible with
 # the one we expect.
-if {[istarget mips64*-*-linux*] &&
+if {[istarget mips64*-*-linux*] && ![istarget *abi64] &&
     (![board_info [target_info name] exists multilib_flags] ||
      ![string match "*-mabi" [board_info [target_info name] multilib_flags]])
    } {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.