Issue #6504 has been reported by hansdegraaff (Hans de Graaff).

----------------------------------------
Bug #6504: mkrf.rb should not use CFLAGS when compiling C++ code
https://bugs.ruby-lang.org/issues/6504

Author: hansdegraaff (Hans de Graaff)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


mkmf.rb currently sets CXXFLAGS to include CFLAGS. It should not do this because CFLAGS are meant for C compilation only and may contain flags that cause problems with C++. If there are flags that are common to both C and C++ (such as the -I flags in the downstream bug) then these should be collected in a separate variable.

https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1786

CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}

For reference our downstream bug report that triggered this: https://bugs.gentoo.org/show_bug.cgi?id=396281


-- 
http://bugs.ruby-lang.org/