From d00f8b405679e2744e7a9789a7a6eaa6e2f21d78 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Tue, 18 Feb 2020 09:59:56 +0000 Subject: [PATCH] Fallback to default CPP spec for C++ on VxWorks Arrange to inhibit the effects of CPLUSPLUS_CPP_SPEC in gnu-user.h, which #defines _GNU_SOURCE, which is invalid for VxWorks (possibly not providing ::mkstemp, for example). 2020-10-14 Olivier Hainque gcc/ * config/vxworks.h: #undef CPLUSPLUS_CPP_SPEC. --- gcc/config/vxworks.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h index e50260b08e4..d3c417e7f5a 100644 --- a/gcc/config/vxworks.h +++ b/gcc/config/vxworks.h @@ -70,6 +70,12 @@ along with GCC; see the file COPYING3. If not see #endif +/* Our ports rely on gnu-user.h, which #defines _POSIX_SOURCE for + C++ by default. VxWorks doesn't provide 100% of what this implies + (e.g. ::mkstemp), so, arrange to prevent that by falling back to + the default CPP spec for C++ as well. */ +#undef CPLUSPLUS_CPP_SPEC + /* For VxWorks static rtps, the system provides libc_internal.a, a superset of libgcc.a that we need to use e.g. to satisfy references to __init and __fini. We still want our libgcc to prevail for symbols it would provide -- 2.30.2