From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id DE7A57EE89 for ; Wed, 25 Oct 2017 08:52:02 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=adrien@notk.org; spf=Pass smtp.mailfrom=adrien@notk.org; spf=None smtp.helo=postmaster@nautica.notk.org Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of adrien@notk.org designates 91.121.71.147 as permitted sender) identity=mailfrom; client-ip=91.121.71.147; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AbeR+xxDBYpc/JZ5+NzLMUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP77pMbcNUDSrc9gkEXOFd2Crakb26yL6+jJYi8p39WoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6lX71zMZGw3+OAxp?= =?us-ascii?q?Pay1X9eK14Xkn9y1rrbTeQRTmD2lYb5oZCe3qADcrMwfh40qfq0x0BrSvnxQe+?= =?us-ascii?q?lM7WxtKEiXnhC66srmr7B59CEFkv479sNGGYPzc6kiBehRAC4nPmYd4sr3tl/E?= =?us-ascii?q?VwTZtShUaXkfjhcdW1uN1xr9RJqk93Ki7uc=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BEAwBQM/BZ/5NHeVtbHAEBBAEBCgEBF?= =?us-ascii?q?QEBAQECAQEBAQgBAQEBgzSBUoQhmWiBehKYOQqFOwKEZUMUAQEBAQEBAQEBAQF?= =?us-ascii?q?qKII4BQEeAQWCPAEFIw8BRhALGAICBRMOAgIPBRgxijepHIInixIBAQgCASWBD?= =?us-ascii?q?4IfggeBUIUTiBkvgjIFoW2UaA1zkjKVf4E5NiFCgRk0IQgqCEmCZYRgPosFgVU?= =?us-ascii?q?BAQE?= X-IPAS-Result: =?us-ascii?q?A0BEAwBQM/BZ/5NHeVtbHAEBBAEBCgEBFQEBAQECAQEBAQg?= =?us-ascii?q?BAQEBgzSBUoQhmWiBehKYOQqFOwKEZUMUAQEBAQEBAQEBAQFqKII4BQEeAQWCP?= =?us-ascii?q?AEFIw8BRhALGAICBRMOAgIPBRgxijepHIInixIBAQgCASWBD4IfggeBUIUTiBk?= =?us-ascii?q?vgjIFoW2UaA1zkjKVf4E5NiFCgRk0IQgqCEmCZYRgPosFgVUBAQE?= X-IronPort-AV: E=Sophos;i="5.43,430,1503352800"; d="scan'208";a="297781262" Received: from nautica.notk.org ([91.121.71.147]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2017 08:52:02 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 6BA03C009; Wed, 25 Oct 2017 08:52:01 +0200 (CEST) Date: Wed, 25 Oct 2017 08:52:01 +0200 From: Adrien Nader To: Christopher Zimmermann Cc: caml users Message-ID: <20171025065201.GA24593@notk.org> References: <20171019170538.73d6473c@mortimer.gmerlin.de> <441EA0D0-D075-4407-B50D-8CAEDD6039DF@gmerlin.de> <20171023194954.GA13292@notk.org> <152B8F33-A053-42AA-AF57-160FF3C897D0@gmerlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <152B8F33-A053-42AA-AF57-160FF3C897D0@gmerlin.de> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] use cc instead of gcc as default C compiler? Hi, On Wed, Oct 25, 2017, Christopher Zimmermann wrote: > >> My Problem is that custom OCaml builds, especially the ones done > >through opam will use gcc and therefore fail to build projects with not > >so modest requirements. At the moment I'm just wondering at which level > >in the toolchain this neuds fixing. OCaml configure, opam-repository or > >opam source? > > > >Could you elaborate on that « therefore fail to build projects with not > >so modest requirements » ? > > In my case it is core_kernel v0.9 which fails on OpenBSD gcc 4.2.1 because it uses -mpopcnt, while it compiles just fine with OpenBSD cc clang 4.0.0. I believe there are several things to change. I outline my thoughts below; I've sorted them by due date: 1- (overdue): Openbsd should stop shipping GCC 4.2: it's ten years old and unmaintained. *TEN* years. It shouldn't be a surprise it starts causing issues. The very reason 'gcc' has been used by ocaml instead of 'cc' was to avoid bad compilers on old systems and now openbsd is re-creating similar issues, only with a different twist. 2- (easy, compatible): OCaml's configure script should probably fallback to clang if GCC isn't found. That way, with openbsd not shipping GCC 4.2 anymore, clang would be automatically selected. I assumue ports ship a modern GCC and installing this one would still result in a working setup. Unsurprisingly, this is the step where you're invited to contribute: it should really be a small change. My only concern is that I seem to recall past discussions related to detecting clang but not their outcome. 3- (longer term): I know that there has been some work on a replacement of the configure script with something autoconf-based (and before anyone complains, this doesn't include automake nor libtool). I don't know the current status of this work however. -- Adrien