beecrypt: enable OpenMP if Buildroot GCC supports it
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
--- package/beecrypt/beecrypt.mk | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
package/beecrypt/beecrypt.mk +6 -0
@@ -18,6 +18,12 @@ BEECRYPT_CONF_OPT = \ --without-java \ --without-python +ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +BEECRYPT_CONF_OPT += --enable-openmp +else +BEECRYPT_CONF_OPT += --disable-openmp +endif + ifeq ($(BR2_PACKAGE_ICU),y) # C++ support needs icu BEECRYPT_DEPENDENCIES += icu
Signature · 1 line
1.7.7.6
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
Quoted 11 lines · Stefan Fr?berg
Signed-off-by Stefan Fr?berg<[email protected]>--- package/beecrypt/beecrypt.mk | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)package/beecrypt/beecrypt.mk +0
-0
package/beecrypt/beecrypt.mk BEECRYPT_CONF_OPT = \ · line 26
Quoted 9 lines
package/beecrypt/beecrypt.mk +6
-0@@ -18,6 +18,12 @@ BEECRYPT_CONF_OPT = \ --without-java \ --without-python +ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +BEECRYPT_CONF_OPT += --enable-openmp +else +BEECRYPT_CONF_OPT += --disable-openmp +endif +
This doesn't solve the underlying issue that -lgomp isn't included. In
addition, it would only enable openmp for internal toolchains, while it may be present for ct-ng or external toolchains as well. I think the automatic detection works well in this case.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
13.10.2012 12:29, Arnout Vandecappelle kirjoitti:
Quoted 15 lines · Stefan Fr?berg
Quoted 14 lines
Signed-off-by Stefan Fr?berg<[email protected]>--- package/beecrypt/beecrypt.mk | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)package/beecrypt/beecrypt.mk +0
-0@@ -18,6 +18,12 @@ BEECRYPT_CONF_OPT = \ --without-java \ --without-python
Quoted 14 lines
package/beecrypt/beecrypt.mk BEECRYPT_CONF_OPT = \ · line 26
Quoted 6 lines
package/beecrypt/beecrypt.mk +6
-0+ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +BEECRYPT_CONF_OPT += --enable-openmp +else +BEECRYPT_CONF_OPT += --disable-openmp +endif +This doesn't solve the underlying issue that -lgomp isn't included. In
addition, it would only enable openmp for internal toolchains, while it may
be present for ct-ng or external toolchains as well. I think the automatic
detection works well in this case.
Yeah, but how do you test the presence of OpenMP in case of external toolchain ?
Checking if /usr/lib/libgomp.so.* are present ?
Parsing the output of external toolchain "gcc -v" ? (there is not even configure switch for OpenMP in current gcc)
There are just too many variables and corner cases when it comes for testing various features of buildroot external toolchains.
And the automatic detection didn't work for Alexander and he was even using the internal toolchain
(if Im not wrong he uses ARM version of internal buildroot toolchain ?)
Best regards
Stefan
Quoted 2 lines
Regards,
Arnout
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
Quoted 2 lines · Stefan Fr?berg
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
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
13.10.2012 16:29, Arnout Vandecappelle kirjoitti:
Quoted 12 lines · Stefan Fr?berg
Quoted 2 lines
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 theOPENMP_CFLAGSgiven by autoconf to determine if OpenMP is
available or not - but*OPENMP_CFLAGSmay be empty if OpenMP is already enabled
without any CFLAGS*. So it should instead check onac_cv_prog_c_openmp.
Quoted 2 lines
Regards,
Arnout
Isn't that ac_cv_prog_c_openmp in configure file the same as AC_OPENMP macro ?
/"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>
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
2012/10/13 Stefan Fr?berg <[email protected]>
Quoted 57 lines
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 theOPENMP_CFLAGSgiven by autoconf to determine if OpenMP is
available or not - but*OPENMP_CFLAGSmay be empty if OpenMP is already enabled
without any CFLAGS*. So it should instead check onac_cv_prog_c_openmp.Regards,
ArnoutIsn't that
ac_cv_prog_c_openmpin configure file the same asAC_OPENMPmacro ?And from:
*"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'sOPENMP_CFLAGSto empty. No OpenMP for you.
2 ) If compiler has no clue how to activate OpenMP, it will setOPENMP_CFLAGSto empty. No OpenMP for you.
3 ) If user refuses to use OpenMP with --disable-openmp (like in that my patch) it will setOPENMP_CFLAGSto 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_cconfigureconfigure:17706 OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;;
This all sounds soooo messy.
Regards:
Stefan
Quoted 5 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Use my patch please
http://pastie.org/pastes/5052617/text
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121013/9e124293/attachment-0001.html>
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
13.10.2012 17:54, Alexander Khryukin kirjoitti:
Quoted 66 lines
2012/10/13 Stefan Fr?berg <[email protected] <mailto:[email protected]>>
13.10.2012 16:29, Arnout Vandecappelle kirjoitti:Quoted 14 lines · Stefan Fr?berg
Quoted 3 lines
And the automatic detection didn't work for Alexander and he was even
using the internal toolchainThe automatic detection did work (and it's part of autoconf,
BTW). However,
beecrypt uses theOPENMP_CFLAGSgiven by autoconf to determine if OpenMP is
available or not - but*OPENMP_CFLAGSmay be empty if OpenMP is already enabled
without any CFLAGS*. So it should instead check onac_cv_prog_c_openmp.Quoted 2 lines
Regards,
ArnoutIsn't that
ac_cv_prog_c_openmpin configure file the same asAC_OPENMPmacro ?/"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'sOPENMP_CFLAGSto empty. No OpenMP for you.
2 ) If compiler has no clue how to activate OpenMP, it will setOPENMP_CFLAGSto empty. No OpenMP for you.
3 ) If user refuses to use OpenMP with --disable-openmp (like in that my patch) it will setOPENMP_CFLAGSto 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_cconfigureconfigure:17706 OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;;
This all sounds soooo messy.
Regards:
Stefan_______________________________________________
buildroot mailing list
buildroot at busybox.net <mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot
Quoted 4 lines
Use my patch please
I would but your patch forces the use of OpenMP in beecrypt, even in case when user's gcc does not have that for his/hers gcc. So it will end to link error for those users.
So the beecrypt should have handled the OpenMP support by autodetecting it (and you do have OpenMP in your gcc) in configure process. But it did not.
And Im curious to know why.
Maybe someone could show what that mysterious AC_OPENMP actually does ...
Regards
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121013/bc6d4cbd/attachment.html>
PATCH 1/1 beecrypt: enable OpenMP if Buildroot GCC supports it
In reply to Alexander KhryukinQuoted 3 lines · Alexander Khryukin
Use my patch please
That patch adds -lgomp unconditionally, even if OpenMP is not available.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F