sparc64 for GNU/Linux

James Morrison ja2morri at csclub.uwaterloo.ca
Wed Oct 22 00:22:06 CEST 2003


 Hey,

  A 64 bit userland is now supported in GNU/Linux and will be available in
the next Debian stable release.  Anyway, to get gmp to build for sparc64
on GNU/Linux I needed the following patch.

James A. Morrison

--- configure.in.old	2003-10-21 23:10:56.000000000 -0400
+++ configure.in	2003-10-21 23:11:09.000000000 -0400
@@ -832,14 +832,6 @@
         esac
         ;;
 
-      # sparc64-*-linux-gnu is a misnomer, since there's no support for any
-      # 64-bit operations in user mode.  We assume that a future release
-      # will have some 64-bit support and that the gcc options will be the
-      # same as on solaris.
-      #
-      # cc -xarch actually controls the ABI, hence it must be v8 for 32-bit,
-      # even though the chip is v9.
-      #
       sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*)
         path="sparc32/v9 sparc32/v8 sparc32"
         extra_functions="udiv_fp"
@@ -849,6 +841,9 @@
         gcc_cflags="-g -O2 -Wa,-xarch=v8plus"
         gcc_cflags_cpu="-mcpu=ultrasparc -mcpu=v9 -mcpu=v8 -mv8"
 
+
+	# cc -xarch actually controls the ABI, hence it must be v8 for 32-bit,
+	# even though the chip is v9.
         cc_cflags="-xtarget=native -xarch=v8 -xO4"
 
         case $host in
@@ -867,8 +862,8 @@
             SPEED_CYCLECOUNTER_OBJ_64=sparcv9.lo
             cyclecounter_size_64=2
             ;;
-          *-*-*bsd*)
-            # NetBSD and OpenBSD sparc64
+          *-*-*bsd*|*-*-linux*)
+            # NetBSD, OpenBSD and GNU/Linux sparc64
             abilist="64"
             extra_functions=
             path="sparc64"


More information about the gmp-devel mailing list