Changeset 6821a629 in rtems


Ignore:
Timestamp:
Sep 8, 2014, 8:19:42 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
80ad7090
Parents:
d11e6efe
git-author:
Sebastian Huber <sebastian.huber@…> (09/08/14 08:19:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/08/14 09:13:53)
Message:

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

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/aclocal/prog-cxx.m4

    rd11e6efe r6821a629  
    77AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
    88AC_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
    918RTEMS_CHECK_TOOL(CXX,g++)
    1019if test "$RTEMS_HAS_CPLUSPLUS" = "yes";
    1120then
    12   CXXFLAGS=${CXXFLAGS-${CFLAGS}}
    13 
    1421dnl Only accept g++
    1522dnl NOTE: This might be too restrictive
  • testsuites/aclocal/prog-cxx.m4

    rd11e6efe r6821a629  
    77AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
    88AC_REQUIRE([RTEMS_ENABLE_CXX])
     9RTEMS_CHECK_CPUOPTS([RTEMS_SMP])
    910
    1011# If CXXFLAGS is not set, default to CFLAGS
    11 CXXFLAGS=${CXXFLAGS-${CFLAGS}}
     12if test x"$rtems_cv_RTEMS_SMP" = x"yes" ; then
     13  CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11}
     14else
     15  CXXFLAGS=${CXXFLAGS-${CFLAGS}}
     16fi
    1217
    1318RTEMS_CHECK_TOOL(CXX,g++)
Note: See TracChangeset for help on using the changeset viewer.