Hello Iain, > On 17 Aug 2020, at 10:08, Iain Buclaw <ibuc...@gdcproject.org> wrote: > > 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? Thanks for proposing this patch. I'd rather remove the self-tests -> -nostdinc thing, apparently introduced explicitly for VxWorks and this dependency on environment variables in specs. Can you please just test for fself-test instead, in both cases, with a comment like "Self-tests may be run in contexts where the VxWorks environment isn't available. Prevent attempts at designating the location of runtime header files, libraries or startfiles, which would fail on unset environment variables and aren't needed for such tests." ? Thanks in advance, Best Regards, Olivier > 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 >