Take a port foo with a Makefile like $ cat /tmp/foo/Makefile # Created by: Nobody # $FreeBSD$ PORTNAME= foo PORTVERSION= 0 CATEGORIES= misc DISTFILES= MAINTAINER= nobody@xxx.yy COMMENT= Hmm USE_GCC= yes .include <bsd.port.mk> How-To-Repeat: $ make -C /tmp/foo test-gcc USE_GCC=4.9+ Port can use later versions. GCC version: 4.2 - OSVERSION from 700042 to 9999999 GCC version: 4.6 - OSVERSION from 0 to 0 GCC version: 4.7 - OSVERSION from 0 to 0 GCC version: 4.8 (port) - OSVERSION from 0 to 0 GCC version: 4.9 (port) - OSVERSION from 0 to 0 Using GCC version 4.9 CC=gcc49 - CXX=g++49 - CPP=cpp49 - CFLAGS="-O2 -pipe -Wl,-rpath=/usr/local/lib/gcc49 -fno-strict-aliasing" LDFLAGS=" -Wl,-rpath=/usr/local/lib/gcc49 -L/usr/local/lib/gcc49" BUILD_DEPENDS=gcc49:/usr/ports/lang/gcc /usr/local/bin/as:/usr/ports/devel/binutils RUN_DEPENDS=gcc49:/usr/ports/lang/gcc $ make -C /tmp/foo missing lang/gcc-ecj45 So, BUILD_DEPENDS and RUN_DEPENDS have bogus dependencies on lang/gcc.
Responsible Changed From-To: freebsd-ports-bugs->gerald Over to maintainer.
I've run into this problem as well, your proposed patch helps me to override gcc version for specific ports. Which I am trying to do with libcdr and chromium.
This patch as suggested would have picked lang/gcc47 (now lang/gcc48) instead of lang/gcc when looking at the default case. The following commit should address your reported issue; sorry for the delay in addressing it: r369328 | tijl | 2014-09-26 16:00:41 +0000 (Fri, 26 Sep 2014) | 9 lines Depend on lang/gccXY if users wish to use a different version of gcc by default than lang/gcc (currently 4.8). (I don't fully agree with this implementation but this makes something like DEFAULT_VERSIONS+=gcc=4.9 in make.conf work correctly.) Reported by: Luca Pizzamiglio <luca.pizzamiglio@gmail.com> Approved by: gerald