Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2003 13:30:13 +0200
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        ports-committers@freebsd.org
Subject:   Re: cvs commit: ports/math/libgmp-freebsd Makefile
Message-ID:  <20030701133013.D39144@newtrinity.zeist.de>
In-Reply-To: <20030701130549.53a72552.Alexander@Leidinger.net>; from Alexander@Leidinger.net on Tue, Jul 01, 2003 at 01:05:49PM %2B0200
References:  <200307010950.h619o3Fo009332@repoman.freebsd.org> <20030701130549.53a72552.Alexander@Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 01, 2003 at 01:05:49PM +0200, Alexander Leidinger wrote:
> On Tue, 1 Jul 2003 02:50:03 -0700 (PDT)
> Alexander Leidinger <netchild@FreeBSD.org> wrote:
> 
> >   Modified files:
> >     math/libgmp-freebsd  Makefile 
> >   Log:
> >    - add CONFLICTS
> >    - build only for alpha and i386
> >      sparc64: may compile with some fixes, but has bugs in the assembly code
> 
> This means, that it should be easy to fix sparc64 compile time problems,

It is, see patch below.

> but the assembly code is wrong and needs a complete rewrite. You better
> use libgmp4 instead of fixing it.
> 

I'm not sure if a complete rewrite is needed but it's at least broken.
That's probably because at the time libgmp2 (which libgmp-freebsd is)
was written the sparcv9 support of GCC was in its early stages and
therefore also not really supported by libgmp. The assembly code of
libgmp4 (which works without problems on sparc64) has diverge to
much that one could easily spot how it was fixed and back-port it to
libgmp-freebsd. IMO it's not worth spending time trying to fix
libgmp-freebsd. The right thing to do should be to convert the
remaining ports that depend on libgmp-freebsd to libgmp4 and de-orbit
the former, especially as there are other platforms like ia64 and ppc
that may well be broken with libgmp-freebsd or are totally unsupported
like amd64.

Index: patch-Makefile
===================================================================
RCS file: /usr/data/bsd/cvs/fbsd/ports/math/libgmp-freebsd/files/patch-Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-Makefile
--- patch-Makefile	28 Aug 2001 16:31:18 -0000	1.1
+++ patch-Makefile	24 Jun 2003 12:03:04 -0000
@@ -1,9 +1,22 @@
-
-$FreeBSD: ports/math/libgmp-freebsd/files/patch-Makefile,v 1.1 2001/08/28 16:31:18 sobomax Exp $
-
---- Makefile	2001/08/28 16:21:28	1.1
-+++ Makefile	2001/08/28 16:21:41
-@@ -145,7 +145,7 @@
+--- Makefile.orig	Tue Aug 28 18:01:54 2001
++++ Makefile	Tue Jun 24 14:02:41 2003
+@@ -37,7 +37,14 @@
+ 
+ MPN_SRC_ASM=	add_n.S lshift.S rshift.S sub_n.S
+ 
+-.elif ${MACHINE_ARCH} == "arm32" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "ppc" ||  ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
++.elif ${MACHINE_ARCH} == "sparc64"
++.PATH: ${GMPDIR}/mpn/sparc64 ${GMPDIR}/mpn/generic
++
++CFLAGS+=	-I${GMPDIR}/mpn/sparc64
++
++MPN_SRC_ASM=	add_n.s addmul_1.s lshift.s mul_1.s rshift.s sub_n.s submul_1.s
++
++.elif ${MACHINE_ARCH} == "arm32" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "ppc" ||  ${MACHINE_ARCH} == "sparc"
+ .PATH: ${GMPDIR}/mpn/generic
+ 
+ MPN_SRC_ASM=
+@@ -145,7 +152,7 @@
  
  beforeinstall:
  	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030701133013.D39144>