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

Bug 828678

Summary: sys-devel/gcc does not actually honor USE="-cxx"
Product: Gentoo Linux Reporter: Alec Ari <neotheuser>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: UNCONFIRMED ---    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: build.log (XZ)

Description Alec Ari 2021-12-10 09:32:56 UTC
For my C++ library, I use libc++ and have all the USE flags to avoid depending on libstdc++ such as libcxxabi libcxx default-libcxx

I only use GCC for compiling glibc (which is a C library, not a C++ library, no need for libstdc++) but g++ and libstdc++ are still built even though I have purged the USE="cxx" option from gcc by creating a file in `/etc/portage/profile/package.use.mask` with the following:

sys-devel/gcc cxx

GCC was definitely built with the cxx USE flag disabled, but it seems to have done nothing.

Reproducible: Always

Steps to Reproduce:
1. Force GCC to build without c++ support
Actual Results:  
g++ and libstdc++ are still installed

Expected Results:  
Building gcc without the cxx USE flag should actually prevent building a c++ compiler (g++) and libstdc++ (i.e. g++ should return: command not found)

cxx USE flag is noop.
Comment 1 Agostino Sarubbo gentoo-dev 2021-12-10 09:36:42 UTC
I suppose a duplicate of 692126 but I'll leave to toolchain@
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-10 13:01:26 UTC

*** This bug has been marked as a duplicate of bug 692126 ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-10 13:02:26 UTC
It's forced on. Have you verified the build.log / emerge actually says -cxx?
Comment 4 Alec Ari 2021-12-13 03:43:16 UTC
Created attachment 758733 [details]
build.log (XZ)