Subject: Re: pkg/37200: devel/glib2 fails on Solaris 5.9 due to compiler
To: None <gnats-bugs@NetBSD.org>
From: Ulrich Habel <email@example.com>
Date: 10/25/2007 14:10:57
> The manpage says '-xc99[=o]' which sounds like for me that you don't need to use an option.
> IMHO it may depends on the installed compiler and not the operating system.
> At least 5.4 and 5.9 both have the same options on there manpage, so I fail to see
> why 5.8 should not have it.
> Sure, -xc99=lib is not supported, by where does that come from?
I'll check it on Solaris 8 later today. According to the man page of the
compiler it says:
"If you specify -xc99 without any values, the option is set to -xc99=all."
A small c-programm is being compiled on Solaris 9:
If I compile this file on Solaris 9 it looks like this:
admin@sun-install ~ > cc -xc99 main.c
cc: -xc99=lib is not available on SunOS 5.9
admin@sun-install ~ >
So it looks that the "=lib" is substituted by the compiler itself. The
correct flags for Solaris 9 would are:
admin@sun-install ~ > cc -xc99=all,no_lib main.c
admin@sun-install ~ > echo $?
and it works :o) So I think it would be ok to add the patch to fix the
Solaris support. It still should work on Solaris 10 and
OpenSolaris/Express could someone test it?
A look into the manpage offers following:
Though the compiler support-level defaults to the
language features of the C99 standard, the standard
headers provided by Solaris 8 and Solaris 9 in
/usr/include do not conform with the 1999 ISO/IEC C
standard. If you encounter error messages, try using
-xc99=none to obtain the 1990 ISO/IEC C standard
behavior for these headers.
The 1999 C standard library semantics of routines that
appeared in both the 1990 and 1999 C standard are not
available and therefore cannot be enabled on Solaris 8
and Solaris 9. The compiler issues an error message
when -xc99=lib has been specified directly or
indirectly on Solaris 8 or Solaris 9.