[clang] 2628e91 - [NetBSD] Use cortex-a8 as default CPU for ARMv7
Joerg Sonnenberger via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 17 17:02:43 PST 2021
Author: Joerg Sonnenberger
Date: 2021-02-18T01:53:04+01:00
New Revision: 2628e9146120507b2cf025f5c4ccc857cc3724c4
URL: https://github.com/llvm/llvm-project/commit/2628e9146120507b2cf025f5c4ccc857cc3724c4
DIFF: https://github.com/llvm/llvm-project/commit/2628e9146120507b2cf025f5c4ccc857cc3724c4.diff
LOG: [NetBSD] Use cortex-a8 as default CPU for ARMv7
This matches the platform default for GCC. It primarily matters when the
integrated assembler is not used as there is no default CPU defined for
ARMv7-A and GNU as is upset with -mcpu=generic.
Added:
Modified:
clang/test/Driver/netbsd.c
llvm/lib/Support/Triple.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/netbsd.c b/clang/test/Driver/netbsd.c
index 83486c73d281..812889309a0f 100644
--- a/clang/test/Driver/netbsd.c
+++ b/clang/test/Driver/netbsd.c
@@ -236,6 +236,7 @@
// ARMEB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
// ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
// ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+// ARMV7EB: as{{.*}}" "-mcpu=cortex-a8"
// ARMV7EB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
// ARMV7EB: "--be8" "-m" "armelfb_nbsd_eabi"
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp
index 40c4f3db8b53..2ec123fcca73 100644
--- a/llvm/lib/Support/Triple.cpp
+++ b/llvm/lib/Support/Triple.cpp
@@ -1699,6 +1699,8 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const {
case llvm::Triple::NetBSD:
if (!MArch.empty() && MArch == "v6")
return "arm1176jzf-s";
+ if (!MArch.empty() && MArch == "v7")
+ return "cortex-a8";
break;
case llvm::Triple::Win32:
// FIXME: this is invalid for WindowsCE
More information about the cfe-commits
mailing list