summaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-05-10 07:36:29 +0000
committerYvan Roux <yvan.roux@linaro.org>2017-05-10 10:35:15 +0000
commit96120a0d3aa66005f59526908acca0ab23e06492 (patch)
tree8103f3d74d3b23f167db1daa5d81c7df31c2660d /gcc/config/arm
parent5b2c32418442289874c1deb844e9964a7a704566 (diff)
downloadgcc-96120a0d3aa66005f59526908acca0ab23e06492.tar.gz
gcc/
Backport from trunk r247646. 2017-05-05 Thomas Preud'homme <thomas.preudhomme@arm.com> * config.gcc: Allow combinations of aprofile and rmprofile values for --with-multilib-list. * config/arm/t-multilib: New file. * config/arm/t-aprofile: Remove initialization of MULTILIB_* variables. Remove setting of ISA and floating-point ABI in MULTILIB_OPTIONS and MULTILIB_DIRNAMES. Set architecture and FPU in MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS and MULTILIB_DIRNAMES respectively. Add comment to introduce all matches. Add architecture matches for marvel-pj4 and generic-armv7-a CPU options. * config/arm/t-rmprofile: Likewise except for the matches changes. * doc/install.texi (--with-multilib-list): Document the combination of aprofile and rmprofile values and warn about pitfalls in doing that. gcc/ Backport from trunk r247650. 2017-05-05 Nathan Sidwell <nathan@acm.org> * config.gcc (arm*-*-*): Add missing 'fi'. gcc/ Backport from trunk r247741. 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com> * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from with_multilib_list after it has been checked. Change-Id: I934fae88d94b1121875463d62ff4ef366efe45d5
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/t-aprofile31
-rw-r--r--gcc/config/arm/t-multilib69
-rw-r--r--gcc/config/arm/t-rmprofile29
3 files changed, 83 insertions, 46 deletions
diff --git a/gcc/config/arm/t-aprofile b/gcc/config/arm/t-aprofile
index 19df7a6bff2..b71cbda3e81 100644
--- a/gcc/config/arm/t-aprofile
+++ b/gcc/config/arm/t-aprofile
@@ -24,30 +24,13 @@
# have their default values during the configure step. We enforce
# this during the top-level configury.
-MULTILIB_OPTIONS =
-MULTILIB_DIRNAMES =
-MULTILIB_EXCEPTIONS =
-MULTILIB_MATCHES =
-MULTILIB_REUSE =
+# Arch and FPU variants to build libraries with
-# We have the following hierachy:
-# ISA: A32 (.) or T32 (thumb)
-# Architecture: ARMv7-A (v7-a), ARMv7VE (v7ve), or ARMv8-A (v8-a).
-# FPU: VFPv3-D16 (fpv3), NEONv1 (simdv1), VFPv4-D16 (fpv4),
-# NEON-VFPV4 (simdvfpv4), NEON for ARMv8 (simdv8), or None (.).
-# Float-abi: Soft (.), softfp (softfp), or hard (hardfp).
+MULTI_ARCH_OPTS_A = march=armv7-a/march=armv7ve/march=armv8-a
+MULTI_ARCH_DIRS_A = v7-a v7ve v8-a
-MULTILIB_OPTIONS += mthumb
-MULTILIB_DIRNAMES += thumb
-
-MULTILIB_OPTIONS += march=armv7-a/march=armv7ve/march=armv8-a
-MULTILIB_DIRNAMES += v7-a v7ve v8-a
-
-MULTILIB_OPTIONS += mfpu=vfpv3-d16/mfpu=neon/mfpu=vfpv4-d16/mfpu=neon-vfpv4/mfpu=neon-fp-armv8
-MULTILIB_DIRNAMES += fpv3 simdv1 fpv4 simdvfpv4 simdv8
-
-MULTILIB_OPTIONS += mfloat-abi=softfp/mfloat-abi=hard
-MULTILIB_DIRNAMES += softfp hard
+MULTI_FPU_OPTS_A = mfpu=vfpv3-d16/mfpu=neon/mfpu=vfpv4-d16/mfpu=neon-vfpv4/mfpu=neon-fp-armv8
+MULTI_FPU_DIRS_A = fpv3 simdv1 fpv4 simdvfpv4 simdv8
# Option combinations to build library with
@@ -71,7 +54,11 @@ MULTILIB_REQUIRED += *march=armv8-a
MULTILIB_REQUIRED += *march=armv8-a/mfpu=neon-fp-armv8/mfloat-abi=*
+# Matches
+
# CPU Matches
+MULTILIB_MATCHES += march?armv7-a=mcpu?marvell-pj4
+MULTILIB_MATCHES += march?armv7-a=mcpu?generic-armv7-a
MULTILIB_MATCHES += march?armv7-a=mcpu?cortex-a8
MULTILIB_MATCHES += march?armv7-a=mcpu?cortex-a9
MULTILIB_MATCHES += march?armv7-a=mcpu?cortex-a5
diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib
new file mode 100644
index 00000000000..642e7317655
--- /dev/null
+++ b/gcc/config/arm/t-multilib
@@ -0,0 +1,69 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# This is a target makefile fragment that attempts to get
+# multilibs built for the range of CPU's, FPU's and ABI's that
+# are relevant for the ARM architecture. It should not be used in
+# conjunction with another make file fragment and assumes --with-arch,
+# --with-cpu, --with-fpu, --with-float, --with-mode have their default
+# values during the configure step. We enforce this during the
+# top-level configury.
+
+MULTILIB_OPTIONS =
+MULTILIB_DIRNAMES =
+MULTILIB_EXCEPTIONS =
+MULTILIB_MATCHES =
+MULTILIB_REUSE =
+
+comma := ,
+tm_multilib_list := $(subst $(comma), ,$(TM_MULTILIB_CONFIG))
+
+HAS_APROFILE := $(filter aprofile,$(tm_multilib_list))
+HAS_RMPROFILE := $(filter rmprofile,$(tm_multilib_list))
+
+ifneq (,$(HAS_APROFILE))
+include $(srcdir)/config/arm/t-aprofile
+endif
+ifneq (,$(HAS_RMPROFILE))
+include $(srcdir)/config/arm/t-rmprofile
+endif
+SEP := $(and $(HAS_APROFILE),$(HAS_RMPROFILE),/)
+
+
+# We have the following hierachy:
+# ISA: A32 (.) or T16/T32 (thumb)
+# Architecture: ARMv6-M (v6-m), ARMv7-M (v7-m), ARMv7E-M (v7e-m),
+# ARMv7 (v7-ar), ARMv7-A (v7-a), ARMv7VE (v7ve),
+# ARMv8-M Baseline (v8-m.base), ARMv8-M Mainline (v8-m.main)
+# or ARMv8-A (v8-a).
+# FPU: VFPv3-D16 (fpv3), NEONv1 (simdv1), FPV4-SP-D16 (fpv4-sp),
+# VFPv4-D16 (fpv4), NEON-VFPV4 (simdvfpv4), FPV5-SP-D16 (fpv5-sp),
+# VFPv5-D16 (fpv5), NEON for ARMv8 (simdv8), or None (.).
+# Float-abi: Soft (.), softfp (softfp), or hard (hard).
+
+MULTILIB_OPTIONS += mthumb
+MULTILIB_DIRNAMES += thumb
+
+MULTILIB_OPTIONS += $(MULTI_ARCH_OPTS_A)$(SEP)$(MULTI_ARCH_OPTS_RM)
+MULTILIB_DIRNAMES += $(MULTI_ARCH_DIRS_A) $(MULTI_ARCH_DIRS_RM)
+
+MULTILIB_OPTIONS += $(MULTI_FPU_OPTS_A)$(SEP)$(MULTI_FPU_OPTS_RM)
+MULTILIB_DIRNAMES += $(MULTI_FPU_DIRS_A) $(MULTI_FPU_DIRS_RM)
+
+MULTILIB_OPTIONS += mfloat-abi=softfp/mfloat-abi=hard
+MULTILIB_DIRNAMES += softfp hard
diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile
index 2a48f9149a7..8cd735110b6 100644
--- a/gcc/config/arm/t-rmprofile
+++ b/gcc/config/arm/t-rmprofile
@@ -24,33 +24,14 @@
# values during the configure step. We enforce this during the
# top-level configury.
-MULTILIB_OPTIONS =
-MULTILIB_DIRNAMES =
-MULTILIB_EXCEPTIONS =
-MULTILIB_MATCHES =
-MULTILIB_REUSE =
-# We have the following hierachy:
-# ISA: A32 (.) or T16/T32 (thumb).
-# Architecture: ARMv6S-M (v6-m), ARMv7-M (v7-m), ARMv7E-M (v7e-m),
-# ARMv8-M Baseline (v8-m.base) or ARMv8-M Mainline (v8-m.main).
-# FPU: VFPv3-D16 (fpv3), FPV4-SP-D16 (fpv4-sp), FPV5-SP-D16 (fpv5-sp),
-# VFPv5-D16 (fpv5), or None (.).
-# Float-abi: Soft (.), softfp (softfp), or hard (hardfp).
+# Arch and FPU variants to build libraries with
-# Options to build libraries with
+MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7/march=armv8-m.base/march=armv8-m.main
+MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7-ar v8-m.base v8-m.main
-MULTILIB_OPTIONS += mthumb
-MULTILIB_DIRNAMES += thumb
-
-MULTILIB_OPTIONS += march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7/march=armv8-m.base/march=armv8-m.main
-MULTILIB_DIRNAMES += v6-m v7-m v7e-m v7-ar v8-m.base v8-m.main
-
-MULTILIB_OPTIONS += mfpu=vfpv3-d16/mfpu=fpv4-sp-d16/mfpu=fpv5-sp-d16/mfpu=fpv5-d16
-MULTILIB_DIRNAMES += fpv3 fpv4-sp fpv5-sp fpv5
-
-MULTILIB_OPTIONS += mfloat-abi=softfp/mfloat-abi=hard
-MULTILIB_DIRNAMES += softfp hard
+MULTI_FPU_OPTS_RM = mfpu=vfpv3-d16/mfpu=fpv4-sp-d16/mfpu=fpv5-sp-d16/mfpu=fpv5-d16
+MULTI_FPU_DIRS_RM = fpv3 fpv4-sp fpv5-sp fpv5
# Option combinations to build library with