Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 316095

Summary: dev-lang/ruby: rbconfig saves too many flags in CONFIG["CFLAGS"]
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: CONFIRMED ---    
Severity: normal CC: binki, jstein
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=588334
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 59506    

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-19 11:31:15 UTC
Storing these CFLAGS is a bad idea in general, but it can become pretty nasty, as you might save flags that are not very compatible; for instance building eventmachine (that uses C++) on my system produces:

cc1plus: warning: command line option "-Wno-format-zero-length" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wno-pointer-sign" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wno-format-zero-length" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wno-pointer-sign" is valid for C/ObjC but not for C++

Not nice.
Comment 1 Hans de Graaff gentoo-dev Security 2010-08-08 17:51:36 UTC
Isn't this a bug with eventmachine (for not using CPPFLAGS instead of CFLAGS)? 

On my machine CPPFLAGS is actually empty, which is also a bug. It should be similar to the CXXFLAGS set during compile time of ruby.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-08-09 17:31:01 UTC
CPPFLAGS if for the C Pre Processor, not C++ Compiler.
Comment 3 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-09-14 02:52:09 UTC
Since Makefiles generated by mkmf using rbconfig do not include CFLAGS in the linking line, this bug can trigger build failures on portage-multilib _if_ ruby was compiled with CFLAGS=-m32 but NOT LDFLAGS=-m32. Modern portage-multilib includes -m32 in LDFLAGS, however. This means that if ruby was compiled at least a half year ago, portage-multilib users might get bitten by compilation failures caused by this bug for project using mkmf.... So at one time this might have been a fatal bug for supporting portage-multilib, but no longer.

I really need to work on keeping my system more up-to-date ;-).