[oi-dev] Desktop Illumos Still Matters

Andrew Stormont andyjstormont at gmail.com
Wed Sep 5 20:36:47 UTC 2012


On 5 Sep 2012, at 21:33, Alasdair Lumsden <alasdairrr at gmail.com> wrote:

> On 05/09/2012 21:22, Bob Friesenhahn wrote:
>> What do you suggest as a better replacement for this?
> 
> Oh it's easy - you strip most of them out after the file is generated. Very easy to do with a post-install sed rule in the build recipe.
> 
> The bulk of them are pointless optimisations that aren't really relevant when compiling an extension. The main LDFLAGS to preserve are -L/-R and -l, and for CFLAGS its -D and -I.
> 
> As an example, mysql_config spits out this for CFLAGS:
> 
> -I/usr/mysql/5.1/include/mysql  -xprefetch=auto -xprefetch_level=3 -mt -fns=no -fsimple=1 -xbuiltin=%all -xlibmil -xlibmopt -xnorunpath -DHAVE_RWLOCK_T -DUNIV_SOLARIS
> 
> The only thing you really need for extensions to build is the -I bit. The rest is Sun Studio pedantry.

These sorts of scripts are just broken.  What it really should do is check the value of CC before adding any compiler specific flags.  Patching it to do that would be my preferred way of solving the problem.

Andrew S.

> 
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> http://openindiana.org/mailman/listinfo/oi-dev





More information about the oi-dev mailing list