aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-01-07 08:35:40 +0800
committeredwin <edwin@FreeBSD.org>2004-01-07 08:35:40 +0800
commita08f3fef2ad2b19b42b937f51d3b7d461c5e9a89 (patch)
tree74a5789d7b36aa357442ee062f11380bf1d47437
parente75a34286c579c032e8bf1e858476567766ec77a (diff)
downloadfreebsd-ports-gnome-a08f3fef2ad2b19b42b937f51d3b7d461c5e9a89.tar.gz
freebsd-ports-gnome-a08f3fef2ad2b19b42b937f51d3b7d461c5e9a89.tar.zst
freebsd-ports-gnome-a08f3fef2ad2b19b42b937f51d3b7d461c5e9a89.zip
Fix build of math/libgmp4 on AMD64 systems
On Opteron/AMD64 systems with GCC, count_trailing_zeros in longlong.h may cause errors from the assembler about incorrect registers used with bsfq. Submitted by: edwin@mavetju.org Approved by: Alex Dupre <sysadmin@alexdupre.com> Obtained from: http://www.swox.com/gmp/#STATUS
-rw-r--r--math/gmp/Makefile2
-rw-r--r--math/gmp/files/patch-longlong.h14
-rw-r--r--math/libgmp4/Makefile2
-rw-r--r--math/libgmp4/files/patch-longlong.h14
4 files changed, 30 insertions, 2 deletions
diff --git a/math/gmp/Makefile b/math/gmp/Makefile
index f77aeda14079..9e1a9a0e46d9 100644
--- a/math/gmp/Makefile
+++ b/math/gmp/Makefile
@@ -8,7 +8,7 @@
PORTNAME= libgmp
PORTVERSION= 4.1.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= math devel
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gmp
diff --git a/math/gmp/files/patch-longlong.h b/math/gmp/files/patch-longlong.h
new file mode 100644
index 000000000000..105464b6ae63
--- /dev/null
+++ b/math/gmp/files/patch-longlong.h
@@ -0,0 +1,14 @@
+--- longlong.h.old 2003-07-29 17:10:52.000000000 +1000
++++ longlong.h 2003-07-29 17:12:16.000000000 +1000
+@@ -715,8 +715,10 @@
+ } while (0)
+ #define count_trailing_zeros(count, x) \
+ do { \
++ UDItype __cbtmp; \
+ ASSERT ((x) != 0); \
+- __asm__ ("bsfq %1,%0" : "=r" (count) : "rm" ((UDItype)(x))); \
++ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
++ (count) = __cbtmp; \
+ } while (0)
+ #endif /* x86_64 */
+
diff --git a/math/libgmp4/Makefile b/math/libgmp4/Makefile
index f77aeda14079..9e1a9a0e46d9 100644
--- a/math/libgmp4/Makefile
+++ b/math/libgmp4/Makefile
@@ -8,7 +8,7 @@
PORTNAME= libgmp
PORTVERSION= 4.1.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= math devel
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gmp
diff --git a/math/libgmp4/files/patch-longlong.h b/math/libgmp4/files/patch-longlong.h
new file mode 100644
index 000000000000..105464b6ae63
--- /dev/null
+++ b/math/libgmp4/files/patch-longlong.h
@@ -0,0 +1,14 @@
+--- longlong.h.old 2003-07-29 17:10:52.000000000 +1000
++++ longlong.h 2003-07-29 17:12:16.000000000 +1000
+@@ -715,8 +715,10 @@
+ } while (0)
+ #define count_trailing_zeros(count, x) \
+ do { \
++ UDItype __cbtmp; \
+ ASSERT ((x) != 0); \
+- __asm__ ("bsfq %1,%0" : "=r" (count) : "rm" ((UDItype)(x))); \
++ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
++ (count) = __cbtmp; \
+ } while (0)
+ #endif /* x86_64 */
+