Bug 171120 - [patch] bsd.gcc.mk: GCC incorrectly identified in base when CLANG_IS_CC and WITHOUT_GCC are set
Summary: [patch] bsd.gcc.mk: GCC incorrectly identified in base when CLANG_IS_CC and W...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-27 19:50 UTC by Dan McGregor
Modified: 2015-01-28 18:33 UTC (History)
0 users

See Also:


Attachments
file.diff (569 bytes, patch)
2012-08-27 19:50 UTC, Dan McGregor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan McGregor 2012-08-27 19:50:11 UTC
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.

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:
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).
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-11-28 22:59:27 UTC
Fix Summary and assign.
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2015-01-05 16:21:29 UTC
I believe this bug can be closed,  gcc has not been built by default on 10/head for amd64/i386 since a few months
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2015-01-28 18:33:48 UTC
I am sorry this got stuck "in the system", but luckily it seems to
have been addressed in between already by

r313323 | gerald | 2013-03-03 03:21:29 +0000 (Sun, 03 Mar 2013) | 10 lines

Do not just rely on the version number of FreeBSD in deciding whether
a certain version of GCC is in the base, but also check the existence
of /usr/bin/gcc.

This unbreaks systems where GCC is not built as part of the world, and
instead relies on versions of GCC in the Ports Collection there.

PR:             175252
Submitted by:   Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>

If this patch does not solve the issue you saw, can you please advise
and I'll have another look?