[Bug 267215] Mk/bsd.gcc.mk: Stop checking if specific version requested is already installed

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 13 Nov 2022 10:00:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267215

--- Comment #3 from Gerald Pfeifer <gerald@FreeBSD.org> ---
Some specific answers for everyone interested:

(In reply to Yasuhiro Kimura from comment #0)
> I'm not sure why it is included in the logic to determine which version
> of GCC is used. But it sometimes causes unexpected result in non-cleanroom
> environment.

In the past we had to cater to GCC in base as well as ports, in then
different versions here and there, often multiple ones from ports.

And more ports relied on GCC: In fact, GCC was the default compiler for
ports.

To avoid users having to install even more ports, USE_GCC=XY+ and the
logic around it were introduced.


> * I'm user of portmaster.
> * On my FreeBSD system some ports that use 'USE_GCC=yes' are installed.
> * I'd like to change default version of GCC from 11 to 12.
:
> 1. Add 'DEFAULT_VERSIONS+=gcc=12' to /etc/make.conf
> 2. Execute `portmaster "$(pkg info -r gcc11 | grep -v ':$')"`

USE_GCC=yes is an alias for USE_GCC=$GCC_DEFAULT+, so when you (re)build
a port with USE_GCC=yes that should become USE_GCC=12+.

GCC 11 does not meet that requirement, so I am wondering what is happening?

Can you describe that, please? (I am not familiar with portmaster, so likely
the root is there. A regular build *should* update all those ports since they
no longer meet their dependency on GCC, correct? Why then does this not
happen with portmaster?)
this

-- 
You are receiving this mail because:
You are on the CC list for the bug.