Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Christopher Zimmermann <christopher@gmerlin.de>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] use cc instead of gcc as default C compiler?
Date: Mon, 23 Oct 2017 09:57:07 +0200	[thread overview]
Message-ID: <CAPFanBHpDQf3OnfervtR=FnZPyLchJ4a=d0+BHjEzCWHbcxFLA@mail.gmail.com> (raw)
In-Reply-To: <20171019170538.73d6473c@mortimer.gmerlin.de>

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

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
>

[-- Attachment #2: Type: text/html, Size: 1990 bytes --]

  parent reply	other threads:[~2017-10-23  7:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 15:05 Christopher Zimmermann
2017-10-22  9:20 ` SP
2017-10-23  7:46   ` Sébastien Hinderer
2017-10-23  7:57 ` Gabriel Scherer [this message]
2017-10-23 19:34   ` SP
2017-10-23 19:41   ` Christopher Zimmermann
2017-10-23 19:49     ` Adrien Nader
2017-10-24  5:15       ` [Caml-list] Are there any OCaml bindings to liblinear (a library for large linear classification)? Francois BERENGER
2017-10-24  7:55         ` Milo Davis
2017-10-25  2:31           ` Francois BERENGER
2017-10-25  7:06             ` [Caml-list] libsvm OCaml bindings and segfaults Francois BERENGER
2017-10-25  9:08               ` Philippe Veber
     [not found]       ` <152B8F33-A053-42AA-AF57-160FF3C897D0@gmerlin.de>
2017-10-25  6:52         ` [Caml-list] use cc instead of gcc as default C compiler? Adrien Nader
2017-10-25  7:05           ` Gabriel Scherer
2017-10-25  7:14             ` Sébastien Hinderer
2017-10-25  7:20               ` Adrien Nader
2017-10-25  7:10           ` Sébastien Hinderer
2017-10-25  8:04           ` Christopher Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPFanBHpDQf3OnfervtR=FnZPyLchJ4a=d0+BHjEzCWHbcxFLA@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=christopher@gmerlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox