On 08/07/2018 05:34 AM, Aleksandar Markovic wrote: > We are introducing a new MIPS platform - called nanoMIPS - to the QEMU. > > Besides providing new functionality, we would like to integrate into QEMU > some basic testing capabilities for that new platform. Something like this: > > Enable user to specify cross compiler and, using QEMU Linux user mode: > a. execute several tests that are just almost minimal tests of emulation of > selected instructions. > b. execute several tests that are just almost minimal tests of translation > of selected system calls. QEMU has some infrastructure for this now. I'm not clear on all of the pieces, but Alex will be able to help you.
In configure, there is a section setting cross_cc_foo and cross_cc_cflags_foo; there is another section that tests target_compiler and target_compiler_cflags from that. At minimum you'll need to add a new section that sets target_compiler etc for nanomips. In tests/tcg/mips/Makefile.include, one can set up a docker cross-compile definition. This is correlated to files in tests/docker/dockerfiles/. I don't know much about docker, but I know it should be possible to build and distribute a cross-compiler, for a base system such as debian 9, that other folk can pull and use. For a brand new target like nanomips, requiring a brand new tool chain, this is certainly something that you will have to do yourself. But having that available for CI should pay dividends. r~