Sagar Acharya <[email protected]> wrote:
> Yes I resolved it, I had to use -c flag earlier. However, I don't know how to 
> test the compiled cross-riscv riscv64-tcc compiler.

using the -c flag doesn't resolve the issue and the tests won't run
you created a .o file from a .c file, without the linking step of creating the 
executable file
this is enough to inspect the output, but not to run tests

I think plan9 does it best, where cc's job is to create .o files, never to do 
any linking
https://www.lysator.liu.se/c/plan9c.html

> 
> Can you help with it? make test runs all the tests.
> 

the tests require creating and running target executables - they depend on 
libc, hence you need a libc for your target (riscv64)

you can run foreign code on linux with qemu-system-riscv64 + binfmt_misc
there's a nice page here 
https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Compiling_with_QEMU_user_chroot

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to