On 2014-12-14 15:24Z, Rene Astudillo wrote:
> problems, but when I try to compile using CC I get the message CC not found.
I do not know if the message was caused by a Makefile, by direct
compiling of a C++ program, or by improper capitalization.
If it has been caused by the Makefile CC variable being undefined (or
wrong), try adding
CC ?=clang
to your /etc/mk.conf file.
Alternatively, you can use either of
$ export CC=clang
$ CC=clang make ...
$ make CC=Clang ...
If it is compiling a C++ program, the proper name of the C++ compiler
under MINIX is clang++; also the C++ support is still in development and
limited.
Else if it was really meant cc and was to compile C programs, then use
clang as name of the C compiler.
> This is a bit curious, due to ln, yacc and lex appear installed
The base reason is because MINIX uses the NetBSD infrastructure, which
historically (deeply) assumes the GCC compiler, and installs the
mandatory cc link to gcc *only*. NetBSD is slowly transitioning to use
clang as well, so we can expect this sort-of-bug will be corrected (at
least when gcc is not installed in the system, or as a way to decide
which compiler is the system compiler.)
MINIX suffers from the same problem as NetBSD-llvm; I guess the team is
expecting the dust to settle at NetBSD to port the solution rather than
inventing an unnecessary time-limited local hack.
As a temporary hack, I guess that creating in $HOME/bin some simple
shell scripts named cc and c++ which spawn clang{,++} will work.
Antoine