I am aware that tcc officially does not support compiling musl, but I want to throw caution to the wind and see if some changes can fix that. I'm trying to build i386 musl, and I've already hacked around a few errors, but this one has me totally stumped. For the syscall header
https://git.musl-libc.org/cgit/musl/tree/arch/i386/syscall_arch.h the definition of __syscall3
static inline long __syscall3(long n, long a1, long a2, long a3)
{
unsigned long __ret;
#if !defined(__PIC__) || !defined(BROKEN_EBX_ASM)
__asm__ __volatile__ (SYSCALL_INSNS : "=a"(__ret) : "a"(n), "b"(a1), "c"(a2), "d"(a3) : "memory");
#else
__asm__ __volatile__ (SYSCALL_INSNS_34 : "=a"(__ret) : "a"(n), "D"(a1), "c"(a2), "d"(a3) : "memory");
#endif
return __ret;
}
results in "error: incorrect prefix"
But oddly, this only happen with syscall3. The definitions of syscall1 and syscall2 work fine, and if I comment syscall3 out, so do the definitions of syscall4, 5, 6. I have no idea what would be causing the error here, but if any of the more experienced developers have an idea of the problem, I'd really appreciate any advice.
Thanks,
John