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
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs