From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 7 21:10:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C405D6A2 for ; Wed, 7 May 2014 21:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E30BE65 for ; Wed, 7 May 2014 21:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s47LA05n090387 for ; Wed, 7 May 2014 21:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s47LA0Ol090386; Wed, 7 May 2014 21:10:00 GMT (envelope-from gnats) Resent-Date: Wed, 7 May 2014 21:10:00 GMT Resent-Message-Id: <201405072110.s47LA0Ol090386@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Wolfgang Jenkner Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BBF3578 for ; Wed, 7 May 2014 21:06:43 +0000 (UTC) Received: from b2bfep16.mx.upcmail.net (b2bfep16.mx.upcmail.net [62.179.121.61]) by mx1.freebsd.org (Postfix) with ESMTP id 49FB3E43 for ; Wed, 7 May 2014 21:06:41 +0000 (UTC) Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep16-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20140507210634.DEUK10951.b2bfep16-int.chello.at@edge11.upcmail.net> for ; Wed, 7 May 2014 23:06:34 +0200 Received: from iznogoud.viz ([91.119.56.164]) by edge11.upcmail.net with edge id z96Z1n00e3YbPKv0B96Z5b; Wed, 07 May 2014 23:06:34 +0200 Received: from wolfgang by iznogoud.viz with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1Wi92v-000GDB-GE; Wed, 07 May 2014 23:06:33 +0200 Message-Id: <85d2fp5mee.fsf@iznogoud.viz> Date: Mon, 05 May 2014 20:06:22 +0200 From: Wolfgang Jenkner To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/189444: [patch] USE_GCC=yes clashes with DEFAULT_VERSIONS Cc: Gerald Pfeifer X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 21:10:00 -0000 >Number: 189444 >Category: ports >Synopsis: [patch] USE_GCC=yes clashes with DEFAULT_VERSIONS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 07 21:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Wolfgang Jenkner >Release: FreeBSD 10.0-STABLE amd64 >Organization: >Environment: System: FreeBSD iznogoud.viz 10.0-STABLE FreeBSD 10.0-STABLE #0 r265095M: Tue Apr 29 20:38:44 CEST 2014 adm@iznogoud.viz:/usr/obj/usr/src/sys/IZNOGOUD-drm-update-38.a+ amd64 I have no gcc in base, but two versions from ports (without JAVA), viz., $ pkg info -x gcc gcc48-4.8.3.s20140320 gcc49-4.9.1.s20140430 I want gcc49 to be selected for ports which set USE_GCC=yes in their Makefile, so I use DEFAULT_VERSIONS for this. As a minimal example, $ cat /etc/make.conf DEFAULT_VERSIONS= gcc=4.9 >Description: 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 >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. >Fix: Index: Mk/bsd.gcc.mk =================================================================== --- Mk/bsd.gcc.mk (revision 353027) +++ Mk/bsd.gcc.mk (working copy) @@ -148,7 +148,7 @@ . if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R} || !exists(/usr/bin/gcc) V:= ${_GCCVERSION_${v}_V:S/.//} _GCC_PORT_DEPENDS:= gcc${V} -. if ${_USE_GCC} == ${GCC_DEFAULT} +. if ${_USE_GCC} == ${GCC_DEFAULT} && empty(DEFAULT_VERSIONS:Mgcc=*) _GCC_PORT:= gcc . else _GCC_PORT:= gcc${V} >Release-Note: >Audit-Trail: >Unformatted: