]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/arm/t-arm-elf
e7506dbde9a98e648cd41c929e274b81356b2d5d
[thirdparty/gcc.git] / gcc / config / arm / t-arm-elf
1 # Copyright (C) 1998-2020 Free Software Foundation, Inc.
2 #
3 # This file is part of GCC.
4 #
5 # GCC is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
8 # any later version.
9 #
10 # GCC is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with GCC; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
18
19 # Build a very basic set of libraries that should cater for most cases.
20
21 # Single-precision floating-point is NOT supported; we don't build a
22 # suitable library for that. Use the rm-profile config in that case.
23
24 # PART 1 - Useful groups of options
25
26 dp_fpus := vfp vfpv2 vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 \
27 neon neon-vfpv3 neon-fp16 vfpv4 neon-vfpv4 vfpv4-d16 \
28 fpv5-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8 \
29 vfp3
30
31 sp_fpus := vfpv3xd vfpv3xd-fp16 fpv4-sp-d16 fpv5-sp-d16
32
33 v7a_fps := vfpv3 vfpv3-fp16 vfpv4 simd neon-fp16 neon-vfpv4
34 v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \
35 neon-fp16 simd
36
37 # Not all these permutations exist for all architecture variants, but
38 # it seems to work ok.
39 v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
40
41 # We don't do anything special with these. Pre-v4t probably doesn't work.
42 all_early_nofp := armv4 armv4t armv5t
43
44 all_early_arch := armv5tej armv6 armv6j armv6k armv6z armv6kz \
45 armv6zk armv6t2 iwmmxt iwmmxt2
46
47 all_v7_a_r := armv7-a armv7ve armv7-r
48
49 all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a \
50 armv8.5-a
51
52 # No floating point variants, require thumb1 softfp
53 all_nofp_t := armv6-m armv6s-m armv8-m.base
54
55 all_nofp_t2 := armv7-m
56
57 all_sp_only := armv7e-m armv8-m.main
58
59 MULTILIB_OPTIONS =
60 MULTILIB_DIRNAMES =
61 MULTILIB_EXCEPTIONS =
62 MULTILIB_MATCHES =
63 MULTILIB_REUSE =
64
65 # PART 2 - multilib build rules
66
67 MULTILIB_OPTIONS += marm/mthumb
68 MULTILIB_DIRNAMES += arm thumb
69
70 MULTILIB_OPTIONS += mfpu=auto
71 MULTILIB_DIRNAMES += autofp
72
73 MULTILIB_OPTIONS += march=armv5te+fp/march=armv7+fp
74 MULTILIB_DIRNAMES += v5te v7
75
76 MULTILIB_OPTIONS += mfloat-abi=hard
77 MULTILIB_DIRNAMES += fpu
78
79 # Build a total of 4 library variants (base options plus the following):
80 MULTILIB_REQUIRED += mthumb
81 MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard
82 MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard
83
84 # PART 3 - Match rules
85
86 # Map all supported FPUs onto mfpu=auto
87 MULTILIB_MATCHES += $(foreach FPU, $(dp_fpus), \
88 mfpu?auto=mfpu?$(FPU))
89
90 MULTILIB_MATCHES += march?armv5te+fp=march?armv5te
91
92 MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \
93 march?armv5te+fp=march?$(ARCH) \
94 march?armv5te+fp=march?$(ARCH)+fp)
95
96 MULTILIB_MATCHES += march?armv7+fp=march?armv7
97
98 MULTILIB_MATCHES += $(foreach FPARCH, $(v7a_fps), \
99 march?armv7+fp=march?armv7-a+$(FPARCH))
100
101 MULTILIB_MATCHES += $(foreach FPARCH, $(v7ve_fps), \
102 march?armv7+fp=march?armv7ve+$(FPARCH))
103
104 MULTILIB_MATCHES += $(foreach ARCH, $(all_v7_a_r), \
105 march?armv7+fp=march?$(ARCH) \
106 march?armv7+fp=march?$(ARCH)+fp)
107
108 MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \
109 march?armv7+fp=march?$(ARCH) \
110 $(foreach FPARCH, $(v8_fps), \
111 march?armv7+fp=march?$(ARCH)+$(FPARCH)))
112
113 MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
114 march?armv7+fp=march?$(ARCH)+fp.dp)
115
116 # PART 4 - Reuse rules
117
118 MULTILIB_REUSE += mthumb=mthumb/mfpu.auto
119 MULTILIB_REUSE += mthumb=mthumb/mfpu.auto/march.armv5te+fp
120 MULTILIB_REUSE += mthumb=mthumb/march.armv5te+fp
121 MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=marm/march.armv5te+fp/mfloat-abi.hard
122 MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=march.armv5te+fp/mfloat-abi.hard
123 MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=mfpu.auto/march.armv5te+fp/mfloat-abi.hard
124 MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mthumb/march.armv7+fp/mfloat-abi.hard
125 MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mfpu.auto/march.armv7+fp/mfloat-abi.hard
126 MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=march.armv7+fp/mfloat-abi.hard