Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29201 - dev-libs/gmp: add amd64 support
Summary: dev-libs/gmp: add amd64 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-20 09:45 UTC by Kenneth Ayers
Modified: 2015-04-08 06:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for longlong.h (longlong.patch,473 bytes, patch)
2003-10-14 15:57 UTC, Ray Russell Reese III (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Ayers 2003-09-20 09:45:29 UTC
Here is a patch to make gmp compile on amd64 using a patch from the gmp website. 

--- gmp-4.1.2.ebuild.old        2003-09-20 12:39:42.153614384 +0000
+++ gmp-4.1.2.ebuild    2003-09-20 12:42:14.279487736 +0000
@@ -11,13 +11,17 @@ SRC_URI="mirror://gnu/gmp/${P}.tar.gz"
 
 LICENSE="LGPL-2"
 SLOT="0"
-KEYWORDS="~x86 ~ppc ~sparc alpha"
+KEYWORDS="~x86 ~ppc ~sparc alpha amd64"
 
 DEPEND="~sys-devel/m4-1.4"
 
 src_compile() {
        elibtoolize
 
+       if [ `use amd64` ]; then
+               epatch ${FILESDIR}/longlong.patch || die "patch failed"
+       fi
+
        local myconf=""
        use sparc || myconf="--enable-mpfr"

and the patch file longlong.patch

--- 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 */
Comment 1 Ray Russell Reese III (RETIRED) gentoo-dev 2003-10-14 15:57:24 UTC
Created attachment 19239 [details, diff]
Patch for longlong.h

I've redone the patch and attached it as a file because I couldn't get the
inline pasted patch to properly work. More than likely a whitespace issue,
this
patch that is attached however works perfectly and has been tested on an
AMD64
box. Thanks
Comment 2 Daniel Robbins (RETIRED) gentoo-dev 2003-10-16 09:42:11 UTC
committed, thanks guys