[m-dev.] Cross-Compiling with Clang

Peter Wang novalazy at gmail.com
Thu Jan 2 14:17:19 AEDT 2020


On Sun, 29 Dec 2019 01:57:54 -0500, nil at nowhere-dense.com wrote:
> Hello,
> 
> I attempted to build a cross-compiler with Clang the other day (using 
> the `tools/configure_mingw_cross` as a reference).  The only snag so far 
> was the fact that the configure script uses a compiled program to get 
> the `clang` version (the final C_COMPILER_TYPE would be set to an 
> invalid value of "clang_").
> 
> I think it should be possible to either let the user set 
> `mercury_cv_clang_version` directly, or parse `clang --version` output 
> for the correct triple instead of running the test program.  I'm not 
> sure what the best approach might be, or if this is a desirable feature.

Please parse clang -dumpversion, as we do for gcc.

> Otherwise, the cross-compilation process for the hlc.gc grade was 
> relatively smooth (programs "work" -- I still need to do further 
> testing).

Great!

Peter


More information about the developers mailing list