[PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

Iain Buclaw ibuclaw@gdcproject.org
Mon Aug 17 08:08:34 GMT 2020


Hi,

Currently when building a cross-compiler targeting arm-wrs-vxworks7, the
selftests fail unless the VSB_DIR environment variable is set.

The same !nostdinc condition is used for VXWORKS_ADDITIONAL_CPP_SPEC.

OK for mainline?

Iain.

---
gcc/ChangeLog:

	* config/vxworks.h (STARTFILE_PREFIX_SPEC): Avoid using VSB_DIR if
	-nostdinc is used.
---
 gcc/config/vxworks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index d648d2f23cb..065c9e12b88 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -108,7 +108,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #if TARGET_VXWORKS7
 #undef  STARTFILE_PREFIX_SPEC
-#define STARTFILE_PREFIX_SPEC "%:getenv(VSB_DIR /usr/lib/common)"
+#define STARTFILE_PREFIX_SPEC "%{!nostdinc:%:getenv(VSB_DIR /usr/lib/common)}"
 #define TLS_SYM "-u __tls__"
 #else
 #define TLS_SYM ""
-- 
2.20.1



More information about the Gcc-patches mailing list