|
| 1 | +# |
| 2 | +# Copyright (c) 2023, Arm Limited and affiliates. |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +# If you're reading this file under the name 'multilib.yaml.in' in the |
| 19 | +# Zephyr SDK source tree, then it's not valid YAML in its own right: it's a |
| 20 | +# template that CMakeLists.txt will expand into a real 'multilib.yaml' |
| 21 | +# containing a list of library variants and the flags that will select them. |
| 22 | +# |
| 23 | +# If you're reading it under the name 'multilib.yaml' in the build or |
| 24 | +# install directory, then that substitution has been done. |
| 25 | +# |
| 26 | +# Comments in this file mostly make more sense from the |
| 27 | +# multilib.yaml.in point of view. |
| 28 | + |
| 29 | +MultilibVersion: '1.0' |
| 30 | + |
| 31 | +# Make an exclusive group for library variants, to make sure we don't |
| 32 | +# accidentally include two or more variants at once. |
| 33 | +# |
| 34 | +# Even if they all match the command-line options, putting two sets of |
| 35 | +# include directories on the include path can cause build failure, |
| 36 | +# because of the #include_next used in the libc++ headers. The first |
| 37 | +# libc++ stdio.h (for example) will #include_next <stdio.h>, which |
| 38 | +# will find the second libc++ version. That won't do anything at all, |
| 39 | +# because it has the same include-guard macro as the first, and so |
| 40 | +# nothing will ever include the _libc_ stdio.h, which was what the |
| 41 | +# #include_next was really looking for. |
| 42 | +Groups: |
| 43 | +- Name: stdlibs |
| 44 | + Type: Exclusive |
| 45 | + |
| 46 | +# The list of library variants is substituted in by CMakeLists.txt, so |
| 47 | +# that it can respect the LLVM_TOOLCHAIN_LIBRARY_VARIANTS setting and |
| 48 | +# only include the set of libraries actually included in this build. |
| 49 | + |
| 50 | +Variants: |
| 51 | +@multilib_yaml_content@ |
| 52 | + |
| 53 | +Mappings: |
| 54 | + |
| 55 | +# Map higher architecture versions to subsets of them, so that a |
| 56 | +# compatible library can be found even for architectures we don't have |
| 57 | +# specific variants for. |
| 58 | + |
| 59 | +# v8-M Baseline is a superset of v6-M |
| 60 | +- Match: --target=thumbv8m\.base-unknown-none-eabi |
| 61 | + Flags: |
| 62 | + - --target=thumbv6m-unknown-none-eabi |
| 63 | + |
| 64 | +# v8.2-M Mainline is a superset of v8.1-M Mainline, in both hard and |
| 65 | +# soft float variants. |
| 66 | +# |
| 67 | +# Also, v8.1-M Mainline is also a superset of v8-M Mainline, which in |
| 68 | +# turn is a superset of v7E-M, and then of plain v7-M. We have |
| 69 | +# libraries for all those architecture versions, but not for every |
| 70 | +# combination of them with FPUs, so in some cases it might be |
| 71 | +# necessary to fall back to a lower architecture in order to provide |
| 72 | +# the needed FPU support. |
| 73 | +- Match: --target=thumbv8\.[2-9]m\.main-unknown-none-eabi |
| 74 | + Flags: |
| 75 | + - --target=thumbv8.1m.main-unknown-none-eabi |
| 76 | + - --target=thumbv8m.main-unknown-none-eabi |
| 77 | + - --target=thumbv7em-unknown-none-eabi |
| 78 | + - --target=thumbv7m-unknown-none-eabi |
| 79 | +- Match: --target=thumbv8\.[2-9]m\.main-unknown-none-eabihf |
| 80 | + Flags: |
| 81 | + - --target=thumbv8.1m.main-unknown-none-eabihf |
| 82 | + - --target=thumbv8m.main-unknown-none-eabihf |
| 83 | + - --target=thumbv7em-unknown-none-eabihf |
| 84 | + - --target=thumbv7m-unknown-none-eabihf |
| 85 | +- Match: --target=thumbv8\.1m\.main-unknown-none-eabi |
| 86 | + Flags: |
| 87 | + - --target=thumbv8m.main-unknown-none-eabi |
| 88 | + - --target=thumbv7em-unknown-none-eabi |
| 89 | + - --target=thumbv7m-unknown-none-eabi |
| 90 | +- Match: --target=thumbv8\.1m\.main-unknown-none-eabihf |
| 91 | + Flags: |
| 92 | + - --target=thumbv8m.main-unknown-none-eabihf |
| 93 | + - --target=thumbv7em-unknown-none-eabihf |
| 94 | + - --target=thumbv7m-unknown-none-eabihf |
| 95 | +- Match: --target=thumbv8m\.main-unknown-none-eabi |
| 96 | + Flags: |
| 97 | + - --target=thumbv7em-unknown-none-eabi |
| 98 | + - --target=thumbv7m-unknown-none-eabi |
| 99 | +- Match: --target=thumbv8m\.main-unknown-none-eabihf |
| 100 | + Flags: |
| 101 | + - --target=thumbv7em-unknown-none-eabihf |
| 102 | + - --target=thumbv7m-unknown-none-eabihf |
| 103 | +- Match: --target=thumbv7em-unknown-none-eabi |
| 104 | + Flags: |
| 105 | + - --target=thumbv7m-unknown-none-eabi |
| 106 | +- Match: --target=thumbv7em-unknown-none-eabihf |
| 107 | + Flags: |
| 108 | + - --target=thumbv7m-unknown-none-eabihf |
| 109 | + |
| 110 | +# v7-A and v7-R include the ISA in the triple, but that doesn't matter for |
| 111 | +# library selection, so canonicalise Thumb triples to ARM ones. |
| 112 | +- Match: --target=thumbv7r-unknown-none-eabi |
| 113 | + Flags: |
| 114 | + - --target=armv7r-unknown-none-eabi |
| 115 | +- Match: --target=thumbv7r-unknown-none-eabihf |
| 116 | + Flags: |
| 117 | + - --target=armv7r-unknown-none-eabihf |
| 118 | +- Match: --target=thumbv7-unknown-none-eabi |
| 119 | + Flags: |
| 120 | + - --target=armv7-unknown-none-eabi |
| 121 | +- Match: --target=thumbv7-unknown-none-eabihf |
| 122 | + Flags: |
| 123 | + - --target=armv7-unknown-none-eabihf |
| 124 | +- Match: --target=thumbv4t-unknown-none-eabi |
| 125 | + Flags: |
| 126 | + - --target=armv4t-unknown-none-eabi |
| 127 | +- Match: --target=thumbv4t-unknown-none-eabihf |
| 128 | + Flags: |
| 129 | + - --target=armv4t-unknown-none-eabihf |
| 130 | +- Match: --target=thumbv5e-unknown-none-eabi |
| 131 | + Flags: |
| 132 | + - --target=armv5e-unknown-none-eabi |
| 133 | +- Match: --target=thumbv5e-unknown-none-eabihf |
| 134 | + Flags: |
| 135 | + - --target=armv5e-unknown-none-eabihf |
| 136 | + |
| 137 | +# armv7ve is a GCC name for v7-A with the virtualisation extension, for library |
| 138 | +# selection we treat it the same as v7-A. |
| 139 | +- Match: --target=(arm|thumb)v7ve-unknown-none-eabi |
| 140 | + Flags: |
| 141 | + - --target=armv7-unknown-none-eabi |
| 142 | +- Match: --target=(arm|thumb)v7ve-unknown-none-eabihf |
| 143 | + Flags: |
| 144 | + - --target=armv7-unknown-none-eabihf |
| 145 | + |
| 146 | +# Higher versions of the architecture such as v8-A and v9-A are a superset of |
| 147 | +# v7-A. |
| 148 | +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])a-unknown-none-eabi |
| 149 | + Flags: |
| 150 | + - --target=armv7-unknown-none-eabi |
| 151 | +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])a-unknown-none-eabihf |
| 152 | + Flags: |
| 153 | + - --target=armv7-unknown-none-eabihf |
| 154 | +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])r-unknown-none-eabi |
| 155 | + Flags: |
| 156 | + - --target=armv7r-unknown-none-eabi |
| 157 | +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])r-unknown-none-eabihf |
| 158 | + Flags: |
| 159 | + - --target=armv7r-unknown-none-eabihf |
| 160 | + |
| 161 | +# -march extensions |
| 162 | +- Match: -march=thumbv8\.[1-9]m\.main(\+[^\+]+)*\+fp16(\+[^\+]+)* |
| 163 | + Flags: |
| 164 | + - -march=thumbv8.1m.main+fp16 |
| 165 | +- Match: -march=thumbv8\.[1-9]m\.main(\+[^\+]+)*\+mve(\+[^\+]+)* |
| 166 | + Flags: |
| 167 | + - -march=thumbv8.1m.main+mve |
| 168 | +- Match: -march=thumbv8\.[1-9]m\.main(\+[^\+]+)*\+mve\.fp(\+[^\+]+)* |
| 169 | + Flags: |
| 170 | + - -march=thumbv8.1m.main+mve.fp |
| 171 | +- Match: -march=thumbv8\.[1-9]m\.main(\+[^\+]+)*\+lob(\+[^\+]+)* |
| 172 | + Flags: |
| 173 | + - -march=thumbv8.1m.main+lob |
0 commit comments