Skip to content

Commit 2628e91

Browse files
committed
[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.
1 parent 48d2e04 commit 2628e91

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

clang/test/Driver/netbsd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@
236236
// ARMEB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
237237
// ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
238238
// ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
239+
// ARMV7EB: as{{.*}}" "-mcpu=cortex-a8"
239240
// ARMV7EB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
240241
// ARMV7EB: "--be8" "-m" "armelfb_nbsd_eabi"
241242

llvm/lib/Support/Triple.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,8 @@ StringRef Triple::getARMCPUForArch(StringRef MArch) const {
16991699
case llvm::Triple::NetBSD:
17001700
if (!MArch.empty() && MArch == "v6")
17011701
return "arm1176jzf-s";
1702+
if (!MArch.empty() && MArch == "v7")
1703+
return "cortex-a8";
17021704
break;
17031705
case llvm::Triple::Win32:
17041706
// FIXME: this is invalid for WindowsCE

0 commit comments

Comments
 (0)