source: rtems/c/src/aclocal/prog-cxx.m4 @ 8fbe2e6

4.115
Last change on this file since 8fbe2e6 was 6821a629, checked in by Sebastian Huber <sebastian.huber@…>, on 09/08/14 at 08:19:42

Add -std=gnu++11 to CXXFLAGS if SMP is enabled

This is necessary to use the <atomic> header file used for the atomic
operations.

  • Property mode set to 100644
File size: 936 bytes
Line 
1dnl
2dnl Check for target g++
3dnl
4
5AC_DEFUN([RTEMS_PROG_CXX_FOR_TARGET],
6[
7AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
8AC_REQUIRE([RTEMS_ENABLE_CXX])
9AC_REQUIRE([RTEMS_CHECK_SMP])
10
11# If CXXFLAGS is not set, default to CFLAGS
12if test x"$rtems_cv_HAS_SMP" = x"yes" ; then
13  CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11}
14else
15  CXXFLAGS=${CXXFLAGS-${CFLAGS}}
16fi
17
18RTEMS_CHECK_TOOL(CXX,g++)
19if test "$RTEMS_HAS_CPLUSPLUS" = "yes";
20then
21dnl Only accept g++
22dnl NOTE: This might be too restrictive
23test -z "$CXX" \
24  && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
25AC_PROG_CXX
26AC_PROG_CXXCPP
27
28  if test "$ac_cv_prog_cc_cross" != "$ac_cv_prog_cxx_cross"; then
29    AC_MSG_ERROR([***]
30     [Inconsistency in compiler configuration:]
31     [Target C compiler and target C++ compiler]
32     [must both either be cross compilers or native compilers])
33  fi
34else
35## Work-around to a bug in automake
36AM_CONDITIONAL([am__fastdepCXX],[false])
37fi
38])
Note: See TracBrowser for help on using the repository browser.