diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-06-10 09:19:07 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-15 20:44:46 +0000 |
commit | b92a66983180596e8f8a9c4003c099ee1febb86e (patch) | |
tree | 81f4f6dde021b68c612be02797d9a479f50f448d /chip/npcx/build.mk | |
parent | f5851a661925b9db2fde29962d992a29d9fa581c (diff) | |
download | chrome-ec-b92a66983180596e8f8a9c4003c099ee1febb86e.tar.gz |
chip: Remove -march, since -mcpu itself is sufficient
According to the GCC documentation:
-mcpu specifies the name of the target ARM processor. GCC uses this name
to derive the name of the target ARM architecture (as if specified by
-march) and the ARM processor type for which to tune for performance (as
if specified by -mtune).
https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
This means that unless we're overriding some setting with -march or
-mtune, there's no need to specify them. In our case, we aren't
overriding the default for -mtune that -mcpu sets, so make things
simpler by only specifying -mcpu.
Additional details in
https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
BRANCH=none
BUG=b:145677491
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I1999ef25642ed9e32b2e8eeb76d4ba7a23dc2b8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3699792
Reviewed-by: Andrea Grandi <agrandi@google.com>
Diffstat (limited to 'chip/npcx/build.mk')
-rw-r--r-- | chip/npcx/build.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/npcx/build.mk b/chip/npcx/build.mk index 1fe524763b..d7e61de4de 100644 --- a/chip/npcx/build.mk +++ b/chip/npcx/build.mk @@ -9,7 +9,7 @@ # NPCX SoC has a Cortex-M4F ARM core CORE:=cortex-m # Allow the full Cortex-M4 instruction set -CFLAGS_CPU+=-march=armv7e-m -mcpu=cortex-m4 +CFLAGS_CPU+=-mcpu=cortex-m4 # Disable overlapping section warning that linker emits due to NPCX_RO_HEADER. LDFLAGS_EXTRA+=-Wl,--no-check-sections |