Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213773 - x11-apps/ttmpfdir-3.0.9-r3 uses CFLAGS instead of CXXFLAGS in g++ calls
Summary: x11-apps/ttmpfdir-3.0.9-r3 uses CFLAGS instead of CXXFLAGS in g++ calls
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2008-03-18 03:41 UTC by Duncan
Modified: 2008-05-09 07:33 UTC (History)
0 users

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 Duncan 2008-03-18 03:41:21 UTC
OK, I have differing CFLAGS and CXXFLAGS, because I use -freorder-blocks-and-partition in my CFLAGS and it doesn't work for C++ (well, assertions).  GCC just emits a warning, but that warning unfortunately causes many config scripts to bail out, and since it doesn't work anyway for C++/assertions, I just don't put it in my CXXFLAGS.

Therefore, imagine my dismay while troubleshooting an unrelated error to find ttmkfdir using CFLAGS instead of CXXFLAGS to compile C++ code:

From the output:

x86_64-pc-linux-gnu-g++ -Wall -pedantic -I/usr/include/freetype2 -march=k8 -msse3 -pipe -fdirectives-only -frename-registers -fweb -ftree-vectorize -freorder-blocks-and-partition -combine -fgcse-sm -fgcse-las -fgcse-after-reload -fmerge-all-constants -c encoding.cpp  -fPIC -DPIC -o .libs/encoding.o
cc1plus: note: -freorder-blocks-and-partition does not work with exceptions

As I said, an unrelated error later caused portage to error out with the following.  Note the juxtaposition of CXX and CFLAGS, possibly the cause of the above:

* ERROR: x11-apps/ttmkfdir-3.0.9-r3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2391:  Called die
 * The specific snippet of code:
 *       emake CXX="$(tc-getCXX)" OPTFLAGS="${CFLAGS}" DEBUG="" || die "emake failed"
 *  The die message:
 *   emake failed

Why is it using CFLAGS instead of CXXFLAGS?  I can provide full emerge --info on request, but I don't see how it matters given the particular facts of the bug.  CFLAGS simply shouldn't be used to invoke G++, and doing so is a bug, any way you look at it.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2008-05-09 07:33:05 UTC
Fixed in CVS, thanks!