Bug 173914 - [build] share/mk/bsd.compiler.mk does not know ccache
Summary: [build] share/mk/bsd.compiler.mk does not know ccache
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 9.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-25 21:30 UTC by Thierry Thomas
Modified: 2015-11-06 20:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer 2012-11-25 21:30:00 UTC
	Upgrading a machine from 9-STABLE to 9.1-PRERELEASE, make
	installworld aborted with the following message:

	share/mk/bsd.compiler.mk line 17
	Unable to determine compiler type for /usr/local/libexec/ccache/world/cc

Fix: 

Add a third case for ccache, and test its basename?
How-To-Repeat: 	- Install the port devel/ccache and have its entry in your
	/etc/make.conf
	- Upgrade the machine vie make installkernel / installworld
Comment 1 Dennis Yusupoff 2013-02-28 16:42:58 UTC
This is a multi-part message in MIME format.
Comment 2 Brooks Davis freebsd_committer 2013-03-01 03:20:55 UTC
State Changed
From-To: open->closed
Comment 3 Brooks Davis freebsd_committer 2013-03-01 03:22:15 UTC
State Changed
From-To: closed->open

Re-open.  send-pr should reject empty reason messages.
Comment 4 dfilter service freebsd_committer 2013-03-01 03:25:56 UTC
Author: brooks
Date: Fri Mar  1 03:25:43 2013
New Revision: 247527
URL: http://svnweb.freebsd.org/changeset/base/247527

Log:
  Provide slightly more helpful feedback when we can't figure out what
  compiler the user is using.
  
  PR:		misc/173914

Modified:
  head/share/mk/bsd.compiler.mk

Modified: head/share/mk/bsd.compiler.mk
==============================================================================
--- head/share/mk/bsd.compiler.mk	Fri Mar  1 03:05:08 2013	(r247526)
+++ head/share/mk/bsd.compiler.mk	Fri Mar  1 03:25:43 2013	(r247527)
@@ -14,7 +14,7 @@ COMPILER_TYPE:=	gcc
 .  elif ${_COMPILER_VERSION:Mclang}
 COMPILER_TYPE:=	clang
 .  else
-.error Unable to determine compiler type for ${CC}
+.error Unable to determine compiler type for ${CC}.  Consider setting COMPILER_TYPE.
 .  endif
 .  undef _COMPILER_VERSION
 . endif
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 Brooks Davis freebsd_committer 2013-03-01 03:26:59 UTC
State Changed
From-To: open->closed

Compilers that don't look or act like gcc or clang are not supported 
by base system today.  If you are running a supported compiler 
through a wrapper like distcc that hides the compiler then set the 
COMPILER_TYPE varible appropriately when building. 

I've updated bsd.compiler.mk in HEAD to be slightly more helpful in this 
regard.
Comment 6 commit-hook freebsd_committer 2015-03-08 22:39:35 UTC
A commit references this bug:

Author: dim
Date: Sun Mar  8 22:39:20 UTC 2015
New revision: 279794
URL: https://svnweb.freebsd.org/changeset/base/279794

Log:
  MFC r247527 (by brooks):
    Provide slightly more helpful feedback when we can't figure out what
    compiler the user is using.

    PR:		misc/173914

  MFC r265829 (by imp):
    Support, to the extent we generate proper command lines, compiling
    with clang 3.3. Useful for test building -current on a -stable system
    in individual directories. Potentially useful if we ever want to
    support, say, gcc 4.8 or 4.9's new warnings when building with an
    external toolchain (but such support not yet committed). Document
    the bsd.compiler.mk interface.

  MFC r266587 (by imp):
    Allow CC to not actually exist. During the ports INDEX run, all the
    Makefiles are evaluated without building things. In a normal build,
    the prerequisites would be built, and CC would be an actual thing. In
    an INDEX build, though, they don't exists. Redirect stderr to get rid
    of annoying messages, and assume that the compiler version is 0 if the
    actual compiler can't tell us. Do this in preference to guessing based
    on numbers because gcc410 might be 4.10, or 4.1.0 and without
    carefully crafted special knowledge we differentiate between them
    easily (also ming-gcc has no clues at all). Elsewhere, don't trust
    the compiler version if it is 0.

  MFC r273405 (by bapt):
    When using an external toolchain note that gcc 4.8+ supports C++11

    Submitted by:	imp

  MFC r275557 (by ngie):
    Fix typos in comments and wrap to <80 columns

  MFC r275588 (by ngie):
    ${CC} --version doesn't need to be queried if both COMPILER_TYPE and
    COMPILER_VERSION are known

  MFC r275589 (by ngie):
    The previous commit should have been a logical or not a logical "and"

    Pointyhat to: me

Changes:
_U  stable/9/
_U  stable/9/share/
_U  stable/9/share/mk/
  stable/9/share/mk/bsd.compiler.mk
  stable/9/share/mk/bsd.sys.mk