On Mon, 12 Jul 2010, Siarhei Siamashka wrote:

> On Sunday 11 July 2010 13:24:43 M Joonas Pihlaja wrote:
> > Check that the OpenMP pragmas don't cause link errors.
> > 
> > This patch adds extra guards around our use of OpenMP pragmas and checks 
> > that
> > the pragmas won't cause link errors. This fixes the build on Tru64 and
> > Solaris with the native compilers and clang. 
> 
> Do you have any thought about what could be the root cause of this problem?

Broken or incomplete OpenMP support or incomplete installation of 
supporting libraries.  Unusable OpenMP seems fairly common IME.

> Now I see a potential case when it can fail: autotools fail to detect OpenMP 
> support (and the right options for the linker), but the compiler generates 
> some 
> code for the pragmas.

Right, it's a bit of a mess.  We don't *really* know if any of it 
works without actually running it, but of course that's got its own 
problems.

> Could you try wrapping OpenMP pragmas into '#ifdef _OPENMP' (it is a 
> predefined 
> macro from OpenMP standard) and see whether it helps?

I can add this too, but this doesn't cover for the case where the 
compiler thinks it supports openmp, but the required libraries aren't 
installed.

> Also I wonder whether autotools detect OpenMP support in Solaris properly. 
> Searching on the Internet reveals that '-xopenmp' might be the right option 
> there.

Yes, it did detect the correct flag.

Cheers,

Joonas
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to