On Thu, 2016-06-30 at 08:38 -0400, Nathan Sidwell wrote: > Jan-Benedict, > > > I haven't given it any additional manual testing so far. It's > > pre-installation though. Maybe I'd just set WIND_BASE to some > > arbitrary value, just to make xgcc pass it's initial start-up test > > so > > that it can continue with self-testing? Or shall we set some value > > in gcc/Makefile.in for running the self-test? > > As I recall, WIND_BASE is expected to point at a vxworks install to > pick up > header files. It is an error not to have it set (silently skipping > it leads to > user confusion). > > If that's irrelevant for this testing environment, then setting it to > something > (probably just "", but safer might be > "/These.are.not.the.dirs.you.are.looking.for") should be fine.
Sorry about the breakage. The error message appears to affect a few other targets within gcc/Makefile.in. For example: $ make s-macro_list echo | ./xgcc -B./ -B/usr/local/i686-wrs-vxworks/bin/ -isystem /usr/local/i686-wrs-vxworks/include -isystem /usr/local/i686-wrs -vxworks/sys-include -L/home/david/archive/huge/gcc-git-all -configs/selftest-multi-mk/i686-wrs-vxworks/gcc/../ld -E -dM - | \ sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \ -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ sort -u > tmp-macro_list xgcc: fatal error: environment variable ‘WIND_BASE’ not defined compilation terminated. /bin/sh /home/david/coding-3/gcc-git-unittests/src/gcc/../move-if -change tmp-macro_list macro_list cmp: EOF on tmp-macro_list echo timestamp > s-macro_list However the above issue doesn't fail the build: $ echo $? 0 It can be trivially reproduced like this: $ ./xgcc -B. -E - xgcc: fatal error: environment variable ‘WIND_BASE’ not defined compilation terminated. It happens due to evaluating this spec function: "getenv(WIND_BASE /target/h)" from this within gcc/config/vxworks.h: /* Since we provide a default -isystem, expand -isystem on the command line early. */ #undef VXWORKS_ADDITIONAL_CPP_SPEC #define VXWORKS_ADDITIONAL_CPP_SPEC \ "%{!nostdinc: \ %{isystem*} -idirafter \ %{mrtp: %:getenv(WIND_USR /h) \ ;: %:getenv(WIND_BASE /target/h)}}" Hence it appears that passing "-nostdinc" as a param will avoid the error: $ echo | ./xgcc -B. -E - -nostdinc # 1 "<stdin>" # 1 "<built-in>" # 1 "<command-line>" # 1 "<stdin>" $ echo $? 0 Presumably if you're explicitly building for vxworks you have a vxworks install, so there is a meaningful value to set WIND_BASE to, whereas if you don't have a vxworks install (and are merely building everything as a smoketest), you presumably only want to build the "gcc" subdir, since AFAIK you can't run then driver. So there are at least 2 ways of fixing this: (a) add "-nostdinc" when running the selftests i.e. to the invocations of GCC_FOR_TARGET in the "s-selftest" and "selftest-gdb" clauses of gcc/Makefile.in. I've verified that this fixes the issue for --target=i686-wrs-vxworks. (b) set WIND_BASE to a dummy value in contrib/config-list.mk (if not already set) so that the vxworks targets are able to at least build all of "gcc" without needing a vxworks install. Thoughts?