[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.
This commit is contained in:
Joerg Sonnenberger 2021-02-18 01:53:04 +01:00
parent 48d2e04152
commit 2628e91461
2 changed files with 3 additions and 0 deletions

View File

@ -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"

View File

@ -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