]> gcc.gnu.org Git - gcc.git/commitdiff
final patch for enabling VxWorks
authorRobert Mason <rbmj@verizon.net>
Sat, 3 Nov 2012 15:53:28 +0000 (15:53 +0000)
committerBruce Korb <korbb@gcc.gnu.org>
Sat, 3 Nov 2012 15:53:28 +0000 (15:53 +0000)
From-SVN: r193124

ChangeLog
configure.ac
gcc/ChangeLog
gcc/gcov-io.c
libstdc++-v3/ChangeLog
libstdc++-v3/config/os/vxworks/os_defines.h

index ffce6913488f8be15eb6b01eb71d8033780ccae5..961340b999792efbff8642f8df93a17f29ca7fac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-03  Robert Mason  <rbmj@verizon.net>
+
+       * configure.ac: add --disable-libstdcxx configure option
+       and handle defaulted state only for VxWorks, ARM-wince-pe and AVR.
+
 2012-10-30 Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
 
        * MAINTAINERS (Write After Approval): Add myself.
index c6665a1f33a87ac67b86d0d51ab8b81794294078..a21cd8a5488bf9cc20e87afd86abc281b8fd6934 100644 (file)
@@ -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
index 0043200c12c5ecb7f26bd71c53c5a7d524a59044..e3eb2f26754396092060e8a1f58cac74d407fb9b 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-03  Robert Mason  <rbmj@verizon.net>
+
+       * gcov-io.c (gcov_open): Add file mode to open call (need for VxWorks)
+
 2012-11-03  Sandra Loosemore  <sandra@codesourcery.com>
 
        * doc/extend.texi: Copy-edit to use present tense except when
index d64fb42c3c2868cb7c072a65b5ad09f789449078..f5626542521f91a6b5b4b31b6d2e70ea0359301b 100644 (file)
@@ -92,7 +92,8 @@ gcov_open (const char *name, int mode)
     {
       /* Read-only mode - acquire a read-lock.  */
       s_flock.l_type = F_RDLCK;
-      fd = open (name, O_RDONLY);
+      /* pass mode (ignored) for compatibility */
+      fd = open (name, O_RDONLY, S_IRUSR | S_IWUSR);
     }
   else
     {
index 75a3e11a8e8f2f23fb3e1b0b4d332ef8cff0d3d0..3ceefae51f70a91462e58d3daaf147479e5a4d7e 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-03  Robert Mason  <rbmj@verizon.net>
+
+       * config/os/vxworks/os_defines.h:
+       Keep vxWorks from defining min()/max() as macros
+
 2012-11-03  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * doc/html/*: Regenerate.
index c66063e53110c800b5af8b85cb9352d47ef25a95..93ad1d4b01f11e25933db62a77351ab8168c32ce 100644 (file)
 // System-specific #define, typedefs, corrections, etc, go here.  This
 // file will come before all others.
 
+//Keep vxWorks from defining min()/max() as macros
+#ifdef NOMINMAX
+#undef NOMINMAX
+#endif
+#define NOMINMAX 1
+
 #endif
This page took 0.116064 seconds and 5 git commands to generate.