1 # Copyright 2020 The Pigweed Authors
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
7 # https://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
15 import("//build_overrides/pigweed.gni")
17 # Disable obnoxious ABI warning.
19 # GCC 7.1 adds an over-zealous ABI warning with little useful information
20 # on how to resolve the issue. The warning you get is:
22 # note: parameter passing for argument of type '...' changed in GCC 7.1
24 # There is no other information, and searching for the error is needed to
25 # understand what is happening. For upstream Pigweed, we compile from
26 # source so this is irrelevant; so disable it.
28 # See: https://gcc.gnu.org/gcc-7/changes.html (search for "psabi").
29 # https://gcc.gnu.org/ml/gcc/2017-05/msg00073.html
30 config("disable_psabi_warning") {
31 cflags = [ "-Wno-psabi" ]
34 config("cortex_common") {
49 config("enable_float_printf") {
50 cflags = [ "-u_printf_float" ]
54 config("cortex_m0plus") {
55 cflags = [ "-mcpu=cortex-m0plus" ]
61 cflags = [ "-mcpu=cortex-m3" ]
67 cflags = [ "-mcpu=cortex-m4" ]
73 cflags = [ "-mcpu=cortex-m7" ]
78 config("cortex_software_fpu") {
79 cflags = [ "-mfloat-abi=soft" ]
84 config("cortex_hardware_fpu") {
90 defines = [ "PW_ARMV7M_ENABLE_FPU=1" ]
94 config("cortex_hardware_fpu_v5") {
100 defines = [ "PW_ARMV7M_ENABLE_FPU=1" ]