tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] /usr/include/syslog.h:68: error: invalid type #24


From: bauen1
Subject: Re: [Tinycc-devel] /usr/include/syslog.h:68: error: invalid type #24
Date: Wed, 15 Apr 2020 19:24:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Hello,

I've already had some success building musl using tinycc for my own kernel.
While this probably isn't applicable to your particular problem I still would 
like to note this down if anyone ever needs it.

This involves building musl with custom CFLAGS to add the tcc stdarg.h to the 
include path and deleting things that don't work.

Musl can compile almost everything of musl, except for some math (complex 
numbers) and some assembly (unimplemented instructions) and a few bits of c 
(__syscall4, __syscall5, __syscall6).
I've attached a patch for musl version 1.2.0, while this makes musl buildable 
using tinycc it won't actually work since the syscall implementations are 
missing.
This doesn't really matter for my own kernel since I provide my own 
implementation of the syscall interface.
I also haven't tested if musl still compiles with other compilers, e.g. gcc, 
using my patch.

It would be nice if someone could implement "proper" support for va_list 
(__builtin_va_start and friends, so no calls to an external library, etc..).

See also https://lists.gnu.org/archive/html/tinycc-devel/2017-05/msg00042.html 
for more details.

- bauen1


On 4/15/20 5:18 PM, Steffen Nurpmeso wrote:
> Steffen Nurpmeso wrote in
> <address@hidden>:
>  |Michael Matz wrote in
>  |<address@hidden>:
>  ||On Wed, 15 Apr 2020, James Mills wrote:
>  ||> I am trying to understand this "invalid type" I keep getting when \
>  ...
>  |However, it seems you need more for libressl, so i added for
>  |tinycc a new internal header in include/, syslog.h:
>  |
>  |  #ifndef _TINY_SYSLOG_H
>  |  #define _TINY_SYSLOG_H
>  |
>  |  #include <stdarg.h>
>  |  #include <syslog.h>
>  |
>  |  #endif /* _TINY_SYSLOG_H */
>  |
>  |because musl plays around with va_list in syslog.h.
>
> Actually we also need at the end of include/stdarg.h a "#define
> __DEFINED_va_list" so that it is not redefined.  I have no more
> musl here, only on the VM, sorry, forgot to copy that over to
> here.  Out now.
>
> --steffen
> |
> |Der Kragenbaer,                The moon bear,
> |der holt sich munter           he cheerfully and one by one
> |einen nach dem anderen runter  wa.ks himself off
> |(By Robert Gernhardt)
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Attachment: 0001-build-using-tcc.patch
Description: Text Data


reply via email to

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