misc/171120: GCC incorrectly identified in base when CLANG_IS_CC
and WITHOUT_GCC are set
Dan McGregor
dan.mcgregor at usask.ca
Mon Aug 27 18:50:12 UTC 2012
>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 at 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:
More information about the freebsd-bugs
mailing list