]> git.ipfire.org Git - thirdparty/gcc.git/commit
Infer TOOL/TOOL_FAMILY from vxworks-predef.h on VxWorks7
authorOlivier Hainque <hainque@adacore.com>
Sat, 20 Apr 2024 15:35:41 +0000 (12:35 -0300)
committerOlivier Hainque <hainque@adacore.com>
Mon, 20 Oct 2025 15:15:38 +0000 (15:15 +0000)
commitc3a37c4d5fe55878f81601fd16f1ce5259f4162f
treef51135711b24272c500958e1fecf8253dad09d96
parent4ce92328339a8ddf610cd2e371b7763cf5d25bd1
Infer TOOL/TOOL_FAMILY from vxworks-predef.h on VxWorks7

This change moves, for VxWorks 7, the setting of the TOOL
and TOOL_FAMILY macros from a builtin_define to a run-time
computation from vxworks-predefs.h.

This is useful on Vx7 to allow a single toolchain to be used
for instances of VxWorks based on either a gnu or an llvm system
toolchain for a given cpu (typically, powerpc).

This is achieved by leveraging the existence of a very basic
autoconf.h file in all VxWorks 7 VSBs, #included directly from
vxworks-predef.h.

gcc/
* config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): Only
builtin_define TOOL and TOOL_FAMILY for !TARGET_VXWORKS7.
Augment comment on VXWORKS_PERSONALITY.
* config/vxworks/vxworks-predef.h: Infer TOOL and TOOL_FAMILY
from the VSB autoconf.h when we have one, determined by the presence
of a _VSB_CONFIG_FILE definition.

libgcc/
* config/t-vxworks: -include vxworks-predef.h explicitly, as the
automatic inclusion is disabled by -nostdinc.
gcc/config/vxworks.h
gcc/config/vxworks/vxworks-predef.h
libgcc/config/t-vxworks