Hi,

At Fri, 18 Nov 2011 00:45:53 +0900,
Nikolai Weibull wrote in [ruby-core:41108]:
> Well, I perform a try_compile with the option, and if that passes I
> add it to $CFLAGS.  You can read the code here:
> 
> https://github.com/now/u/blob/master/ext/u/extconf.rb
> 
> True, perhaps overriding $warnflags is better, but this needs to be
> backwards compatible with 1.8.7.  That”Ēs not hard to handle, I
> suppose, but still, it then still needs to be handled.

Though 1.8 has been announced as "dying" already, set both of
$warnflags and CONFIG['warnflags'] to an empty string, if you want to
support it still.

> And I still don”Ēt believe Ruby should be telling me what optimizations
> to apply, as, for example, gcc may bomb with my code for -O3 but not
> with -O2.

Even from your point, it seems good thing that CFLAGS are grouped by
their purpose, doesn't it?

-- 
Nobu Nakada