Skip to content

Commit 1d7dace

Browse files
haukerobimarko
authored andcommitted
build: add -mcpu for cortex-a72 and cortex-a76
The aarch64 toolchain is built without --with-cpu, so the CPU_CFLAGS_<type> entry in target.mk is the only place a -mcpu option comes from. The cortex-a72 (bcm27xx/bcm2711, mvebu/cortexa72) and cortex-a76 (bcm27xx/bcm2712) CPU types have no entry, so userspace for these subtargets is built with plain "-Os -pipe", which produces generic armv8-a code. The "doesn't correspond to a known type" warning is not visible because the target scan discards stderr. Add the missing entries. For cortex-a76 this also enables the ARMv8.2 features such as LSE atomics, which replace the out of line atomic helper calls. Fixes: 2534141 ("mvebu: add support for MACCHIATObin (cortex-a72)") Fixes: 5e928ac ("brcm2708: add bcm2711 subtarget (RPi 4B aarch64)") Fixes: 8b63d9a ("bcm27xx: add new bcm2712 subtarget") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Link: openwrt/openwrt#25627 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent b541e7b commit 1d7dace

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/target.mk‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ ifeq ($(DUMP),1)
265265
CPU_TYPE ?= generic
266266
CPU_CFLAGS_generic = -mcpu=generic
267267
CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
268+
CPU_CFLAGS_cortex-a72 = -mcpu=cortex-a72
269+
CPU_CFLAGS_cortex-a76 = -mcpu=cortex-a76
268270
endif
269271
ifeq ($(ARCH),riscv64)
270272
CPU_TYPE ?= generic

0 commit comments

Comments
 (0)