diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2016-11-15 16:10:13 +0100 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gcc.gnu.org> | 2016-11-15 16:10:13 +0100 |
commit | f9ccf89916a2adc029d9e2f8611b09e17a236c3d (patch) | |
tree | 9df4111e2b05f6dcf2e793a19e73624fde74e578 /gcc/config.gcc | |
parent | 2cf63121e9640348fa3d917dfb247da545255c61 (diff) | |
download | gcc-f9ccf89916a2adc029d9e2f8611b09e17a236c3d.zip gcc-f9ccf89916a2adc029d9e2f8611b09e17a236c3d.tar.gz gcc-f9ccf89916a2adc029d9e2f8611b09e17a236c3d.tar.bz2 |
[ARC] New option handling, refurbish multilib support.
gcc/
2016-11-15 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arch.h: New file.
* config/arc/arc-arches.def: Likewise.
* config/arc/arc-cpus.def: Likewise.
* config/arc/arc-options.def: Likewise.
* config/arc/t-multilib: Likewise.
* config/arc/genmultilib.awk: Likewise.
* config/arc/genoptions.awk: Likewise.
* config/arc/arc-tables.opt: Likewise.
* config/arc/driver-arc.c: Likewise.
* testsuite/gcc.target/arc/nps400-cpu-flag.c: Likewise.
* common/config/arc/arc-common.c (arc_handle_option): Trace
toggled options.
* config.gcc (arc*-*-*): Add arc-tables.opt to arc's extra
options; check for supported cpu against arc-cpus.def file.
(arc*-*-elf*, arc*-*-linux-uclibc*): Use new make fragment; define
TARGET_CPU_BUILD macro; add driver-arc.o as an extra object.
* config/arc/arc-c.def: Add emacs local variables.
* config/arc/arc-opts.h (processor_type): Use arc-cpus.def file.
(FPU_FPUS, FPU_FPUD, FPU_FPUDA, FPU_FPUDA_DIV, FPU_FPUDA_FMA)
(FPU_FPUDA_ALL, FPU_FPUS_DIV, FPU_FPUS_FMA, FPU_FPUS_ALL)
(FPU_FPUD_DIV, FPU_FPUD_FMA, FPU_FPUD_ALL): New defines.
(DEFAULT_arc_fpu_build): Define.
(DEFAULT_arc_mpy_option): Define.
* config/arc/arc-protos.h (arc_init): Delete.
* config/arc/arc.c (arc_cpu_name): New variable.
(arc_selected_cpu, arc_selected_arch, arc_arcem, arc_archs)
(arc_arc700, arc_arc600, arc_arc601): New variable.
(arc_init): Add static; remove selection of default tune value,
cleanup obsolete error messages.
(arc_override_options): Make use of .def files for selecting the
right cpu and option configurations.
* config/arc/arc.h (stdbool.h): Include.
(TARGET_CPU_DEFAULT): Define.
(CPP_SPEC): Remove mcpu=NPS400 handling.
(arc_cpu_to_as): Declare.
(EXTRA_SPEC_FUNCTIONS): Define.
(OPTION_DEFAULT_SPECS): Likewise.
(ASM_DEFAULT): Remove.
(ASM_SPEC): Use arc_cpu_to_as.
(DRIVER_SELF_SPECS): Remove deprecated options.
(arc_base_cpu): Declare.
(TARGET_ARC600, TARGET_ARC601, TARGET_ARC700, TARGET_EM)
(TARGET_HS, TARGET_V2, TARGET_ARC600): Make them use arc_base_cpu
variable.
(MULTILIB_DEFAULTS): Use ARC_MULTILIB_CPU_DEFAULT.
* config/arc/arc.md (attr_cpu): Remove.
* config/arc/arc.opt (mno-mpy): Deprecate.
(mcpu=ARC600, mcpu=ARC601, mcpu=ARC700, mcpu=NPS400, mcpu=ARCEM)
(mcpu=ARCHS): Remove.
(mcrc, mdsp-packa, mdvbf, mmac-d16, mmac-24, mtelephony, mrtsc):
Deprecate.
(mbarrel_shifte, mspfp_, mdpfp_, mdsp_pack, mmac_): Remove.
(arc_fpu): Use new defines.
(mpy-option): Change to use numeric or string like inputs.
* config/arc/t-arc (driver-arc.o): New target.
(arc-cpus, t-multilib, arc-tables.opt): Likewise.
* config/arc/t-arc-newlib: Delete.
* config/arc/t-arc-uClibc: Renamed to t-uClibc.
* doc/invoke.texi (ARC): Update arc options.
Fixup
From-SVN: r242425
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 3e0be22..595563b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -318,6 +318,7 @@ arc*-*-*) cpu_type=arc c_target_objs="arc-c.o" cxx_target_objs="arc-c.o" + extra_options="${extra_options} arc/arc-tables.opt" ;; arm*-*-*) cpu_type=arm @@ -999,13 +1000,12 @@ alpha*-dec-*vms*) ;; arc*-*-elf*) extra_headers="arc-simd.h" - tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" - tmake_file="arc/t-arc-newlib arc/t-arc" - case x"${with_cpu}" in - xarc600|xarc601|xarc700) - target_cpu_default="TARGET_CPU_$with_cpu" - ;; - esac + tm_file="arc/arc-arch.h dbxelf.h elfos.h newlib-stdint.h ${tm_file}" + tmake_file="arc/t-multilib arc/t-arc" + extra_gcc_objs="driver-arc.o" + if test "x$with_cpu" != x; then + tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu" + fi if test x${with_endian} = x; then case ${target} in arc*be-*-* | arc*eb-*-*) with_endian=big ;; @@ -1022,15 +1022,14 @@ arc*-*-elf*) ;; arc*-*-linux-uclibc*) extra_headers="arc-simd.h" - tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}" - tmake_file="${tmake_file} arc/t-arc-uClibc arc/t-arc" + tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}" + tmake_file="${tmake_file} arc/t-uClibc arc/t-arc" tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0" tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1" - case x"${with_cpu}" in - xarc600|xarc601|xarc700) - target_cpu_default="TARGET_CPU_$with_cpu" - ;; - esac + extra_gcc_objs="driver-arc.o" + if test "x$with_cpu" != x; then + tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu" + fi if test x${with_endian} = x; then case ${target} in arc*be-*-* | arc*eb-*-*) with_endian=big ;; @@ -3624,15 +3623,19 @@ case "${target}" in done ;; - arc*-*-*) # was: arc*-*-linux-uclibc) + arc*-*-*) supported_defaults="cpu" - case $with_cpu in - arc600|arc601|arc700) - ;; - *) echo "Unknown cpu type" - exit 1 - ;; - esac + + if [ x"$with_cpu" = x ] \ + || grep "^ARC_CPU ($with_cpu," \ + ${srcdir}/config/arc/arc-cpus.def \ + > /dev/null; then + # Ok + true + else + echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2 + exit 1 + fi ;; arm*-*-*) |