mirror of
https://github.com/openbsd/src.git
synced 2026-05-01 17:46:35 +00:00
Prepare ramdisks for outline atomics by providing a fake
__aarch64_have_lse_atomics variable that avoids pulling in the CPU feature detection code from libcompiler-rt that needs elf_aux_info(3). ok deraadt@
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2025/08/11 17:16:18 gkoehler Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2025/08/14 09:31:21 kettenis Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
LIB= stubs
|
||||
@@ -26,6 +26,10 @@ SRCS+= asr.c \
|
||||
res_send_async.c \
|
||||
sethostent.c
|
||||
|
||||
.if ${MACHINE_ARCH} == "aarch64"
|
||||
SRCS+= aarch64_lse.c
|
||||
.endif
|
||||
|
||||
NOPIC= Yes
|
||||
NOPROFILE=Yes
|
||||
|
||||
|
||||
12
distrib/special/libstubs/aarch64_lse.c
Normal file
12
distrib/special/libstubs/aarch64_lse.c
Normal file
@@ -0,0 +1,12 @@
|
||||
/* $OpenBSD: aarch64_lse.c,v 1.1 2025/08/14 09:31:21 kettenis Exp $ */
|
||||
|
||||
/* Public domain */
|
||||
|
||||
/*
|
||||
* The CPU feature detection code from libcompiler-rt uses
|
||||
* elf_aux_info(3) which isn't available. To prevent pulling in that
|
||||
* code, define a fake __aarch64_have_lse_atomics variable here.
|
||||
* Since LL/SC atomics are good enough for ramdisks, the default
|
||||
* initialization to false will work just fine on all machines.
|
||||
*/
|
||||
_Bool __aarch64_have_lse_atomics;
|
||||
Reference in New Issue
Block a user