cvs commit: ports/math/libgmp-freebsd Makefile

Marius Strobl marius at alchemy.franken.de
Tue Jul 1 04:30:21 PDT 2003


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 at 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 \


More information about the cvs-ports mailing list