Bug 216562 - Mk/Uses/compiler.mk tramples over USE_GCC value with compiler:gcc-c++11-lib
Summary: Mk/Uses/compiler.mk tramples over USE_GCC value with compiler:gcc-c++11-lib
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-29 01:44 UTC by Matthias Andree
Modified: 2019-09-06 08:24 UTC (History)
3 users (show)

See Also:
mandree: maintainer-feedback? (portmgr)
mandree: exp-run?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer 2017-01-29 01:44:39 UTC
Issue:
When USES contains compiler:gcc-c++11-lib, 
Mk/Uses/compiler.mk will force USE_GCC=yes, 
instead of using USE_GCC?=yes.

Impact:
This harms ports that set, for instance, USE_GCC=5+, by re-allowing GCC 4.9 (which is known to miscompile rawtherapee on FreeBSD 11.0-RELEASE amd64, while GCC 5.4 is fine).

Suggestion:
change code to USE_GCC?=yes here:

.if ${_COMPILER_ARGS:Mgcc-c++11-lib}
USE_GCC=        yes                         # <====-FIX-THIS-===============
CHOSEN_COMPILER_TYPE=   gcc
.if ${COMPILER_FEATURES:Mlibc++}
CXXFLAGS+=      -nostdinc++ -isystem /usr/include/c++/v1
LDFLAGS+=       -L${WRKDIR}


Workaround:
re-set USE_GCC after .include <bsd.port.pre.mk>. (See, for instance, graphics/rawtherapee[-devel]).
Comment 1 Antoine Brodin freebsd_committer 2017-01-29 10:46:48 UTC
I believe USE_GCC?=yes doesn't help, the workaround will still be needed.