From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4EFEC80294 for ; Mon, 23 Oct 2017 09:57:50 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-qk0-f193.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.220.193; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.220.193 as permitted sender) identity=mailfrom; client-ip=209.85.220.193; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qk0-f193.google.com) identity=helo; client-ip=209.85.220.193; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-qk0-f193.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AWw7D2xdw5EwQKW+NFAEdHtGmlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc67Yh7h7PlgxGXEQZ/co6odzbGJ4+a9ASQp2tWojjMrSNR0TRgLiM?= =?us-ascii?q?EbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpRZbIBj0NBJ0?= =?us-ascii?q?K+LpAcaSyp3vj6Hhs6HUNi5InjumfbRqLBis5TfQs8wbm45rLKB5nhDJuHpTZ+?= =?us-ascii?q?NOxW5yDV2Wkgz458H28JM1oApKvPd02MdKS6T3e+wDRrxVFjk8ezQ67cfxtBTH?= =?us-ascii?q?CxCE5nYGX38+nR9BAgyD5xb/CMSi+hDmv/ZwjXHJdfb9Sqo5DHH7t/9m?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BaAQC5oO1ZhsHcVdFcSQYMg1g/bicHg?= =?us-ascii?q?3OBNpgngXqJO48PCh+FHAKEPAdDFAEBAQEBAQEBAQEBEgEBAQgLCwgoL4I4BQE?= =?us-ascii?q?eAQWCPAECAgEjHQEbHQEDAQsGBQQHNwICIgERAQUBHAYTigcBAw0IEJ8JQIwMg?= =?us-ascii?q?gUFARyDCQWDWwoZJw1YgwEBAQEHAQEBAQEbAgYSgxyCB4FQhROIGYJhBaFmgi+?= =?us-ascii?q?FNY0QgnKQL5VoFAUfgRU2Y4EZNCElXjWCLwmCGkmBdT42iXWBVQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BaAQC5oO1ZhsHcVdFcSQYMg1g/bicHg3OBNpgngXqJO48?= =?us-ascii?q?PCh+FHAKEPAdDFAEBAQEBAQEBAQEBEgEBAQgLCwgoL4I4BQEeAQWCPAECAgEjH?= =?us-ascii?q?QEbHQEDAQsGBQQHNwICIgERAQUBHAYTigcBAw0IEJ8JQIwMggUFARyDCQWDWwo?= =?us-ascii?q?ZJw1YgwEBAQEHAQEBAQEbAgYSgxyCB4FQhROIGYJhBaFmgi+FNY0QgnKQL5VoF?= =?us-ascii?q?AUfgRU2Y4EZNCElXjWCLwmCGkmBdT42iXWBVQEBAQ?= X-IronPort-AV: E=Sophos;i="5.43,421,1503352800"; d="scan'208,217";a="241981756" Received: from mail-qk0-f193.google.com ([209.85.220.193]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Oct 2017 09:57:49 +0200 Received: by mail-qk0-f193.google.com with SMTP id b15so20860918qkg.9 for ; Mon, 23 Oct 2017 00:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m9v+A1LbKuEQzm/iebv0D0nQFEvwCplCL0PZ51/zziY=; b=goFNOutSDzuOkx8BTvazygGnMz1nSc0fvsR/YitA15tXUg1jSbaV8wTKicyXplT0Bg j7q8aXDrLHIxbkLJf9F3+1uvJEXv13yJFKSDbm2f/9DIlJNH7ebN9EtMfMqQdMR1wrtG aJmu1huz/+MdNGbGU9l3k6ub3/MrWnAJTj81flF1Pyz8bWhqhF0G8W6jCB73mG+jXI6I tIlq8bKki+nme3IetcoOM0mGh2FUr+lb+fAUbVaHMHWsQf6oO3VdpSMFWbwmASo2SzSI hlOaDdPUeXEInNe7l+jqW/MF0xCzN/+KRwKI3s5nzDLubUESd2bqGFMfLsyt/zwibcWT GIvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m9v+A1LbKuEQzm/iebv0D0nQFEvwCplCL0PZ51/zziY=; b=sDdW3f/3jjf1hWGxT5RhhhAvF0YwPvtRyE8EBIg2Qw9SUrTSgIsS7/QAw/SuZDiuLX Hvl71CDiUMAacZYwq5TwoG0lTOXZzHadryNDzH2dWJIvvffh8LySL1BB1RQkhDd4XCEh pvFrrWWZ7Wp8X6G/P1/M2ByCckWlHlOoLnVzhMr676sNeGb9u8EuAEo1fmNyfB2bJ4+c wH4LmiI+6daPII5Ms4sLseAFBDmvWhEg1adR7y5njnoPuhWmTS6Nsxmw2YlhVJqqJ7Fu 4tg4G4oJR74oyAno6j5B2NMm3CtS1Xd38ZsgDCTU0OdCxqilE1N1c+BC6vt7kpiRM9Wz D/dA== X-Gm-Message-State: AMCzsaWhtosPqSTIKFDKUMgCJFQk5NmERZm2sQtXu57zh0N9BXDdFDUB W5f8y/KnrfnL248v01XwuMwC4trjB7inzIGbIPQ= X-Google-Smtp-Source: ABhQp+SpbS9CS2FRxLjjtdfsNq4PjH3Gamdl755pqRL4WSqbOGIR94n66HDUA7MOK21ANyo4qAlcytsCX4/XlCrs724= X-Received: by 10.55.159.209 with SMTP id i200mr17481978qke.277.1508745468246; Mon, 23 Oct 2017 00:57:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.178.65 with HTTP; Mon, 23 Oct 2017 00:57:07 -0700 (PDT) In-Reply-To: <20171019170538.73d6473c@mortimer.gmerlin.de> References: <20171019170538.73d6473c@mortimer.gmerlin.de> From: Gabriel Scherer Date: Mon, 23 Oct 2017 09:57:07 +0200 Message-ID: To: Christopher Zimmermann Cc: caml users Content-Type: multipart/alternative; boundary="001a114d7f6eb10172055c322da6" Subject: Re: [Caml-list] use cc instead of gcc as default C compiler? --001a114d7f6eb10172055c322da6 Content-Type: text/plain; charset="UTF-8" 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 > --001a114d7f6eb10172055c322da6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My guess is that cc is a broken compiler on many exot= ic operating system (or at least was when the ./configure was first written= in the nineties), and in particular does not support the (modest) gcc exte= nsions that the runtime relies on. Using a standardized (yet portable) comp= iler was deemed an easier path to configure the OCaml distribution build sy= stem than trying to support the oddities of every Unix's C compiler und= er the sun.

Note that the compiler distribution builds just fi= ne 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 ch= oose GCC by default is still a perfectly reasonable choice today.
<= br>

On Thu, Oct 19, 2017 at 5:05 PM, Christopher Zimmermann <christophe= r@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://g= merlin.de
OpenPGP: http://gmerlin.de/christopher.pub
2779 7F73 44FD 0736 B67A=C2=A0 C410 69EC 7922 34B4 2566

--001a114d7f6eb10172055c322da6--