config.gcc arranges for vxworks 7r2+ targets to include linux.h, because of the similarity, but linux.h defines TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL to a function declared in linux-protos.h, and defined in linux.cc, neither of which vxworks targets include. Undefine it in vxworks.h.
Tested with gcc-14 targeting ppc-vx7r2 and ppc64-vx7r2. Also tested with trunk on ppc64le-linux-gnu, and with gcc-14 targeting powerpc-elf. Ok to install? for gcc/ChangeLog * config/vxworks.h (TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL): Undefine. --- gcc/config/vxworks.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h index 204a8e000d405..1ad4c1553ba9b 100644 --- a/gcc/config/vxworks.h +++ b/gcc/config/vxworks.h @@ -433,3 +433,6 @@ extern void vxworks_emit_call_builtin___clear_cache (rtx begin, rtx end); so silence the warning (instead of passing -flinker-output=nolto-rel). */ #undef LTO_PLUGIN_SPEC #define LTO_PLUGIN_SPEC "%{!mrtp:-plugin-opt=-linker-output-auto-nolto-rel}" + +/* Undo the linux.h definition. */ +#undef TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL -- Alexandre Oliva, happy hacker https://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!