Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 316095 - dev-lang/ruby: rbconfig saves too many flags in CONFIG["CFLAGS"]
Summary: dev-lang/ruby: rbconfig saves too many flags in CONFIG["CFLAGS"]
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cflags
  Show dependency tree
 
Reported: 2010-04-19 11:31 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2020-11-25 19:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 ;-).