tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] riscv64 feedback


From: Christian Jullien
Subject: Re: [Tinycc-devel] riscv64 feedback
Date: Wed, 27 May 2020 07:13:37 +0200

Hello Michael,

I thought that --with-selinux was mandatory for all distribs like
Fedora/RHEL/CentOS ...
Without this flag, it works like a charm and passed all the tests. It only
displayed ../tccrun.c:844: warning: #warning add arch specific
rt_get_caller_pc()
You aware of. Your yesterday commit fixed printf warning.

I'm really impress it works so good (and so fast compared to gcc on this
VM).

Thanks again.

C.

-----Original Message-----
From: Michael Matz [mailto:address@hidden] 
Sent: Tuesday, May 26, 2020 20:22
To: address@hidden; address@hidden
Subject: Re: [Tinycc-devel] riscv64 feedback

Hello,

On Tue, 26 May 2020, Christian Jullien wrote:

> Tcc is configured with: ./configure --with-selinux

Does it work without selinux?  I've not tried that for riscv, my qemu 
userspace (debian) isn't selinux enabled, and as the symptom you see is 
related to mapping executable memory that might be it.

> While compiling tcc (2020-05-mob) I get very few warnings:
> 
> tccrun.c:844:2: warning: #warning add arch specific rt_get_caller_pc()
> [-Wcpp]
> 
> #warning add arch specific rt_get_caller_pc()

Yeah, that's by intention to remind us that some functionality is missing 
(riscv64 qemu user-linux emulation is unfortunately incorrect in one 
aspect of setting up the signal frame, so implementing the above needs to 
be done on real hardware, or at least on a full kernel emulation, which I 
don't often have access to).

> riscv64-gen.c: In function ?load_symofs?:
> 
> riscv64-gen.c:161:71: warning: format ?%llx? expects argument of type
?long
> long unsigned int?, but argument 2 has type ?uint64_t? {aka ?long unsigned
> int?} [-W
> 
> format=]
> 
>                tcc_error("unimp: large addend for global address
(0x%llx)",
> sv->c.i);

Ah, that's more recent, since tcc_warning/tcc_error got printf-like format 
checking.  Fixed in mob.

> But test suite unfortunately fails because of map memory error.
> 
> Please note that I was also unable to mmap OpenLisp memory on this VM 
> but, in this case, OpenLisp uses malloc.

If it's not just selinux but generic mmap() that doesn't quite work on 
this type of VM then tcc -run can't be used.  Even if we were to fallback 
to malloc we still would need to be able to mark the allocated memory as 
executable, and if mmap doesn't work then mprotect most probably doesn't 
work either.

If it's only selinux we probably can find a way, so please first test if 
tcc starts working without.


Ciao,
Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]