Re: git: f1e8b0ff4e13 - main - bsd.cpu.mk: Add a workaround for erratum 843419
Dima Panov <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.current.scm |
|---|---|
| Organization | FreeBSD.org |
| Message-ID | <[email protected]> |
Hello! At least it badly affected aarch64 build on Apple Silicon in VMWare guest and always set LDFLAGS += -Wl,--fix-cortex-a53-843419 However here is no cortex cores at all: $ dmesg | grep CPU Starting CPU 1 (10000) Starting CPU 2 (20000) Starting CPU 3 (30000) Starting CPU 4 (40000) Starting CPU 5 (50000) FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs cpu0: <ACPI CPU> on acpi0 CPU 0: Apple Unknown CPU r0p0 (midr: 610f0000) affinity: 0 0 0 CPU 1: Apple Unknown CPU r0p0 (midr: 610f0000) affinity: 1 0 0 CPU 2: Apple Unknown CPU r0p0 (midr: 610f0000) affinity: 2 0 0 CPU 3: Apple Unknown CPU r0p0 (midr: 610f0000) affinity: 3 0 0 CPU 4: Apple Unknown CPU r0p0 (midr: 610f0000) affinity: 4 0 0 CPU 5: Apple Unknown CPU r0p0 (midr: 610f0000) affinity: 5 0 0 Some rust and go ports now failed with error "flag provided but not defined: -Wl,--fix-cortex-a53-843419", see www/gitea or lang/rust-bootstrap for example On 14.07.2026 18:49, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f1e8b0ff4e13b52c5e41a5eea3e686410af3dd0b > > commit f1e8b0ff4e13b52c5e41a5eea3e686410af3dd0b > Author: Andrew Turner <[email protected]> > AuthorDate: 2026-07-14 15:07:30 +0000 > Commit: Andrew Turner <[email protected]> > CommitDate: 2026-07-14 15:47:15 +0000 > > bsd.cpu.mk: Add a workaround for erratum 843419 > > Add a workaround for the Arm Cortex-A53 erratum 843419. This has been > targeted when the build is either unoptimised for any CPU/architecture > or targets the Cortex-A53 or ARMv8.0 architecture. > > PR: 296240 > PR: 296395 > Reported by: Hal Murray <[email protected]> > Reported by: Andreas Schuh <[email protected]> > Reviewed by: cognet, mmel > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D58212 > --- > share/mk/bsd.cpu.mk | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk > index 33587b6ba25a..b743d3e71a36 100644 > --- a/share/mk/bsd.cpu.mk > +++ b/share/mk/bsd.cpu.mk > @@ -6,7 +6,7 @@ > .if !defined(CPUTYPE) || empty(CPUTYPE) > _CPUCFLAGS = > . if ${MACHINE_CPUARCH} == "aarch64" > -MACHINE_CPU = arm64 > +MACHINE_CPU = arm64 cortexa53 > . elif ${MACHINE_CPUARCH} == "amd64" > MACHINE_CPU = amd64 sse2 sse mmx > . elif ${MACHINE_CPUARCH} == "arm" > @@ -124,6 +124,14 @@ _CPUCFLAGS = -mcpu=${CPUTYPE} > . elif ${MACHINE_ARCH:Mpowerpc64*} != "" > _CPUCFLAGS = -mcpu=${CPUTYPE} > . elif ${MACHINE_CPUARCH} == "aarch64" > +MACHINE_CPU = arm64 > +. if ${CPUTYPE} == "generic" > +MACHINE_CPU += cortexa53 > +. elif ${CPUTYPE} == "armv8-a" > +MACHINE_CPU += cortexa53 > +. elif ${CPUTYPE:M*cortex-a53*} != "" > +MACHINE_CPU += cortexa53 > +. endif > . if ${CPUTYPE:Marmv*} != "" > # Use -march when the CPU type is an architecture value, e.g. armv8.1-a > _CPUCFLAGS = -march=${CPUTYPE} > @@ -302,6 +310,14 @@ MACHINE_CPU = riscv > . endif > .endif > > +########## arm64/aarch64 > +.if ${MACHINE_CPUARCH} == "aarch64" > +# Add the Cortex-A53 erratum 843419 workaround if we are targeting it. > +. if ${MACHINE_CPU:Mcortexa53} != "" > +LDFLAGS += -Wl,--fix-cortex-a53-843419 > +. endif > +.endif > + > ########## arm > .if ${MACHINE_CPUARCH} == "arm" > MACHINE_CPU += arm -- Sincerely, Dima ([email protected], https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmqHH/sFAwAAAAAACgkQ+4ugndU5jyn6 TA//WKotx90cNg6K9FNSvMHNPZhtoakMwjikhj/bVeQXf/6/daMkjyCwR3P16bNBJeGn6QeqW496 sSKNMWC8gZxcTVrTlLyUFWElx7WVo6DqTYG+wETcbpmBqT13rL1SHLO0HhyIgfjAwopl473tHVnI di+iyQPI0VznL2/P99+pjqXOW4kmS7Jginq1MtX7FJsSf+KKxc6Z9V/c3nX0ka9UC6NuH/foKF0w xpsx3IFIGKZ8vc8mqnRkdfd1nk6cc4MEY+3q9kEeylzC+L4lalT6tV6igc5Jvkned4tboJXVJl2T vyWOorIt7OuISxEEMQkT/Q345PPWkGihcDuJTNaEc8I1zYLcE9el4B9wfR9zMhoJDLucf8XonugP 8XdZdWAlL8mvQj5ctszeKaW2Sk4rR8OKHocnCOJNsuH+P4HCOND0ZAKOAa87cIwps9h3dpsEEyqv 28nEw0GLalSKeSyoxkoc/tkRxiZDn+dHLCf24vcNL4I+kVkLyneDgF6BjLoLdM6Gd1RqskCyqyXT XME64tFzVTHA3p6+HTmc6mCP+6GvYPhGFz/K4vy33ODHwPKSljqO14KFOFXvOGbxRsssHtWKXEnZ RUxBc9EszHa/dnotVvO+2Vnz0PDuv214xC/D6jyQlupgGY7N4K5NUKj3A2Uo865G9HSH6AI/Tare P1c= =Ybje -----END PGP SIGNATURE-----