Sun Studio 12 .. just for the heck of it ( again )

Dennis Clarke dclarke at blastwave.org
Mon Feb 20 16:29:15 CET 2012


> Dennis Clarke <dclarke at blastwave.org> writes:
>
>   Same as with this :
>
>      http://gmplib.org/list-archives/gmp-bugs/2011-June/002271.html
>
>   Sun Studio 12 simply will not compile GMP 5.0.4 and fails when it hits
>   isfuns.cc and needs to grok attribute malloc. Well the feature list at :
>
>       http://developers.sun.com/sunstudio/support/Ccompare.html
>
>   clearly says "Additions to the __attributes__ clause: always_inline,
> noinline,
>   pure, const, malloc, and aligned" are supported on Studio 12 and Studio 12
>   Update 1.
>
> Do the other attribute args work?  Perhaps there is a command line
> option for switching on and off attribute arg recognition?

Well, it turns out that config.h helps with :


/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */
#define HAVE_ATTRIBUTE_MALLOC 1

then in gmp-impl.h we see :

/* "malloc" means a function behaves like malloc in that the pointer it
   returns doesn't alias anything.  */
#if HAVE_ATTRIBUTE_MALLOC
#define ATTRIBUTE_MALLOC  __attribute__ ((malloc))
#else
#define ATTRIBUTE_MALLOC
#endif

So I can just -DHAVE_ATTRIBUTE_MALLOC=1 at which point configure goes
off into never never land to never return when it tries to check for
a C++ compiler. No really .. I watched for ten minutes as it got all
chewed up and stuck on a simple test. Be damned if I know why.

> It always creates headache when vendors of non-free compilers try to
> become GCC compatible.  Remember that Intel decided to define __GNUC__
> in their 'icc' compiler?

eek .. and of course they, in return, love to wave at C99 standards
and ISO/IEC 9899 and away we go into never never land as opposed to
solving the problem.

> (I don't plan to work on this problem, but I will applause others that
> do.)

I'm just trying to stare it down at the moment. Thus far I have
blinked twice. At least.

I'll get you some gmpbence results for a Niagara T5220 as soon as I
get over these little issues and just use GCC 4.6.2.

Dennis


-- 
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke           | Solaris and Linux and Open Source |
| dclarke at blastwave.org   | Respect for open standards.       |
+-------------------------+-----------------------------------+



More information about the gmp-bugs mailing list