Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcc-mes gets stuck building meslibc in amd64 bootstrap #470

Open
vladoshub opened this issue Jun 2, 2024 · 3 comments
Open

tcc-mes gets stuck building meslibc in amd64 bootstrap #470

vladoshub opened this issue Jun 2, 2024 · 3 comments

Comments

@vladoshub
Copy link

Steps for reproduction
sudo ./rootfs.py -c -a amd64 --update-checksums
Environment
ubuntu 20.04 VM Virtual Box

build gets stuck on command:
tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86_64 -o /usr/lib/mes/crt1.o lib/linux/x86_64-mes-gcc/crt1.c

I've been waiting for over 2 hours and nothing happens

@Googulator
Copy link
Collaborator

Known issue, the currently used TCC versions only support x86 properly. Support for AMD64 and other architectures is a post-1.0 goal.

Leaving this open to track this issue.

@Googulator Googulator changed the title stuck on amd64 bootstrap tcc-mes gets stuck building meslibc in amd64 bootstrap Jun 2, 2024
@stikonas
Copy link
Collaborator

stikonas commented Jun 8, 2024

Yes, that's a bug in mescc. It was actually much worth until recently and mescc couldn't even build tcc-mes but riscv64 bringup seems to have fixed a lot of 32-bit vs 64-bit issues, so now it builds tcc-mes on amd64 but there are still some miscompilation bugs... Probably just one or two bugs left but it's not easy to debug...

@stikonas
Copy link
Collaborator

stikonas commented Jun 8, 2024

It does seem to work marginally better with latest mes/tinycc:

 +> tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86_64 -o /usr/lib/mes/crt1.o lib/linux/x86_64-mes-gcc/crt1.c 
 +> catm /usr/lib/mes/crtn.o 
 +> catm /usr/lib/mes/crti.o 
 +> if match amd64 x86 
 +> tcc-mes -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86_64 -o unified-libc.o unified-libc.c 
assert fail: ((ft & 0x000f /* mask for basic type */ ) == 0 /* integer type */ ) || ((ft & 0x000f /* mask for basic type */ ) == 12 /* 64 bit integer */ ) || ((ft & 0x000f /* mask for basic type */ ) == 4 /* pointer */ ) || ((ft & 0x000f /* mask for basic type */ ) == 5 /* enum definition */ ) || ((ft & 0x000f /* mask for basic type */ ) == 6 /* function type */ )

/usr/bin/tcc-mes abnormal termination, signal number = 11
core dumped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants