config.gcc: factorize and comment inclusion of vxworks-dummy.h
authorOlivier Hainque <hainque@adacore.com>
Fri, 21 Sep 2018 13:12:36 +0000 (13:12 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Fri, 21 Sep 2018 13:12:36 +0000 (13:12 +0000)
2018-09-21  Olivier Hainque  <hainque@adacore.com>

* gcc/config.gcc: Factorize and comment inclusion of
vxworks-dummy.h.

From-SVN: r264480

gcc/ChangeLog
gcc/config.gcc

index b72c326c153887b39505fba4947ac1436d9cf89a..e9b8e96552e494d53f225ab65b38dbcd74a85505 100644 (file)
@@ -1,3 +1,7 @@
+2018-09-21  Olivier Hainque  <hainque@adacore.com>
+
+       * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
+
 2018-09-21  Olivier Hainque  <hainque@adacore.com>
 
        * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
index 0b4f2be496e31f2ffbe80a44327d5b4241cf1523..0c579d1f5eade45329c60b0bdfe4dd46675acf10 100644 (file)
@@ -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