5
Last change
on this file since 9a4eca5 was
9a4eca5,
checked in by Chris Johns <chrisj@…>, on 08/10/16 at 03:07:29
|
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.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[9a4eca5] | 1 | dnl |
---|
[867ab080] | 2 | dnl Check for target g++ |
---|
[9a4eca5] | 3 | dnl |
---|
[867ab080] | 4 | |
---|
[9550125e] | 5 | AC_DEFUN([RTEMS_PROG_CXX_FOR_TARGET], |
---|
[867ab080] | 6 | [ |
---|
| 7 | AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl |
---|
| 8 | AC_REQUIRE([RTEMS_ENABLE_CXX]) |
---|
[6821a629] | 9 | AC_REQUIRE([RTEMS_CHECK_SMP]) |
---|
| 10 | |
---|
| 11 | # If CXXFLAGS is not set, default to CFLAGS |
---|
| 12 | if test x"$rtems_cv_HAS_SMP" = x"yes" ; then |
---|
| 13 | CXXFLAGS=${CXXFLAGS-${CFLAGS} -std=gnu++11} |
---|
| 14 | else |
---|
| 15 | CXXFLAGS=${CXXFLAGS-${CFLAGS}} |
---|
| 16 | fi |
---|
| 17 | |
---|
[867ab080] | 18 | RTEMS_CHECK_TOOL(CXX,g++) |
---|
| 19 | if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; |
---|
| 20 | then |
---|
[9a4eca5] | 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 |
---|
[867ab080] | 38 | fi |
---|
| 39 | else |
---|
[9a4eca5] | 40 | ## Work-around to a bug in automake |
---|
| 41 | AM_CONDITIONAL([am__fastdepCXX],[false]) |
---|
[867ab080] | 42 | fi |
---|
| 43 | ]) |
---|
Note: See
TracBrowser
for help on using the repository browser.