Skip to content

Commit

Permalink
final patch for enabling VxWorks
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193124 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
korbb committed Nov 3, 2012
1 parent 12dd2b3 commit d3cf0a3
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 14 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
38 changes: 25 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion gcc/gcov-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
5 changes: 5 additions & 0 deletions libstdc++-v3/ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions libstdc++-v3/config/os/vxworks/os_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@
// 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

0 comments on commit d3cf0a3

Please sign in to comment.