Patchwork fix up fixincludes for VxWorks and fix testing

login
register
mail settings
Submitter rbmj
Date Oct. 2, 2012, 6:13 p.m.
Message ID <506B2EC5.4090604@verizon.net>
Download mbox | patch
Permalink /patch/188595/
State New
Headers show

Comments

rbmj - Oct. 2, 2012, 6:13 p.m.
Patch 3: Add --enable-libstdcxx option at top level configure

TODO prior to commit:

* configure: regenerate

ChangeLog:

* configure.ac: Add --enable-libstdcxx option

Patch

From 3f0d38b7b7b70659a57ac4266701a71a5f948860 Mon Sep 17 00:00:00 2001
From: rbmj <rbmj@verizon.net>
Date: Tue, 2 Oct 2012 13:54:21 -0400
Subject: [PATCH 3/4] Add --enable-libstdcxx option at top level configure

---
 configure.ac |   38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index f0d86d9..5325695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -427,6 +427,15 @@  AC_ARG_ENABLE(libssp,
 ENABLE_LIBSSP=$enableval,
 ENABLE_LIBSSP=yes)
 
+AC_ARG_ENABLE(libstdcxx,
+AS_HELP_STRING([--disable-libstdcxx],
+  [do not build libstdc++-v3 directory]),
+ENABLE_LIBSTDCXX=$enableval,
+ENABLE_LIBSTDCXX=default)
+[if test "${ENABLE_LIBSTDCXX}" = "no" ; then
+  noconfigdirs="$noconfigdirs libstdc++-v3"
+fi]
+
 # Save it here so that, even in case of --enable-libgcj, if the Java
 # front-end isn't enabled, we still get libgcj disabled.
 libgcj_saved=$libgcj
@@ -562,19 +571,22 @@  case "${target}" in
 esac
 
 # Disable libstdc++-v3 for some systems.
-case "${target}" in
-  *-*-vxworks*)
-    # VxWorks uses the Dinkumware C++ library.
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  arm*-wince-pe*)
-    # the C++ libraries don't build on top of CE's C libraries
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-  avr-*-*)
-    noconfigdirs="$noconfigdirs target-libstdc++-v3"
-    ;;
-esac
+# Allow user to override this if they pass --enable-libstdc++-v3
+if test "${ENABLE_LIBSTDCXX}" = "default" ; then
+  case "${target}" in
+    *-*-vxworks*)
+      # VxWorks uses the Dinkumware C++ library.
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+    arm*-wince-pe*)
+      # the C++ libraries don't build on top of CE's C libraries
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+    avr-*-*)
+      noconfigdirs="$noconfigdirs target-libstdc++-v3"
+      ;;
+  esac
+fi
 
 # Disable Fortran for some systems.
 case "${target}" in
-- 
1.7.10.4