From: Christopher Zimmermann <christopher@gmerlin.de>
To: Adrien Nader <adrien@notk.org>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] use cc instead of gcc as default C compiler?
Date: Wed, 25 Oct 2017 10:04:12 +0200 [thread overview]
Message-ID: <20171025100412.08d393e1@mortimer.gmerlin.de> (raw)
In-Reply-To: <20171025065201.GA24593@notk.org>
On 2017-10-25 Adrien Nader <adrien@notk.org> wrote:
> 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.
OpenBSD, FreeBSD, darwin all switched to clang because of licensing
issues. They won't integrate gcc >4.2.1 into the base system because it
is GPLv3. They do however ship a recent clang, called 'cc'. 'gcc' 4.2.1
is only included for a transition period on OpenBSD base system.
recent gcc compilers are installable from ports. They are called 'egcc'.
> 2- (easy, compatible): OCaml's configure script should probably fallback
> to clang if GCC isn't found.
It already does that.
> That way, with openbsd not shipping GCC 4.2 anymore
This may happen some time, but you might install a recent gcc from
ports then, which would confuse the build script.
> 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.
As I wrote above this is already the current behaviour.
> 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.
Still I would pledge to use 'cc' as default in such a new configure
script.
--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
2779 7F73 44FD 0736 B67A C410 69EC 7922 34B4 2566
prev parent reply other threads:[~2017-10-25 8:04 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
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 [this message]
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=20171025100412.08d393e1@mortimer.gmerlin.de \
--to=christopher@gmerlin.de \
--cc=adrien@notk.org \
--cc=caml-list@inria.fr \
/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