[OpenIndiana-discuss] Making OI Packages (part I)

Alan Coopersmith alan.coopersmith at oracle.com
Sat Oct 30 04:43:56 UTC 2010


Richard L. Hamilton wrote:
> On Oct 29, 2010, at 1:22 PM, Alan Coopersmith wrote:
> 
>> [...]
>> For C language binaries, gcc & Studio cc are ABI compatible, so providing
>> both is a waste of time.   For C++, they are not compatible, so if you
>> must provide a C++ library that others will link against, you either provide
>> both or force a choice of compiler on everyone using your library.
> 
> While the Studio compilers have been getting better at handling source
> that has gcc extensions in it, I doubt they're 100%.  And the problem
> with a lot of the open source is the amount of dependencies.  So if
> you have an open source C++ program or library that would need major
> work to compile with anything other than gcc/g++, that pretty much means
> that all the libraries it needs also have to be compiled with g++.

I was talking binary compatibility, while it sounds like you're talking source
compatibility.

If you can build a library with either Studio cc or gcc, then users of both
can link their programs against it, you don't need to provide different
versions for each compiler as you must do with C++.   (And technically it's
worse with C++, since there's multiple versions of the ABI for each, but
for now, I believe the C++98 standard version of each is currently the only
one worth worrying about until the C++0x versions take hold, and the pre-98
versions can be ignored.)

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System




More information about the OpenIndiana-discuss mailing list