Re: [eigen] Fix for ARM __builtin_prefetch fails

[ Thread Index | Date Index | More Archives ]

On Nov 18, 2013, at 14:48 , Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> On 18.11.2013 23:33, Rick Mann wrote:
>> We seem to have an issue with our GCC 4.6.3, building for ARM, when the preprocessor tries to evaluate __has_builtin(). Here is a patch that works for us:
> Could you also say what that issue is? (i.e., gives us your preprocessor error.)

Yes, sorry:

..../thirdparty/eigen/Eigen/src/Core/arch/NEON/PacketMath.h:55:45: error: missing binary operator before token "("

Line 55 is:

#if (defined(__has_builtin) && __has_builtin(__builtin_prefetch)) || defined(__GNUC__)
                                            ^ here

> Does it help to simply change both sides of the || expression?

It seems that the GCC preprocessor chokes because it attempts to evaluate the entire expression.

You may want to #define HAS_BUILTIN_PREFETCH or something as a separate step, but you can't combine the __has_builtin with the defined(__GNUC__).


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Mail converted by MHonArc 2.6.19+