Re: [PATCH] tcg/ppc: Fix building with Clang

2021-05-27 Thread Brad Smith
On 5/2/2021 12:02 AM, Brad Smith wrote: On 4/22/2021 11:39 AM, Richard Henderson wrote: On 4/22/21 2:20 AM, Peter Maydell wrote: On Thu, 22 Apr 2021 at 06:18, Richard Henderson I'm thinking something like #if !defined(_CALL_SYSV) && \   !defined(_CALL_DARWIN) && \   !defined(_CALL_AI

Re: [PATCH] tcg/ppc: Fix building with Clang

2021-05-01 Thread Brad Smith
On 4/22/2021 11:39 AM, Richard Henderson wrote: On 4/22/21 2:20 AM, Peter Maydell wrote: On Thu, 22 Apr 2021 at 06:18, Richard Henderson I'm thinking something like #if !defined(_CALL_SYSV) && \   !defined(_CALL_DARWIN) && \   !defined(_CALL_AIX) && \   !defined(_CALL_ELF) # if def

Re: [PATCH] tcg/ppc: Fix building with Clang

2021-04-22 Thread Richard Henderson
On 4/22/21 2:20 AM, Peter Maydell wrote: On Thu, 22 Apr 2021 at 06:18, Richard Henderson I'm thinking something like #if !defined(_CALL_SYSV) && \ !defined(_CALL_DARWIN) && \ !defined(_CALL_AIX) && \ !defined(_CALL_ELF) # if defined(__APPLE__) # define _CALL_DARWIN # elif def

Re: [PATCH] tcg/ppc: Fix building with Clang

2021-04-22 Thread Peter Maydell
On Thu, 22 Apr 2021 at 06:18, Richard Henderson wrote: > > On 4/21/21 2:03 AM, Peter Maydell wrote: > >> +/* Clang does not define _CALL_* */ > >> +#if defined(__clang__) && defined(__ELF__) && !defined(_CALL_SYSV) > >> +#define _CALL_SYSV 1 > >> +#endif > > > > This is trying to identify the call

Re: [PATCH] tcg/ppc: Fix building with Clang

2021-04-21 Thread Richard Henderson
On 4/21/21 2:03 AM, Peter Maydell wrote: +/* Clang does not define _CALL_* */ +#if defined(__clang__) && defined(__ELF__) && !defined(_CALL_SYSV) +#define _CALL_SYSV 1 +#endif This is trying to identify the calling convention used by the OS. That's not purely compiler specific (ie it is not the

Re: [PATCH] tcg/ppc: Fix building with Clang

2021-04-21 Thread Peter Maydell
On Wed, 21 Apr 2021 at 02:15, Brad Smith wrote: > > Fix building with Clang. > > At the moment Clang does not define _CALL_SYSV as GCC does. From > clang/lib/Basic/Targets/PPC.cpp in getTargetDefines().. > > // FIXME: The following are not yet generated here by Clang, but are > //gener

[PATCH] tcg/ppc: Fix building with Clang

2021-04-20 Thread Brad Smith
Fix building with Clang. At the moment Clang does not define _CALL_SYSV as GCC does. From clang/lib/Basic/Targets/PPC.cpp in getTargetDefines().. // FIXME: The following are not yet generated here by Clang, but are //generated by GCC: // // _SOFT_FLOAT_ // __RECIP_PRECISION_