Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282819 - dev-libs/gmp-4.3.1 requires minor patch for IRIX
Summary: dev-libs/gmp-4.3.1 requires minor patch for IRIX
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-26 17:17 UTC by Stuart Shelton
Modified: 2011-12-15 18:14 UTC (History)
0 users

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


Attachments
Correct stdarg.h/stdint.h IRIX problems (gmp-4.3.1-irix.patch,996 bytes, patch)
2009-09-29 10:17 UTC, Stuart Shelton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2009-08-26 17:17:55 UTC
--- gmp-impl.h.dist
+++ gmp-impl.h
@@ -114,6 +114,10 @@
 # endif
 #endif
 
+#ifdef __sgi             /* stdint.h is C99-only */
+typedef unsigned int uint_least32_t;
+#endif
+
 #ifdef __cplusplus
 #include <cstring>  /* for strlen */
 #include <string>   /* for std::string */

--- gmp.h.dist
+++ gmp.h
@@ -353,6 +353,14 @@
 #define _GMP_H_HAVE_VA_LIST 1
 #endif
 
+/* On IRIX, the va_list defintion can somehow get lost, even if <stdarg.h>
+   or <varargs.h> is included - (re)defining it here shouldn't break anything
+   and prevents build errors, although it is noisy.  */
+
+#ifdef __sgi
+typedef char *va_list;
+#endif
+
 /* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
 #if defined (__GNUC__) && defined (__GNUC_MINOR__)
 #define __GMP_GNUC_PREREQ(maj, min) \
Comment 1 Fabian Groffen gentoo-dev 2009-09-25 16:24:07 UTC
[tefnut:gmp-4.3.1/work/gmp-4.3.1] % find . -name gmp.h
[tefnut:gmp-4.3.1/work/gmp-4.3.1] % 

and for the Xth time, please attach a patch, your patch copied and pasted doesn't apply, which doesn't help me spend my time well, and doesn't help you get the patch in the tree.  Thanks.
Comment 2 Stuart Shelton 2009-09-29 10:17:39 UTC
Created attachment 205573 [details, diff]
Correct stdarg.h/stdint.h IRIX problems


... to be fair, it wouldn't have worked even if I had attached a file ;)

gmp.h is generated from gmp-h.in during the build process - and I patched a previously failed build, and so didn't notice that thie file was new.
Comment 3 SpanKY gentoo-dev 2010-01-08 13:41:11 UTC
gmp already makes an attempt at defining uint_least32_t when C99 isnt available.  throwing a typedef into the header kind of defeats that.
Comment 4 Stuart Shelton 2010-01-08 14:44:31 UTC
(In reply to comment #3)
> gmp already makes an attempt at defining uint_least32_t when C99 isnt
> available.  throwing a typedef into the header kind of defeats that.
> 

I'd agree if it worked - but the code builds on IRIX with this patch, and doesn't without.  Go figure...

(Note that the IRIX platform compilers are C99-compliant, but not GNU-compliant.  Also, given that C99 is a C standard and not a C++ standard, anything built with CC/$CXX will not accept C99 syntax.  This can be a problem when configure runs with cc/$CC and finds C99 compliance, but then builds with CC/$CXX and it is not longer available.  I'm not sure if that's the problem in this case, though...)
Comment 5 Fabian Groffen gentoo-dev 2011-12-15 18:14:38 UTC
We are sorry to close this bug.  We lack the man-power and devotion to support mips-irix in the tree.