mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
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
This commit is contained in:
parent
0f4a49c72c
commit
4601d4e923
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=97519
@ -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
|
||||
|
14
math/gmp/files/patch-longlong.h
Normal file
14
math/gmp/files/patch-longlong.h
Normal file
@ -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 */
|
||||
|
@ -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
|
||||
|
14
math/libgmp4/files/patch-longlong.h
Normal file
14
math/libgmp4/files/patch-longlong.h
Normal file
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user