From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1314) id C18323857C60; Wed, 1 Sep 2021 19:49:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C18323857C60 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andrew Pinski To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3301] Add MIPS Linux support to gcc.misc-tests/linkage.c (testsuite/51748) X-Act-Checkin: gcc X-Git-Author: Andrew Pinski X-Git-Refname: refs/heads/trunk X-Git-Oldrev: ece28da924ddda8b379c94c9df7cd01168f75fbb X-Git-Newrev: 852fdc23a20d07087b5908b57ae7725f435732d5 Message-Id: <20210901194916.C18323857C60@sourceware.org> Date: Wed, 1 Sep 2021 19:49:16 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 19:49:16 -0000 https://gcc.gnu.org/g:852fdc23a20d07087b5908b57ae7725f435732d5 commit r12-3301-g852fdc23a20d07087b5908b57ae7725f435732d5 Author: Andrew Pinski Date: Wed Sep 1 00:13:51 2021 +0000 Add MIPS Linux support to gcc.misc-tests/linkage.c (testsuite/51748) 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. Diff: --- gcc/testsuite/gcc.misc-tests/linkage.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp index afed2b811c9..2cb109e776e 100644 --- a/gcc/testsuite/gcc.misc-tests/linkage.exp +++ b/gcc/testsuite/gcc.misc-tests/linkage.exp @@ -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 ] {