Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18209 - cxxflags commented out in make.conf
Summary: cxxflags commented out in make.conf
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-26 05:55 UTC by William Abke
Modified: 2011-10-30 22:18 UTC (History)
1 user (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 William Abke 2003-03-26 05:55:52 UTC
After having trouble getting KDE 3.1.1/aRts to compile, I was looking into
changing USE/CFLAGS and noticed that CXXFLAGS was commented out in make.conf.  

Instead of getting what you see below for CXXFLAGS, I was getting the default:
-O2 -mcpu=i686 -pipe

In other posts in the forums where there are compile problems and people include
'emerge info' and they have what looks like undesireable CXXFLAGS:
CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -mcpu=i686 -pipe" 

Looking at /var/db/pkg/ by date it seems an update to portage around 04Mar03 had
the change.

Thanks,
Bill

bash-2.05b# emerge info
Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.19-gentoo-r10_23Dec02 i686 Pentium Pro
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss apm avi crypt encode gif jpeg libg++ mikmod mpeg ncurses pdflib png
quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline arts tetex
svga tcltk java X sdl gpm tcpd pam libwww ssl python esd imlib oggvorbis gtk qt
kde cdr scanner -3dnow motif -mmx maildir -gnome ghoto2 flash imap samba doc
-nls opengl perl mysql alsa dga mozilla pnp sse tiff cups"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer -ffast-math -frename-registers"
CXXFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer -ffast-math -frename-registers"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j3"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"



Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Narada Sage 2003-03-26 09:32:24 UTC
As I understand it, there are three scenarios.  First is that a user does not set cflags or cxxflags in which case the following defaults are set.

CFLAGS="-O2 -mcpu=i686 -pipe"
CXXFLAGS="-O2 -mcpu=i686 -pipe"

Second, the user sets cflags but forgets to uncomment cxxflags in which case the following are set.

CFLAGS="your cflags"
CXXFLAGS="-O2 -mcpu=i686 -pipe"

Third, the user doesn't set cflags but the cxxflags line is uncommented by default in which case the following is set.

CFLAGS="-O2 -mcpu=i686 -pipe"
CXXFLAGS=""

Perhaps the fact that cxxflags being commented by default is trying to avoid the third result.  The ideal solution would be to instruct the user to set cflags and uncomment cxxflags when installing OS and this is on the way to being established with gentoo incorporating a supported set of cflags into their installation docs.  Still, I think a point should be made to ask users to uncomment cxxflags if setting cflags.  Sorry if I'm making no sense.
Comment 2 William Abke 2003-03-26 12:38:47 UTC
How about a 4th scenario: 

I would suggest the following default:
#CFLAGS="-march-pentium3 -O3 -pipe"
CXXFLAGS="${CFLAGS}"

That way if someone makes a change to the CFLAGS they are automatically applied to the CXXFLAGS - that seems to be what most people do anyway.

Comment 3 Narada Sage 2003-03-26 12:48:57 UTC
Your 4th scenario is the same as my 3rd.  Commenting out cflags *and* setting cxxflags=cflags results in the following being set.  Verify by editing make.conf and 'emerge info'.

CFLAGS="-O2 -mcpu=i686 -pipe"
CXXFLAGS=""
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2003-03-27 16:14:43 UTC
It's to fix #3 as mentioned.
It stays.