[pcre-dev] [Bug 1774] Can't build JIT for Android ARM64

Page principale
Supprimer ce message
Auteur: admin
Date:  
À: pcre-dev
Sujet: [pcre-dev] [Bug 1774] Can't build JIT for Android ARM64
https://bugs.exim.org/show_bug.cgi?id=1774

--- Comment #2 from Tavian Barnes <tavianator@???> ---
> - Why this is not working:
>
> #if (defined __has_builtin && __has_builtin(__builtin___clear_cache))
>
>   sljit_src/sljitConfigInternal.h:299:46: error:
>      missing binary operator before token "("
>      -> the "(" after __has_builtin


Because the C preprocessor has to be able to parse the whole expression before
it evaluates it, even if part of it doesn't get evaluated due to the &&. You
have to put it in a "skipped group" that doesn't even get parsed, which is why
I wrote it the way I did.

> - Why do we need a separate check for GCC 4.3 and __has_builtin? I think one
> check should be enough. I would prefer the check above actually.


GCC doesn't support __has_builtin at all[1], so I check for the GCC version
that introduced __builtin___clear_cache. __has_builtin only works on Clang.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970

> - I remember there was issues with clear_cache on certain CPUs (ARMv5 as far
> as I remember). Do __builtin___clear_cache has the same issues?


Just checked, and GCC on ARMv5 Linux just emits a call to __clear_cache() for
the builtin. So I imagine they'd share the same issues, whatever they are.

--
You are receiving this mail because:
You are on the CC list for the bug.