VXWORKS_ADDITIONAL_CPP_SPEC has an artificial guard on -fself-test to prevent all-gcc build failures from self-tests in environments where VSB_DIR is not defined.
The libraries are not built during such checks; having a VxWorks installation at hand is not necessary, and requiring VSB_DIR to be defined is inappropriate. The attached patch replaces the use of %getenv(VSB_DIR) from VXWORKS_ADDITIONAL_CPP_SPEC by $sysroot references, which allows removing the artifical guard of -fself-tests. We have been using this in production compilers for a few years now and this passes a mainline build for --target=powerpc-wrs-vxworks7r2. Committing to mainline. 2025-10-21 Olivier Hainque <[email protected]> * config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove guard on -fself-tests and replace %:getenv(VSB_DIR) by sysroot references.
0001-Replace-VSB_DIR-by-sysroot-ref-in-VXWORKS_ADDITIONAL.patch
Description: Binary data
