On 7/8/24 7:33 PM, Fei Gao wrote:
On 2024-07-09 01:49  Jeff Law <jeffreya...@gmail.com> wrote:

Has the ESWIN team ever considered doing a bootstrap test of the zcmp*
extensions?  ie, turn them all on by default, then build GCC natively on
an rv32 system (or qemu emulated rv32 system)?

I've found that kind of test amazingly helpful through the years to
thoroughly exercise certain changes.  In fact, Raphael and I just did
that kind of test on rv32 for stack-clash protection to verify some
degree of correctness on rv32 (the vast majority of our efforts are
focused on rv64).  THe only issue we ran into was the linker running out
of address space on the stage3 link, but if you turn off debug symbols
it should bootstrap in rv32.

It's really a good idea to test the new feature. We haven't done that but will 
try it.
If you need a RFS, let me know. I've got one as a docker container that you can run on an x86 host if you've got binfmt handlers installed. That's faster than full system emulation. It's even possible that my docker registry is publicly accessable.

If you've got docker installed somewhere, try

docker pull law-sandy.freeddns.org:49153/riscv32-builder

You'll know you have the binfmt handlers setup when you can do something like this:

jlaw@x11-dpi:~/test/gcc$ docker run -it 
law-sandy.freeddns.org:49153/riscv32-builder /bin/bash
root@4708cec84476:/#


I'm now in a riscv32 docker container and it mostly looks native. I had to take a few shortcuts to get this working, so if you look real closely you'll find that bash and vim are actually x86 binaries. But other than that, it's riscv32 and you should be able to bootstrap in it. Also note you can take advantage of as many cores are your x86 host has when building.

What I'm doing is to add newlib board with zcmp enabled and watch if there's
compile or run failures in regression test.
What I'd suggest for this testing (and it has value as it's much faster) is to setup the binfmt handlers.


Oberviously, bootstrap is more thorough and greater coverage in test.
Thanks for your advice.
Happy to help.

jeff

Reply via email to