diff options
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/linkage.exp')
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/linkage.exp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp index 785b1f1e77f..a58fea6b2f9 100644 --- a/gcc/testsuite/gcc.misc-tests/linkage.exp +++ b/gcc/testsuite/gcc.misc-tests/linkage.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 90-96, 1997, 2000 Free Software Foundation, Inc. +# Copyright (C) 1988, 90-96, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,12 +24,25 @@ if [isnative] then { fail "linkage.c" } else { # This is a completely bogus test. Sorry. + + # Need to ensure ABI for native compiler matches gcc + set native_cflags "" + if [istarget "mips-sgi-irix6*"] { + set file_string [exec file "linkage-x.o"] + if [ string match "*64*" $file_string ] { + set native_cflags "-64" + } + if [ string match "*N32*" $file_string ] { + set native_cflags "-n32" + } + } + catch { exec rm -f linkage-y.o } - send_log "cc -c $srcdir/$subdir/linkage-y.c >&/dev/null\n" - catch { exec cc -c "$srcdir/$subdir/linkage-y.c" >&/dev/null } + send_log "cc -c $native_cflags $srcdir/$subdir/linkage-y.c >&/dev/null\n" + catch { exec cc -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null } if ![file exists "linkage-y.o"] then { - send_log "c89 -c $srcdir/$subdir/linkage-y.c >&/dev/null\n" - catch { exec c89 -c "$srcdir/$subdir/linkage-y.c" >&/dev/null } + send_log "c89 -c $native_cflags $srcdir/$subdir/linkage-y.c >&/dev/null\n" + catch { exec c89 -c $native_cflags "$srcdir/$subdir/linkage-y.c" >&/dev/null } } if [file exists "linkage-y.o"] then { set lines [gcc_target_compile "linkage-y.o linkage-x.o" "x" executable ""] |