From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 27 18:50:12 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6C6A1065694 for ; Mon, 27 Aug 2012 18:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BF4EB8FC19 for ; Mon, 27 Aug 2012 18:50:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7RIoBqj070234 for ; Mon, 27 Aug 2012 18:50:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7RIoBjV070233; Mon, 27 Aug 2012 18:50:11 GMT (envelope-from gnats) Resent-Date: Mon, 27 Aug 2012 18:50:11 GMT Resent-Message-Id: <201208271850.q7RIoBjV070233@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan McGregor Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A39A81065677 for ; Mon, 27 Aug 2012 18:49:34 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 8DBD88FC14 for ; Mon, 27 Aug 2012 18:49:34 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7RInYvY034751 for ; Mon, 27 Aug 2012 18:49:34 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q7RInYTD034750; Mon, 27 Aug 2012 18:49:34 GMT (envelope-from nobody) Message-Id: <201208271849.q7RInYTD034750@red.freebsd.org> Date: Mon, 27 Aug 2012 18:49:34 GMT From: Dan McGregor To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/171120: GCC incorrectly identified in base when CLANG_IS_CC and WITHOUT_GCC are set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 18:50:12 -0000 >Number: 171120 >Category: misc >Synopsis: GCC incorrectly identified in base when CLANG_IS_CC and WITHOUT_GCC are set >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 27 18:50:11 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Dan McGregor >Release: 10-CURRENT >Organization: >Environment: FreeBSD nebuchadnezzar.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r+5a7bf35: Wed Aug 22 13:23:02 CST 2012 dan@nebuchadnezzar.local:/home/dan/freebsd-obj/usr/home/dan/freebsd/sys/GENERIC amd64 >Description: I have both WITH_CLANG_IS_CC and WITHOUT_GCC set in /etc/src.conf, so gcc does not exist in the base system. Any port that has USE_GCC=4.2+ set incorrectly assumes that GCC 4.2 is in base. I think the expected behaviour should be to identify that it could be in base, then check, rather than simply taking it on faith that /usr/bin/gcc exists. >How-To-Repeat: Build a release WITHOUT_GCC and WITH_CLANG_IS_CC and then try to build a port with USE_GCC=4.2+ (for example audio/clementine-player). >Fix: wrap setting _GCCVERSION and _GCC_FOUND${v} in .if directives and remove the error condition if _GCCVERSION is undefined. I attached a patch. Patch attached with submission follows: Index: bsd.gcc.mk =================================================================== --- bsd.gcc.mk (revision 303050) +++ bsd.gcc.mk (working copy) @@ -129,13 +129,12 @@ _GCC_FOUND${v}= port . endif . if ${OSVERSION} >= ${_GCCVERSION_${v}_L} && ${OSVERSION} < ${_GCCVERSION_${v}_R} +. if exists(/usr/bin/gcc) _GCCVERSION:= ${v} _GCC_FOUND${v}:= base +. endif . endif .endfor -.if !defined(_GCCVERSION) -IGNORE= Couldn't find your current GCCVERSION (OSVERSION=${OSVERSION}) -.endif # # If the GCC package defined in USE_GCC does not exist, but a later >Release-Note: >Audit-Trail: >Unformatted: