From nobody Fri Aug 28 15:10:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hWhff40s6z6qYLD for ; Fri, 28 Aug 2026 15:11:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic.asd.mail.yahoo.com (sonic-usea5-0027.asd.mail.yahoo.com [34.2.70.26]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4hWhff1w3Jz3ZxR for ; Fri, 28 Aug 2026 15:11:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1787929860; bh=4lcEXiq8/Jp4T88+tcjJJUXUGGI4Zu4W/3MwyoeiwFU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=jo0TdFexJ+t3xXLmb8G2NQAn9ZJ0kvt99m5aLel9cL/krvdo1xZMyDgS1DQOePg81MrWVWit+zsROt63zhmwtm5TQ1c5nUP0Ms7lDoDocOpvVu6e2Y7znqsnMGIU73NnfT9Eg37opJ5pF9Vu4Kj5VbBLrpkBSZjiranLTvmJjZhgrtCyVl4P+DLEK2mueWMRc/lZPst1PRiaOSlZXEMUWJbuSoGPeb2UDP2V/2VV+GG+a3MwiGsKhriU4a0Ix9Laz2ICdi/+2nemIJteENioWLwCrnOk4zAqjfDmGuc8s7gtEqUo4BSJcEZ2NHvMSzghpaqm8FFLBI8iYb6isYvEHg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1787929860; bh=SDd2gs85SfjYf2Y7C7gSKdWNDSMke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5zqMR.Lw0Rm1xk9nZyRMO6KMBcWW1rZdIA64NaZc3l59pkcuBzbsOuREkFsLgM.q1Z8ri8E2J0tV e_ykhPLZusI_2uGp8KTUemFEMAltrq2eI857GttCZ41u7sGTtFf_WLZBJeDAX5.Iw00lEYKrDbip 4vlF6iFTbUAoV8fLjuFWE7zqghXPQPEESWqr0BD2bMDXjKno8EvMgZd9Ioilnm_Io4ksrcvZ6y1u nXf3Z1DLLF9R4S.yaQ92wYEGUtfYXTcY9ZyTEbrsVXkySJzFUpzrPe6KCn0XO4IIgJdVmh12NQ4C gEmx_MCmVQmm09x7qbNN1qWuXWvp.fv5.681vg2goXrjI.tTlHLcYBgqcgeCuLtJLF8_btoi8SO3 OTw-- X-Sonic-MF: X-Sonic-ID: 2819bec3-6c21-4e4f-8865-930c1eeaca43 Received: from sonic.gate.mail.ne1.yahoo.com by mail-asdoutdeli-p-cin-usea5-prod-sonicconsumer-svc-101 with HTTP; Fri, 28 Aug 2026 15:11:00 +0000 Received: from dip28.lsn.gq1.yahoo.com ([67.195.161.37]) by hello (SMTP) with SMTP ID d33f2deb5049c3aa64103ed18099c6dd; Fri, 28 Aug 2026 15:10:57 +0000 (UTC) Message-ID: Date: Fri, 28 Aug 2026 08:10:55 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: f1e8b0ff4e13 - main - bsd.cpu.mk: Add a workaround for erratum 843419 To: Dima Panov , Adrian Chadd Cc: Andrew Turner , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <6a565a74.4373c.77884453@gitrepo.freebsd.org> Content-Language: en-US From: Mark Millard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.26380 mail.core.serving.mcws.prd.acl:role.token.mcws.jsmtp.yahoo X-Rspamd-Queue-Id: 4hWhff1w3Jz3ZxR X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:34.2.70.0/23, country:US] X-Spamd-Bar: ---- On 8/28/26 03:55, Dima Panov wrote: > Hello! > > IMO, there must be additional guard knob to avoid apply extra LDFLAGS in > test conditions > > Something like: > . if ${MACHINE_CPU:Mcortexa53} != "" && !defined AVOID_CORTEXA53_FIX >  LDFLAGS += -Wl,--fix-cortex-a53-843419 > . endif Official aarch64 FreeBSD OS builds/distributions never explicitly target cortex-a53 to exclusion but aarch64 in general (armv8a): compatible with all aarch64 CPUs, old and new, not just a specific old one. And they are not built on systems that use cortext-a53 cpus. They do not even use aarch64 cpus but instead cross build on amd64 cpus. As for official port-package builds/distributions: they also normally do not target cortex-a53 to exclusion but may target aarch64 in general (armv8a). Such are normally built on aarch64 systems but not systems that have cortex-a53 cpus. So only use of unofficial builds generally can involved code targeted only to cortex-a53 cpus. As stands, outside clang/clang++ itself (and its tool chain), it is not always simple to determine if aarch64 (armv8a or later) is what is being targeted, especially when port-packages are involved. Also, rust and other languages or compilers (and tool chains) may have the same type of 843419 issue independently of clang/clang++. The existing cortex-a53 843419 handling breaks some rust builds performed on aarch64 that do not target aarch64 at all (last I checked): 843419 does not apply to any such but is being specified anyway as it is difficult to determine that the port is such a port. > > > On 20.08.2026 19:30, Adrian Chadd wrote: >> Do they or do they not have workarounds for the a53 bug in question? >> >> Like, ok, I can understand an issue like "rust/go is looking at LDFLAGS" >> which is a whole fun bottle of wtf, but the end question I have here >> is whether >> rust/go have the workaround in question or not. >> >> Life may be easier if you live on later silicon without these bugs, >> but we >> live in a world where there's plenty of arm64 silicon revisions out there >> all with different fun bugs and if we want to ship single kernel/ >> userland and >> package builds for them all, we /do/ need to compile code that runs on >> the least common denominator. >> >> >> >> >> -adrian >> >> On Thu, 20 Aug 2026 at 08:41, Dima Panov wrote: >>> >>> 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: 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 >>>> AuthorDate: 2026-07-14 15:07:30 +0000 >>>> Commit:     Andrew Turner >>>> 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 >>>>       Reported by:    Andreas Schuh >>>>       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 (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix- >>> dev.freebsd.org) >>> (desktop, kde, x11, office, ports-secteam)@FreeBSD team >>> > -- === Mark Millard marklmi at yahoo.com