Re: [PATCH] [RTEMS] Always use atomic builtins for libstdc++

2016-09-27 Thread Sebastian Huber

On 22/09/16 12:55, Jonathan Wakely wrote:

[...]
N.B. if you're going to require libatomic for RTEMS then you should
check if the preprocessor conditions in libsupc++/exception_ptr.h
and libsupc++/eh_ptr.cc are appropriate. If exception_ptr is not
currently enabled for RTEMS then you could enable it, since libatomic
will ensure the required atomics are available. 


Thanks for the hint. I added a ticket for RTEMS:

http://devel.rtems.org/ticket/2791

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] [RTEMS] Always use atomic builtins for libstdc++

2016-09-22 Thread Sebastian Huber



On 22/09/16 10:47, Jonathan Wakely wrote:

On 22/09/16 09:41 +0200, Sebastian Huber wrote:

libstdc++-v3/
* config/cpu/m68k/atomicity.h: Adjust comment.
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Honor
explicit atomicity_dir setup via configure.host.
* configure.host (rtems-*): Set atomicity_dir.
* configure: Regenerate.
---
libstdc++-v3/acinclude.m4|  5 +++--
libstdc++-v3/config/cpu/m68k/atomicity.h |  3 +++
libstdc++-v3/configure   | 11 ++-
libstdc++-v3/configure.host  |  4 
4 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 6d897be..3256ce4 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -3490,9 +3490,10 @@ EOF
  AC_LANG_RESTORE

  # Set atomicity_dir to builtins if all but the long long test above 
passes.

-  if test "$glibcxx_cv_atomic_bool" = yes \
+  if ( test "$glibcxx_cv_atomic_bool" = yes \
 && test "$glibcxx_cv_atomic_short" = yes \
- && test "$glibcxx_cv_atomic_int" = yes; then
+ && test "$glibcxx_cv_atomic_int" = yes ) \
+ || test "$atomicity_dir" = "cpu/generic/atomicity_builtins"; then


Could you adjust the comment too please? Maybe something like:

  # Set atomicity_dir to builtins if all but the long long test above 
passes,

  # or if the builtins were already chosen (e.g. by configure.host).

OK with an adjusted comment, thanks.




Thanks for the quick review. I would like to back port this to GCC 6.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel