From 52e18cdfd21c3a9868ee685f26ba95836945a928 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Fri, 21 Sep 2018 13:12:36 +0000 Subject: [PATCH] config.gcc: factorize and comment inclusion of vxworks-dummy.h 2018-09-21 Olivier Hainque * gcc/config.gcc: Factorize and comment inclusion of vxworks-dummy.h. From-SVN: r264480 --- gcc/ChangeLog | 4 ++++ gcc/config.gcc | 24 +++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b72c326c153..e9b8e96552e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-09-21 Olivier Hainque + + * config.gcc: Factorize and comment inclusion of vxworks-dummy.h. + 2018-09-21 Olivier Hainque * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1. diff --git a/gcc/config.gcc b/gcc/config.gcc index 0b4f2be496e..0c579d1f5ea 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -588,7 +588,6 @@ i[34567]86-*-*) if test "x$enable_frame_pointer" = xyes; then tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1" fi - tm_file="vxworks-dummy.h ${tm_file}" ;; x86_64-*-*) case ${with_abi} in @@ -615,14 +614,9 @@ x86_64-*-*) if test "x$enable_frame_pointer" = xyes; then tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1" fi - tm_file="vxworks-dummy.h ${tm_file}" ;; arm*-*-*) tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h" - tm_file="vxworks-dummy.h ${tm_file}" - ;; -mips*-*-* | powerpc*-*-* | sh*-*-* | sparc*-*-*) - tm_file="vxworks-dummy.h ${tm_file}" ;; esac @@ -1149,7 +1143,7 @@ arm*-*-linux-*) # ARM GNU/Linux with ELF ;; esac tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" - tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h" + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h" # Generation of floating-point instructions requires at least ARMv5te. if [ "$with_float" = "hard" -o "$with_float" = "softfp" ] ; then target_cpu_cname="arm10e" @@ -1169,7 +1163,7 @@ arm*-*-linux-*) # ARM GNU/Linux with ELF arm*-*-uclinux*eabi*) # ARM ucLinux tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h" tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi" - tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h" + tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h arm/arm.h" target_cpu_cname="arm7tdmi" # The EABI requires the use of __cxa_atexit. default_use_cxa_atexit=yes @@ -1213,7 +1207,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*) target_cpu_cname="arm10tdmi" ;; esac - tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h" + tm_file="${tm_file} arm/aout.h arm/arm.h" ;; avr-*-*) tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h" @@ -4739,6 +4733,18 @@ case "${target}" in ;; esac +# Targets for which there is at least one VxWorks port should include +# vxworks-dummy.h to allow safe references to various TARGET_VXWORKS kinds +# of markers from other files in the port, including the vxworks*.h files to +# distinguish VxWorks variants such as VxWorks 7 or 64). + +case ${target} in +arm*-*-* | i[34567]86-*-* | mips*-*-* | powerpc*-*-* | sh*-*-* \ +| sparc*-*-* | x86_64-*-*) + tm_file="vxworks-dummy.h ${tm_file}" + ;; +esac + # Set some miscellaneous flags for particular targets. target_cpu_default2= case ${target} in -- 2.30.2