bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

4.1.3 PATCH: Fix configure error for IRIX 5/IRIX 6 O32


From: Rainer Orth
Subject: 4.1.3 PATCH: Fix configure error for IRIX 5/IRIX 6 O32
Date: Fri, 30 Apr 2004 04:29:31 +0200 (MEST)

I just tried to build gmp 4.1.3 on IRIX 5.3 with gcc 2.95.  Initially,
configure aborted like this:

checking if globals are prefixed by underscore... 
configure: error: Test program links neither with nor without underscore.

Running the test manually revealed that even trying to link with the
correct version of conftes2.s (i.e. the one without the leading underscore)
failed.  Investigating further with a compiler-generated variant revealed
that for the O32 ABI (both on IRIX 5.3 and 6.5) the underscore_test
function must not be empty.  To achieve this, I've added the final j $31
instruction from the compiler-generated .s file.  This way, the test
correctly detected that this platform needs no leading underscores.

The following patch implements this.  It adds this instruction for all
mips*-sgi-irix[56]* hosts, since I have verified that the test still works
correctly for the N32 and N64 ABIs, too.

Apart from this fix (which allowed gmp 4.1.3 to configure and build
correctly on IRIX 5.3 and let make check pass), I noticed that irix[6789]
wasn't quoted correctly in one place, yielding irix6789 without the angle
brackets in configure.  The patch below fixes this problem, too.

        Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University



Fri Apr 30 00:46:52 2004  Rainer Orth  <address@hidden>

        * configure.in: Correctly quote mips*-*-irix[6789]*.
        * acinclude.m4 (GMP_ASM_UNDERSCORE): Append j $31 to conftes2.s on
        IRIX 5/6.
        * aclocal.m4, configure: Regenerate.

===================================================================
RCS file: RCS/acinclude.m4,v
retrieving revision 1.1
diff -up -r1.1 acinclude.m4
--- acinclude.m4        2002/09/08 00:02:19     1.1
+++ acinclude.m4        2004/04/30 02:20:15
@@ -1009,6 +1009,13 @@ EOF
 .${tmp_underscore}underscore_test$gmp_cv_asm_label_suffix
 EOF
     ;;
+  # A text label without code lets the link test fail for the O32 ABI on
+  # IRIX 5/6
+  mips*-sgi-irix[[56]]*)
+    cat >>conftes2.s <<\EOF
+       j       [$]31
+EOF
+    ;;
   esac
   gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftes1.c >&AC_FD_CC && $CCAS $CFLAGS 
conftes2.s >&AC_FD_CC && $CC $CFLAGS conftes1.$OBJEXT conftes2.$OBJEXT 
>&AC_FD_CC"
   if AC_TRY_EVAL(gmp_compile); then
===================================================================
RCS file: RCS/configure.in,v
retrieving revision 1.1
diff -up -r1.1 configure.in
--- configure.in        2004/04/22 17:02:59     1.1
+++ configure.in        2004/04/30 01:31:53
@@ -627,7 +627,7 @@ case $host in
     GMP_INCLUDE_MPN(mips32/mips-defs.m4)
 
     case $host in
-      mips64*-*-* | mips*-*-irix[6789]*)
+      mips64*-*-* | mips*-*-irix[[6789]]*)
         abilist="n32 64 o32"
 
         cclist_n32="gcc cc"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]