autoconf-patches
[Top][All Lists]
Advanced

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

Re: detection and support of OpenMP


From: Paul Eggert
Subject: Re: detection and support of OpenMP
Date: Thu, 17 May 2007 12:14:17 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

>> How would one use OPENMP_CFLAGS?  Does -fopenmp need to be added to
>> both CFLAGS and CPPFLAGS?  Is that why it's not merely put into
>> CFLAGS?
>
> It's needed for compiling and for linking. As far as I can tell, it's not
> needed for preprocessing, since <omp.h> is found in the compiler's search
> path anyway.

Thanks, but earlier you mentioned the _OPENMP macro -- is that defined
by <omp.h>, or is it predefined by cpp?  I just now checked
<http://docs.hp.com/en/B3901-90012/ch08s05.html>, and it implies
(though it doesn't say) that _OPENMP is predefined by cpp.  If so,
OPENMP_CFLAGS needs to be put into CPPFLAGS too, and the problem needs
to be documented.


> When an app doesn't use OpenMP (i.e. contains no #pragma omp and no use of
> <omp.h>), compiling with -fopenmp has no effect on the generated code.

In this case, I don't see the downside of having 'configure'
manipulate CC, CFLAGS, and/or CPPFLAGS to use the -fopenmp option
uniformly for all compiles.  This should be simpler and more reliable
than requiring the developer to put $(OPENMP_CFLAGS) all over the
place.  And it should address the CFLAGS/CPPFLAGS issue as well.




reply via email to

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