Subject: Re: cross compile on solaris fails using SunStudio Compiler
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 09/05/2006 20:55:36
On Tue, Sep 05, 2006 at 06:37:49PM +0100, David Laight wrote:
> On Tue, Sep 05, 2006 at 05:02:22PM +0200, Kurt Schreiner wrote:
> > 
> > Looking at src/sys/fs/cd9660/iso.h I see a lot of
> > 
> >    174  static __inline int isonum_711(u_char *) __attribute__ ((unused));
> > 
> > Is __inline a gcc-ism (or NetBSD-ism?) or should the SunStudio11 cc crock
> > this?
> 
> IIRC __inline is a gcc-ism, because 'inline' was a valid user variable name
> before being added to C (posibly via C++) in C99.
> Possibly _inline is valid, in any case a simple #define will suffice.
Ok, will try to #define __inline _inline and see what gives.

> The  '__attribute__ ((unused))' is definitely a gcc-ism.
> One of the NetBSD header files (maybe sys/cdefs.h) might contain something
> that should be used instead of '__attribute__ ((unused))' so that it
> can be #defined to the appropraite string (if any) for the compiler.
Hm, ok. I think there may be more uses of '__attribute__ ((unused))' in the
code which was compiled allready....
 
> OTOH it isn't obvious that the object files generated by sun's compiler
> are useful to you - except for building tools to run under solaris (or
> maybe linux).
Yep. I'm trying to build the tools using sun's compiler - just installed
the newest version form Aug 28 or so ;-)

> Sun's compiler does, however, support some gcc-isms (and M$ isms) but
> not necessarily the ones you want.  And I've had issues with sun's
> sparc compiler not accepting M$isms that it is documented as handling.
Hm, from some info to this newest version it is needed to compile the
actual OpenSolaris source - haven't read the README's yet...

Anyway, thank you very much for the info!

Kurt