Index: lib/libcompiler_rt/Makefile.inc =================================================================== --- lib/libcompiler_rt/Makefile.inc +++ lib/libcompiler_rt/Makefile.inc @@ -18,6 +18,8 @@ SRCF+= ashlti3 SRCF+= ashrdi3 SRCF+= ashrti3 +SRCF+= bswapdi2 +SRCF+= bswapsi2 SRCF+= clear_cache SRCF+= clzdi2 SRCF+= clzsi2 @@ -211,13 +213,12 @@ .PATH: ${SRCTOP}/sys/mips/mips SRCF+= stdatomic -.endif - -.if "${COMPILER_TYPE}" == "clang" && \ - (${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe") +.else SRCS+= atomic.c +.if "${COMPILER_TYPE}" == "clang" CFLAGS.atomic.c+= -Wno-atomic-alignment .endif +.endif .for file in ${SRCF} .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ @@ -240,19 +241,11 @@ SRCS+= aeabi_memset.S SRCS+= aeabi_uidivmod.S SRCS+= aeabi_uldivmod.S -SRCS+= bswapdi2.S -SRCS+= bswapsi2.S SRCS+= switch16.S SRCS+= switch32.S SRCS+= switch8.S SRCS+= switchu8.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 .if ${MACHINE_ARCH:Mriscv*sf}