[Top][All Lists]

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

Re: [Tinycc-devel] Errors using riscv64-tcc with gcc/newlib headers

From: Michael Matz
Subject: Re: [Tinycc-devel] Errors using riscv64-tcc with gcc/newlib headers
Date: Wed, 21 Jul 2021 18:17:17 +0200 (CEST)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)


On Mon, 19 Jul 2021, Sam Ellicott wrote:

I updated my patch to only include the bare minimum definitions
required to get tcc to compile the newlib stdint.h header. Thank you
for the advice on using the config-extra.mak file, that worked
If this looks okay, then I will push this change to the mob branch.

I agree with the inclusion of this small set of defines. But I think you've put them into the wrong sections of tccdefs.h. For the pointer-size related defines we have three sections (32bit, win64, other64) but you added them to only two. Also your __INT32_TYPE__ define is within the __riscv section, but it would be valid for all current TCC targets.

So move the __INT32_TYPE__ one somewhere where it's always active. And for the __{U,}INTPTR_TYPE__ defines you may be able to reuse the definition of __PTRDIFF_TYPE__ so that you need to change only one place instead of three. (If you choose to not do that, then you need to add another hunk for the windows64 section).

I.e. the general idea would be that the macros from tccdefs.h exposing target details should be available unconditionally (with different values of course), not just on some configurations. (Exceptions exist of course, but I don't see why __INT32_TYPE__ or __{U,}INTPTR_TYPE__ should be an exception).


reply via email to

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