Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Fröberg" <stefan.froberg@petroprogram.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] beecrypt: enable OpenMP if Buildroot GCC supports it
Date: Sat, 13 Oct 2012 17:07:31 +0300	[thread overview]
Message-ID: <507975A3.8080009@petroprogram.com> (raw)
In-Reply-To: <50796CB1.8040106@mind.be>

13.10.2012 16:29, Arnout Vandecappelle kirjoitti:
> On 13/10/12 15:25, Stefan Fr?berg wrote:
>> And the automatic detection didn't work for Alexander and he was even
>> using the internal toolchain
>
>  The automatic detection did work (and it's part of autoconf, BTW). 
> However,
> beecrypt uses the OPENMP_CFLAGS given by autoconf to determine if
> OpenMP is
> available or not - but *OPENMP_CFLAGS may be empty if OpenMP is
> already enabled
> without any CFLAGS*.  So it should instead check on ac_cv_prog_c_openmp.
>
>  Regards,
>  Arnout

Isn't that ac_cv_prog_c_openmp in configure file the same as AC_OPENMP
macro ?

And from:
https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Generic-Compiler-Characteristics.html

/"If the current language is C, the macro //|AC_OPENMP|//sets the
variable //|OPENMP_CFLAGS|//to the C compiler flags needed for
supporting OpenMP. /*/|OPENMP_CFLAGS|/**/is set to empty if the compiler
already supports OpenMP, if it has no way to activate OpenMP support, or
if the user rejects OpenMP support by invoking ?/**/configure/**/? with
the ?/**/--disable-openmp/*/*? option.* //"//
/
So from that:
1 ) If compiler *supports* OpenMP it set's  OPENMP_CFLAGS to empty. No
OpenMP for you.
2 ) If compiler has no clue how to activate OpenMP, it will set
OPENMP_CFLAGS to empty. No OpenMP for you.
3 ) If user refuses to use OpenMP with --disable-openmp (like in that my
patch) it will set OPENMP_CFLAGS to empty. No OpenMP for you.


Quick grepping of beecrypt-4.2.1 configure file shows that   
OPENMP_CFLAGS=ac_cv_prog_c_openmp

grep -n ac_cv_prog_c configure

configure:17706     OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;;

This all sounds soooo messy.

Regards:
Stefan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121013/343d40e4/attachment.html>

  reply	other threads:[~2012-10-13 14:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 19:54 [Buildroot] [PATCH] beecrypt: enable OpenMP if Buildroot GCC supports it Stefan Fröberg
2012-10-13  9:29 ` Arnout Vandecappelle
2012-10-13 13:25   ` Stefan Fröberg
2012-10-13 13:29     ` Arnout Vandecappelle
2012-10-13 14:07       ` Stefan Fröberg [this message]
2012-10-13 14:54         ` Alexander Khryukin
2012-10-13 15:07           ` Stefan Fröberg
2012-10-13 20:56           ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507975A3.8080009@petroprogram.com \
    --to=stefan.froberg@petroprogram.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox