From: "Flameeyes (Diego E. Pettenò)" Date: 2013-03-29T08:32:56+09:00 Subject: [ruby-core:53816] [ruby-trunk - Bug #6504] mkmf.rb should not use CFLAGS when compiling C++ code Issue #6504 has been updated by Flameeyes (Diego E. Petten��). It's not like the bug at Gentoo adds much more. It just happens to be somebody who has different CFLAGS/CXXFLAGS (like many do, for instance it's common to use -ggdb3 on C code, but not enabling it on C++ code because it requires at least an order of magnitude more ram), and gets fxruby built with the wrong set. How much more info than this (which was provided in the original report, including the reference to the line where the mix-up is happening) do you expect? An essay on why you should not mix flags for one language with those for another? A dissertation on why any half-serious build system, including both Autotools and CMake, keep the two separate? ---------------------------------------- Bug #6504: mkmf.rb should not use CFLAGS when compiling C++ code https://bugs.ruby-lang.org/issues/6504#change-38018 Author: hansdegraaff (Hans de Graaff) Status: Rejected Priority: Normal Assignee: nobu (Nobuyoshi Nakada) 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/