OCaml with musl-gcc

compiler
musl

#1

I’m trying to build a musl-linked OCaml .o file on Ubuntu Trusty (specifically on Travis CI’s trusty container), but it looks like Trusty only provides musl-gcc, not musl-clang. The 4.06.0+musl+static+flambda switch requires musl-clang as its cc.

Is there a workaround (other than just putting the musl-clang script in /usr/local/bin) that’ll make this work?


#2

A simple workaround might be to just clone opam-repository, add 4.06.0+gcc-musl+static+flambda (or whatever options you want), use your fork as a remote (using opam remote add local), opam update local and opam switch 4.06.0+gcc-musl+whatyouwant.

Here is the file you want to modify/copy: https://github.com/ocaml/opam-repository/blob/master/compilers/4.06.0/4.06.0%2Bmusl%2Bstatic%2Bflambda/4.06.0%2Bmusl%2Bstatic%2Bflambda.comp