[m-dev.] Cross-Compiling with Clang

nil at nowhere-dense.com nil at nowhere-dense.com
Sun Dec 29 17:57:54 AEDT 2019


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.

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

Best regards,
Mark


More information about the developers mailing list