]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
compiler-rt: add aarch64 init function for LSE atomics
authorDimitry Andric <dim@FreeBSD.org>
Mon, 6 Sep 2021 19:23:10 +0000 (21:23 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 21 Sep 2021 18:17:05 +0000 (20:17 +0200)
commitb2cfac207d60904b3a4738224361b8bf157724bb
treeab46cd3fcc0a3ae5dac37682472ab5502417f89b
parent78a7d255e45dc04a389d4d2cc6697828a18245ae
compiler-rt: add aarch64 init function for LSE atomics

As reported by Ronald, adding the out-of-line LSE atomics helpers for
aarch64 to compiler-rt was not sufficient to link programs using these,
as they also require a __aarch64_have_lse_atomics global. This is
initialized in compiler-rt's lib/builtins/cpu_model.c, roughly similar
to the x86 CPU model and feature detection in that file.

Since upstream does not yet have a FreeBSD specific implementation for
getting the required information, add a simple one that should work for
now, while I try to get it sorted with the LLVM people.

Reported by: Ronald Klop <ronald-lists@klop.ws>
Fixes: cc55ee8009a5
PR: 257392

(cherry picked from commit efe67f33c322265eb303ec0ab40275100795b22a)
contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c
lib/libcompiler_rt/Makefile.inc