Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390601 - toolchain.eclass has both nocxx and cxx flags
Summary: toolchain.eclass has both nocxx and cxx flags
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 09:22 UTC by Steffen Schaumburg
Modified: 2011-11-15 21:49 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 Steffen Schaumburg 2011-11-15 09:22:30 UTC
And they dont block each other ("USE="cxx nocxx" emerge gcc -pv" doesn't complain).
Small issue but I figured that compiling gcc with both or neither of nocxx and cxx will probably lead to serious issues so I set the severity to major, I hope that was correct.
Tree timestamp: 15 Nov 2011 08:45:01 +0000
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-11-15 14:13:52 UTC
Please provide "USE="cxx nocxx" emerge gcc -pv" output
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-15 16:53:54 UTC
All packages that inherit toolchain.eclass have this, including sys-devel/gcc. It shouldn't be a problem since "cxx" was added to the defaults.

So please post your `emerge --info' output too.
Comment 3 Steffen Schaumburg 2011-11-15 18:26:53 UTC
It is a problem since gcc, unlike the other packages, has a nocxx flag as well. Having cxx and nocxx available to be set at the same time is clearly an error. As noted portage is even happy with both being set at the same time, even though they're clearly cp

[ebuild   R   #] sys-devel/gcc-4.6.2  USE="cxx fortran gcj mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -go -graphite -gtk (-hardened) (-libffi) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla" 0 kB     

It's not a question of what flags are set, but which ones are available. Here is my --info tho:
steffen stable # emerge --info
Portage 2.2.0_alpha51 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.13-r4, 3.1.0-gentoo x86_64)
=================================================================
System uname: Linux-3.1.0-gentoo-x86_64-AMD_Athlon-tm-_II_X4_600e_Processor-with-gentoo-2.1
Timestamp of tree: Tue, 15 Nov 2011 08:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r4
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo sunrise steffens_repo
Installed sets: 
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 Q3AEULA PUEL dlj-1.1 RTCW-ETEULA skype-eula ut2003"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=barcelona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/redmine/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-march=barcelona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--binpkg-respect-use --with-bdeps=y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://gentoo.mneisen.org/ http://gentoo.wheel.sk/"                                                      
LANG="en_GB.UTF-8"                                                                                                                                           
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                                            
LINGUAS="ca_ES en_GB en en_US de de_DE es es_ES et et_EE fr fr_FR hu hu_HU it it_IT nl nl_NL pl pl_PL pt pt_BR ro ro_RO ru ru_RU tl tl_PH zh zh_CN"          
MAKEOPTS="-j4"                                                                                                                                               
PKGDIR="/usr/portage/distfiles/binpkgs"                                                                                                                      
PORTAGE_CONFIGROOT="/"                                                                                                                                       
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                                                                                            
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                    
PORTDIR="/usr/portage"                                                                                                                                       
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"                                                                                                 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"                                                                                                        
USE="3dnow 3dnowext 7zip X aac acl acpi akonadi alsa amd64 apng applet ares artworkextra bash-completion branding btrfs bzip2 cairo cdda cddb cdr cjk cli consolekit cracklib crypt css cxx db2 dbus desktop devhelp device-mapper dhcpcd divx dmraid dri dvd dvdr dvdread encode exif fam fftw fontforge fortran fortune ftp fuse gcj gdbm gif git glade gmp gpg gpm h323 handbook http iconv imap jabber jpeg json laptop libnotify lm_sensors loop-aes lvm lvm2 lzma maps mdadm mmx mmxext mng modules mono mp3 mpeg mpi mplayer msn mudflap multilib natspec ncurses networkmanager nls nowin nptl nptlonly ntfs obex offensive offlinehelp ogg openexr opengl openmp openssl oscar otr pam pcre pda pdfimport png policykit ppp pppd private-headers quicktime quota quotas rar readline realmedia reiserfs rubytests sasl session sip smp solver spell sqlite sqlite3 sse sse2 sse3 ssl startup-notification svg swig sysfs system-sqlite theora threads tiff truetype udev unicode usb utempter vala vorbis webp wma wmp x264 xattr xcomposite xinerama xmp xorg xv xvid zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LINGUAS="ca_ES en_GB en en_US de de_DE es es_ES et et_EE fr fr_FR hu hu_HU it it_IT nl nl_NL pl pl_PL pt pt_BR ro ro_RO ru ru_RU tl tl_PH zh zh_CN" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="r600 radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Steffen Schaumburg 2011-11-15 18:27:40 UTC
"even though they're clearly cp" -> "even though they're clearly contradictory"
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-15 18:54:41 UTC
From toolchain.eclass:
    # Sanity check for USE=nocxx -> USE=cxx migration
    if (use cxx && use nocxx) || (use !cxx && use !nocxx) ; then
        eerror "We are migrating USE=nocxx to USE=cxx, but your USE settings do not make"
        eerror "sense.  Please make sure these two flags line up logically in your setup."
        die "USE='cxx nocxx' and USE='-cxx -nocxx' make no sense"

----------------------------
revision 1.479
date: 2011-11-14 18:40:06 +0100;  author: vapier;  state: Exp;  lines: +18 -11;  commitid: 2304ec152754567;
migrate USE=nocxx to USE=cxx
----------------------------

If you try to enable both, toolchain.eclass will stop you in gcc_do_configure().