Project

General

Profile

This project is closed and read-only.

Actions

Backport #6504

closed

mkmf.rb should not use CFLAGS when compiling C++ code

Backport #6504: mkmf.rb should not use CFLAGS when compiling C++ code

Added by hansdegraaff (Hans de Graaff) over 14 years ago. Updated over 13 years ago.


Description

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


Related issues 1 (0 open1 closed)

Related to Ruby - Bug #8315: mkmf does not include include paths from pkg_config anymoreClosednobu (Nobuyoshi Nakada)Actions
Actions

Also available in: PDF Atom