2 CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/}
4 CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
6 .PATH: ${CRTSRC}/${CRTARCH}
15 SRCF+= apple_versioning
41 SRCF+= enable_execute_stack
109 SRCF+= trampoline_setup
124 # Enable compiler-rt's atomic implementation only for clang, as it uses clang
125 # specific builtins, and gcc packages usually come with their own libatomic.
126 # Exclude arm which has its own implementations of atomic functions, below.
127 .if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm"
131 # Avoid using SSE2 instructions on i386, if unsupported.
132 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
148 # __cpu_model support, only used on aarch64 and x86
149 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
150 ${MACHINE_CPUARCH} == "i386"
154 # The fp_mode implementation for amd64 and i386 is shared, while other
155 # architectures use the regular approach.
156 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
157 SRCS+= i386/fp_mode.c
163 # 128-bit quad precision long double support,
164 # only used on some architectures.
166 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
190 # These are already shipped by libc.a on some architectures.
191 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "riscv"
208 .if ${MACHINE_CPUARCH} != "arm"
213 # FreeBSD-specific atomic intrinsics.
214 .if ${MACHINE_CPUARCH} == "arm"
215 .PATH: ${SRCTOP}/sys/arm/arm
218 CFLAGS+= -DEMIT_SYNC_ATOMICS
222 .if ${MACHINE_CPUARCH} == "arm" && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \
223 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
225 . elif exists(${CRTSRC}/${CRTARCH}/${file}.S)
232 .if ${MACHINE_CPUARCH} == "arm"
234 SRCS+= aeabi_idivmod.S
235 SRCS+= aeabi_ldivmod.S
236 SRCS+= aeabi_memcmp.S
237 SRCS+= aeabi_memcpy.S
238 SRCS+= aeabi_memmove.S
239 SRCS+= aeabi_memset.S
240 SRCS+= aeabi_uidivmod.S
241 SRCS+= aeabi_uldivmod.S
246 SRCS+= sync_synchronize.S