Changeset 9a4eca5 in rtems


Ignore:
Timestamp:
Aug 10, 2016, 3:07:29 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
03c1038
Parents:
709594f0
git-author:
Chris Johns <chrisj@…> (08/10/16 03:07:29)
git-committer:
Chris Johns <chrisj@…> (08/11/16 07:20:10)
Message:

build-system: Always enable C++ if the compiler is present.

We always build a C++ compiler and building with C++ does not effect
RTEMS or the runtime. This patch always enabled the support. There is
no need to manually enable it any more.

You can disable C++ with '--disable-cxx'.

If an architecture does not have a C++ compiler support is automatically
disabled.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • aclocal/enable-cxx.m4

    r709594f0 r9a4eca5  
    33AC_ARG_ENABLE(cxx,
    44[AS_HELP_STRING([--enable-cxx],
    5 [enable C++ support and build the rtems++ library])],
     5[enable C++ support])],
    66[case "${enable_cxx}" in
    77  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
    88  no) RTEMS_HAS_CPLUSPLUS=no   ;;
    99  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
    10 esac], [RTEMS_HAS_CPLUSPLUS=no])
     10esac], [RTEMS_HAS_CPLUSPLUS=yes])
    1111])
  • c/src/aclocal/enable-cxx.m4

    r709594f0 r9a4eca5  
    22[
    33AC_ARG_ENABLE(cxx,
    4 [AS_HELP_STRING(--enable-cxx,enable C++ support and build the rtems++ library)],
     4[AS_HELP_STRING([--enable-cxx],
     5[enable C++ support])],
    56[case "${enable_cxx}" in
    67  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
    78  no) RTEMS_HAS_CPLUSPLUS=no   ;;
    89  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
    9 esac], [RTEMS_HAS_CPLUSPLUS=no])
     10esac], [RTEMS_HAS_CPLUSPLUS=yes])
    1011])
  • c/src/aclocal/prog-cxx.m4

    r709594f0 r9a4eca5  
    1 dnl 
     1dnl
    22dnl Check for target g++
    3 dnl 
     3dnl
    44
    55AC_DEFUN([RTEMS_PROG_CXX_FOR_TARGET],
     
    1919if test "$RTEMS_HAS_CPLUSPLUS" = "yes";
    2020then
    21 dnl Only accept g++
    22 dnl NOTE: This might be too restrictive
    23 test -z "$CXX" \
    24   && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
    25 AC_PROG_CXX
    26 AC_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])
     21  dnl Only accept g++
     22  dnl NOTE: This might be too restrictive
     23  if test -z "$CXX";
     24  then
     25    RTEMS_HAS_CPLUSPLUS=no
     26    HAS_CPLUSPLUS=no
     27    ## Work-around to a bug in automake
     28    AM_CONDITIONAL([am__fastdepCXX],[false])
     29  else
     30    AC_PROG_CXX
     31    AC_PROG_CXXCPP
     32    if test "$ac_cv_prog_cc_cross" != "$ac_cv_prog_cxx_cross"; then
     33      AC_MSG_ERROR([***]
     34       [Inconsistency in compiler configuration:]
     35       [Target C compiler and target C++ compiler]
     36       [must both either be cross compilers or native compilers])
     37    fi
    3338  fi
    3439else
    35 ## Work-around to a bug in automake
    36 AM_CONDITIONAL([am__fastdepCXX],[false])
     40  ## Work-around to a bug in automake
     41  AM_CONDITIONAL([am__fastdepCXX],[false])
    3742fi
    3843])
  • c/src/configure.ac

    r709594f0 r9a4eca5  
    1717RTEMS_ENABLE_MULTILIB
    1818RTEMS_ENABLE_MULTIPROCESSING
     19RTEMS_ENABLE_CXX
    1920RTEMS_ENV_RTEMSBSP
    2021
     
    9495
    9596RTEMS_PROG_CC_FOR_TARGET
     97RTEMS_PROG_CXX_FOR_TARGET
    9698AM_PROG_CC_C_O
    9799RTEMS_PROG_CCAS
  • cpukit/configure.ac

    r709594f0 r9a4eca5  
    1414RTEMS_ENABLE_MULTIPROCESSING
    1515RTEMS_ENABLE_POSIX
     16RTEMS_ENABLE_CXX
    1617RTEMS_ENABLE_RTEMS_DEBUG
    1718RTEMS_ENABLE_NETWORKING
     
    3233
    3334RTEMS_PROG_CC_FOR_TARGET
     35RTEMS_PROG_CXX_FOR_TARGET
     36AM_PROG_CC_C_O
     37RTEMS_CANONICALIZE_TOOLS
    3438RTEMS_PROG_CCAS
    35 RTEMS_CANONICALIZE_TOOLS
    36 AM_PROG_CC_C_O
    3739AC_PROG_RANLIB
    3840
  • testsuites/aclocal/enable-cxx.m4

    r709594f0 r9a4eca5  
    22[
    33AC_ARG_ENABLE(cxx,
    4 [AS_HELP_STRING(--enable-cxx,enable C++ support and build the rtems++ library)],
     4[AS_HELP_STRING([--enable-cxx],
     5[enable C++ support])],
    56[case "${enable_cxx}" in
    67  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
    78  no) RTEMS_HAS_CPLUSPLUS=no   ;;
    89  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
    9 esac], [RTEMS_HAS_CPLUSPLUS=no])
     10esac], [RTEMS_HAS_CPLUSPLUS=yes])
    1011])
  • testsuites/aclocal/prog-cxx.m4

    r709594f0 r9a4eca5  
    1 dnl 
     1dnl
    22dnl Check for target g++
    3 dnl 
     3dnl
    44
    55AC_DEFUN([RTEMS_PROG_CXX_FOR_TARGET],
     
    1010
    1111# If CXXFLAGS is not set, default to CFLAGS
    12 if test x"$rtems_cv_RTEMS_SMP" = x"yes" ; then
     12if test x"$rtems_cv_HAS_SMP" = x"yes" ; then
    1313  CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11}
    1414else
     
    1919if test "$RTEMS_HAS_CPLUSPLUS" = "yes";
    2020then
    21 dnl Only accept g++
    22 dnl NOTE: This might be too restrictive
    23 test -z "$CXX" \
    24   && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
    25 AC_PROG_CXX
    26 AC_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])
     21  dnl Only accept g++
     22  dnl NOTE: This might be too restrictive
     23  if test -z "$CXX";
     24  then
     25    RTEMS_HAS_CPLUSPLUS=no
     26    HAS_CPLUSPLUS=no
     27    ## Work-around to a bug in automake
     28    AM_CONDITIONAL([am__fastdepCXX],[false])
     29  else
     30    AC_PROG_CXX
     31    AC_PROG_CXXCPP
     32    if test "$ac_cv_prog_cc_cross" != "$ac_cv_prog_cxx_cross"; then
     33      AC_MSG_ERROR([***]
     34       [Inconsistency in compiler configuration:]
     35       [Target C compiler and target C++ compiler]
     36       [must both either be cross compilers or native compilers])
     37    fi
    3338  fi
    3439else
    35 ## Work-around to a bug in automake
    36 AM_CONDITIONAL([am__fastdepCXX],[false])
     40  ## Work-around to a bug in automake
     41  AM_CONDITIONAL([am__fastdepCXX],[false])
    3742fi
    3843])
  • testsuites/configure.ac

    r709594f0 r9a4eca5  
    1818RTEMS_PROJECT_ROOT
    1919
     20RTEMS_PROG_CC_FOR_TARGET
     21RTEMS_PROG_CXX_FOR_TARGET
     22RTEMS_CANONICALIZE_TOOLS
     23AM_PROG_CC_C_O
     24
    2025RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
    21 RTEMS_PROG_CC
    2226
    2327RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
Note: See TracChangeset for help on using the changeset viewer.