My guess is that cc is a broken compiler on many exotic operating system (or at least was when the ./configure was first written in the nineties), and in particular does not support the (modest) gcc extensions that the runtime relies on. Using a standardized (yet portable) compiler was deemed an easier path to configure the OCaml distribution build system than trying to support the oddities of every Unix's C compiler under the sun.

Note that the compiler distribution builds just fine under MacOS, which now uses Clang (llvm) instead of GCC -- and that you can configure the C compiler you want to use with (./configure -cc ...). I don't see what is the problem here; and I would think that opting to choose GCC by default is still a perfectly reasonable choice today.



On Thu, Oct 19, 2017 at 5:05 PM, Christopher Zimmermann <christopher@gmerlin.de> wrote:
Hi,

the Ocaml configure script uses gcc as default compiler. I wonder
whether this is still a sensible default with llvm being a viable
alternative.
A more portable default would be to use plain `cc`, which will usually
be the system-wide default compiler.
This is relevant because this compiler will also be hardcoded into
ocamlopt as default c compiler.

Christopher


--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
2779 7F73 44FD 0736 B67A  C410 69EC 7922 34B4 2566