Changeset View
Changeset View
Standalone View
Standalone View
lib/libcompiler_rt/Makefile.inc
Show All 12 Lines | |||||
SRCF+= addvdi3 | SRCF+= addvdi3 | ||||
SRCF+= addvsi3 | SRCF+= addvsi3 | ||||
SRCF+= addvti3 | SRCF+= addvti3 | ||||
SRCF+= apple_versioning | SRCF+= apple_versioning | ||||
SRCF+= ashldi3 | SRCF+= ashldi3 | ||||
SRCF+= ashlti3 | SRCF+= ashlti3 | ||||
SRCF+= ashrdi3 | SRCF+= ashrdi3 | ||||
SRCF+= ashrti3 | SRCF+= ashrti3 | ||||
SRCF+= bswapdi2 | |||||
SRCF+= bswapsi2 | |||||
SRCF+= clear_cache | SRCF+= clear_cache | ||||
SRCF+= clzdi2 | SRCF+= clzdi2 | ||||
SRCF+= clzsi2 | SRCF+= clzsi2 | ||||
SRCF+= clzti2 | SRCF+= clzti2 | ||||
SRCF+= cmpdi2 | SRCF+= cmpdi2 | ||||
SRCF+= cmpti2 | SRCF+= cmpti2 | ||||
SRCF+= ctzdi2 | SRCF+= ctzdi2 | ||||
SRCF+= ctzsi2 | SRCF+= ctzsi2 | ||||
▲ Show 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
.if ${MACHINE_CPUARCH} == "arm" | .if ${MACHINE_CPUARCH} == "arm" | ||||
.PATH: ${SRCTOP}/sys/arm/arm | .PATH: ${SRCTOP}/sys/arm/arm | ||||
SRCF+= stdatomic | SRCF+= stdatomic | ||||
CFLAGS+= -DEMIT_SYNC_ATOMICS | CFLAGS+= -DEMIT_SYNC_ATOMICS | ||||
.elif ${MACHINE_CPUARCH} == "mips" | .elif ${MACHINE_CPUARCH} == "mips" | ||||
.PATH: ${SRCTOP}/sys/mips/mips | .PATH: ${SRCTOP}/sys/mips/mips | ||||
SRCF+= stdatomic | SRCF+= stdatomic | ||||
dim: So unfortunately this review doesn't change the broken situation for 32-bit mips, which was… | |||||
.endif | .else | ||||
.if "${COMPILER_TYPE}" == "clang" && \ | |||||
(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe") | |||||
SRCS+= atomic.c | SRCS+= atomic.c | ||||
.if "${COMPILER_TYPE}" == "clang" | |||||
CFLAGS.atomic.c+= -Wno-atomic-alignment | CFLAGS.atomic.c+= -Wno-atomic-alignment | ||||
.endif | .endif | ||||
.endif | |||||
.for file in ${SRCF} | .for file in ${SRCF} | ||||
.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ | .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ | ||||
&& exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) | && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) | ||||
SRCS+= ${file}vfp.S | SRCS+= ${file}vfp.S | ||||
. elif exists(${CRTSRC}/${CRTARCH}/${file}.S) | . elif exists(${CRTSRC}/${CRTARCH}/${file}.S) | ||||
SRCS+= ${file}.S | SRCS+= ${file}.S | ||||
. else | . else | ||||
SRCS+= ${file}.c | SRCS+= ${file}.c | ||||
. endif | . endif | ||||
.endfor | .endfor | ||||
.if ${MACHINE_CPUARCH} == "arm" | .if ${MACHINE_CPUARCH} == "arm" | ||||
SRCS+= aeabi_div0.c | SRCS+= aeabi_div0.c | ||||
SRCS+= aeabi_idivmod.S | SRCS+= aeabi_idivmod.S | ||||
SRCS+= aeabi_ldivmod.S | SRCS+= aeabi_ldivmod.S | ||||
SRCS+= aeabi_memcmp.S | SRCS+= aeabi_memcmp.S | ||||
SRCS+= aeabi_memcpy.S | SRCS+= aeabi_memcpy.S | ||||
SRCS+= aeabi_memmove.S | SRCS+= aeabi_memmove.S | ||||
SRCS+= aeabi_memset.S | SRCS+= aeabi_memset.S | ||||
SRCS+= aeabi_uidivmod.S | SRCS+= aeabi_uidivmod.S | ||||
SRCS+= aeabi_uldivmod.S | SRCS+= aeabi_uldivmod.S | ||||
SRCS+= bswapdi2.S | |||||
SRCS+= bswapsi2.S | |||||
SRCS+= switch16.S | SRCS+= switch16.S | ||||
SRCS+= switch32.S | SRCS+= switch32.S | ||||
SRCS+= switch8.S | SRCS+= switch8.S | ||||
SRCS+= switchu8.S | SRCS+= switchu8.S | ||||
SRCS+= sync_synchronize.S | SRCS+= sync_synchronize.S | ||||
.endif | |||||
# On some archs GCC-6.3 requires bswap32 built-in. | |||||
.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" | |||||
SRCS+= bswapdi2.c | |||||
SRCS+= bswapsi2.c | |||||
.endif | .endif | ||||
.if ${MACHINE_ARCH:Mriscv*sf} | .if ${MACHINE_ARCH:Mriscv*sf} | ||||
CFLAGS+= -D__SOFT_FP__ | CFLAGS+= -D__SOFT_FP__ | ||||
.endif | .endif |
So unfortunately this review doesn't change the broken situation for 32-bit mips, which was actually one of my intents:
because obviously compiler-rt's atomic.c is skipped in favor of sys/mips/mips/stdatomic.c.
This latter file compiles to an empty object file, since it is entirely conditional on the define __SYNC_ATOMICS, and this doesn't appear to be defined. Furthermore, it appears to only implement those __sync_* functions, *not* the __atomic_ variants.
I guess we could just add compiler-rt's atomic.c unconditionally instead?