]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add MIPS Linux support to gcc.misc-tests/linkage.c (testsuite/51748)
authorAndrew Pinski <apinski@marvell.com>
Wed, 1 Sep 2021 00:13:51 +0000 (00:13 +0000)
committerAndrew Pinski <apinski@marvell.com>
Wed, 1 Sep 2021 19:48:17 +0000 (19:48 +0000)
This adds MIPS Linux support to gcc.misc-tests/linkage.exp.  Basically
copying what was done for MIPS IRIX and changing the options to be correct.

OK?

gcc/testsuite/ChangeLog:

PR testsuite/51748
* gcc.misc-tests/linkage.exp: Add mips*-linux-* support.

gcc/testsuite/gcc.misc-tests/linkage.exp

index afed2b811c98e515e44598e643d9ec6ed9bedc9f..2cb109e776ea6cc2411802ecf0594d5683c5879d 100644 (file)
@@ -38,6 +38,18 @@ if { [isnative] && ![is_remote host] } then {
 
        # Need to ensure ABI for native compiler matches gcc
        set native_cflags ""
+       if  [istarget "mips*-linux*"] {
+           set file_string [exec file "linkage-x.o"]
+           if [ string match "*64*" $file_string ] {
+               set native_cflags "-mabi=64"
+           }
+           if [ string match "*ELF 32*" $file_string ] {
+               set native_cflags "-mabi=32"
+           }
+           if [ string match "*N32*" $file_string ] {
+               set native_cflags "-mabi=n32"
+           }
+       }
        if  [istarget "sparc*-sun-solaris2*"] {
            set file_string [exec file "linkage-x.o"]
            if [ string match "*64*" $file_string ] {