This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] False failure of test linkage.c for irix6.5 -mabi=64
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Subject: [PATCH] False failure of test linkage.c for irix6.5 -mabi=64
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- Date: Wed, 23 May 2001 07:37:17 -0000
This fixes a false fail of test linkage.c on mips-sgi-irix-6.5 with
-mabi=64.
gcc -mabi=64 -c linkage-x.c
cc linkage-y.c
and you can't link -64 and -n32 object files.
Tested on mips-sgi-irix6.5 with --target_board "unix{,-mabi=64}" . If
anyone knows a better way to find out the compiler flags used to compile
linkage-x.c then please let me know.
Please apply if OK.
2001-05-23 David.Billinghurst <David.Billinghurst@riotinto.com>
* gcc.misc-tests/linkage.exp: Pass appropriate flags to native
compiler for irix6.5
Index: linkage.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.misc-tests/linkage.exp,v
retrieving revision 1.2
diff -u -r1.2 linkage.exp
--- linkage.exp 2001/02/08 02:29:38 1.2
+++ linkage.exp 2001/05/23 07:11:04
@@ -24,12 +24,21 @@
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*"] {
+ if [ string match "*64*" [exec file "linkage-x.o"] ] {
+ set native_cflags "-64"
+ }
+ }
+
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 }
+ 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 ""]