2016-09-27 18:55:45 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/}
|
|
|
|
|
2019-12-20 19:53:05 +00:00
|
|
|
CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
|
2016-09-27 18:55:45 +00:00
|
|
|
|
|
|
|
.PATH: ${CRTSRC}/${CRTARCH}
|
|
|
|
.PATH: ${CRTSRC}
|
|
|
|
|
|
|
|
SRCF+= absvdi2
|
|
|
|
SRCF+= absvsi2
|
|
|
|
SRCF+= absvti2
|
|
|
|
SRCF+= addvdi3
|
|
|
|
SRCF+= addvsi3
|
|
|
|
SRCF+= addvti3
|
|
|
|
SRCF+= apple_versioning
|
|
|
|
SRCF+= ashldi3
|
|
|
|
SRCF+= ashlti3
|
|
|
|
SRCF+= ashrdi3
|
|
|
|
SRCF+= ashrti3
|
|
|
|
SRCF+= clear_cache
|
|
|
|
SRCF+= clzdi2
|
|
|
|
SRCF+= clzsi2
|
|
|
|
SRCF+= clzti2
|
|
|
|
SRCF+= cmpdi2
|
|
|
|
SRCF+= cmpti2
|
|
|
|
SRCF+= ctzdi2
|
|
|
|
SRCF+= ctzsi2
|
|
|
|
SRCF+= ctzti2
|
|
|
|
SRCF+= divdc3
|
|
|
|
SRCF+= divdi3
|
|
|
|
SRCF+= divmoddi4
|
|
|
|
SRCF+= divmodsi4
|
|
|
|
SRCF+= divsc3
|
2017-08-21 17:49:01 +00:00
|
|
|
SRCF+= divsi3
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= divtc3
|
|
|
|
SRCF+= divti3
|
|
|
|
SRCF+= divxc3
|
|
|
|
SRCF+= enable_execute_stack
|
|
|
|
SRCF+= eprintf
|
|
|
|
SRCF+= extendhfsf2
|
|
|
|
SRCF+= ffsdi2
|
2017-04-22 18:43:15 +00:00
|
|
|
SRCF+= ffssi2
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= ffsti2
|
|
|
|
SRCF+= fixdfdi
|
|
|
|
SRCF+= fixdfti
|
|
|
|
SRCF+= fixsfdi
|
|
|
|
SRCF+= fixsfti
|
|
|
|
SRCF+= fixunsdfdi
|
|
|
|
SRCF+= fixunsdfsi
|
|
|
|
SRCF+= fixunsdfti
|
|
|
|
SRCF+= fixunssfdi
|
|
|
|
SRCF+= fixunssfsi
|
|
|
|
SRCF+= fixunssfti
|
|
|
|
SRCF+= fixunsxfdi
|
|
|
|
SRCF+= fixunsxfsi
|
|
|
|
SRCF+= fixunsxfti
|
|
|
|
SRCF+= fixxfdi
|
|
|
|
SRCF+= fixxfti
|
|
|
|
SRCF+= floatditf
|
|
|
|
SRCF+= floattidf
|
|
|
|
SRCF+= floattisf
|
|
|
|
SRCF+= floattixf
|
|
|
|
SRCF+= floatunditf
|
|
|
|
SRCF+= floatunsidf
|
|
|
|
SRCF+= floatunsisf
|
|
|
|
SRCF+= floatuntidf
|
|
|
|
SRCF+= floatuntisf
|
|
|
|
SRCF+= floatuntixf
|
2019-08-29 20:39:24 +00:00
|
|
|
SRCF+= gcc_personality_v0 # not in upstream
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= int_util
|
|
|
|
SRCF+= lshrdi3
|
|
|
|
SRCF+= lshrti3
|
|
|
|
SRCF+= moddi3
|
2017-08-21 17:49:01 +00:00
|
|
|
SRCF+= modsi3
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= modti3
|
|
|
|
SRCF+= muldc3
|
|
|
|
SRCF+= muldi3
|
|
|
|
SRCF+= mulodi4
|
|
|
|
SRCF+= mulosi4
|
|
|
|
SRCF+= muloti4
|
|
|
|
SRCF+= mulsc3
|
|
|
|
SRCF+= multi3
|
|
|
|
SRCF+= mulvdi3
|
|
|
|
SRCF+= mulvsi3
|
|
|
|
SRCF+= mulvti3
|
|
|
|
SRCF+= multc3
|
|
|
|
SRCF+= mulxc3
|
|
|
|
SRCF+= negdf2
|
|
|
|
SRCF+= negdi2
|
|
|
|
SRCF+= negsf2
|
|
|
|
SRCF+= negti2
|
|
|
|
SRCF+= negvdi2
|
|
|
|
SRCF+= negvsi2
|
|
|
|
SRCF+= negvti2
|
|
|
|
SRCF+= paritydi2
|
|
|
|
SRCF+= paritysi2
|
|
|
|
SRCF+= parityti2
|
|
|
|
SRCF+= popcountdi2
|
|
|
|
SRCF+= popcountsi2
|
|
|
|
SRCF+= popcountti2
|
|
|
|
SRCF+= powidf2
|
|
|
|
SRCF+= powisf2
|
|
|
|
SRCF+= powitf2
|
|
|
|
SRCF+= powixf2
|
|
|
|
SRCF+= subvdi3
|
|
|
|
SRCF+= subvsi3
|
|
|
|
SRCF+= subvti3
|
|
|
|
SRCF+= trampoline_setup
|
|
|
|
SRCF+= truncdfhf2
|
|
|
|
SRCF+= truncsfhf2
|
|
|
|
SRCF+= ucmpdi2
|
|
|
|
SRCF+= ucmpti2
|
|
|
|
SRCF+= udivdi3
|
|
|
|
SRCF+= udivmoddi4
|
|
|
|
SRCF+= udivmodsi4
|
|
|
|
SRCF+= udivmodti4
|
2017-08-21 17:49:01 +00:00
|
|
|
SRCF+= udivsi3
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= udivti3
|
|
|
|
SRCF+= umoddi3
|
2017-08-21 17:49:01 +00:00
|
|
|
SRCF+= umodsi3
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= umodti3
|
|
|
|
|
2017-08-30 07:05:29 +00:00
|
|
|
# Avoid using SSE2 instructions on i386, if unsupported.
|
|
|
|
.if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
|
2017-08-29 21:45:00 +00:00
|
|
|
SRCS+= floatdidf.c
|
|
|
|
SRCS+= floatdisf.c
|
|
|
|
SRCS+= floatdixf.c
|
|
|
|
SRCS+= floatundidf.c
|
|
|
|
SRCS+= floatundisf.c
|
|
|
|
SRCS+= floatundixf.c
|
|
|
|
.else
|
|
|
|
SRCF+= floatdidf
|
|
|
|
SRCF+= floatdisf
|
|
|
|
SRCF+= floatdixf
|
|
|
|
SRCF+= floatundidf
|
|
|
|
SRCF+= floatundisf
|
|
|
|
SRCF+= floatundixf
|
|
|
|
.endif
|
|
|
|
|
2016-09-28 19:29:01 +00:00
|
|
|
# __cpu_model support, only used on x86
|
|
|
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
|
|
|
SRCF+= cpu_model
|
|
|
|
.endif
|
|
|
|
|
2016-11-03 13:06:17 +00:00
|
|
|
#
|
|
|
|
# 128-bit quad precision long double support,
|
2016-11-16 15:21:32 +00:00
|
|
|
# only used on some architectures.
|
2016-11-03 13:06:17 +00:00
|
|
|
#
|
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= addtf3
|
|
|
|
SRCF+= comparetf2
|
|
|
|
SRCF+= divtf3
|
|
|
|
SRCF+= extenddftf2
|
|
|
|
SRCF+= extendsftf2
|
|
|
|
SRCF+= fixtfdi
|
|
|
|
SRCF+= fixtfsi
|
|
|
|
SRCF+= fixtfti
|
|
|
|
SRCF+= fixunstfdi
|
|
|
|
SRCF+= fixunstfsi
|
|
|
|
SRCF+= fixunstfti
|
2019-08-29 20:39:24 +00:00
|
|
|
SRCF+= floatsitf
|
|
|
|
SRCF+= floattitf
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= floatunsitf
|
2019-08-29 20:39:24 +00:00
|
|
|
SRCF+= floatuntitf
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= multf3
|
|
|
|
SRCF+= subtf3
|
|
|
|
SRCF+= trunctfdf2
|
|
|
|
SRCF+= trunctfsf2
|
|
|
|
.endif
|
|
|
|
|
2016-11-16 15:21:32 +00:00
|
|
|
# These are already shipped by libc.a on some architectures.
|
|
|
|
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
|
|
|
|
${MACHINE_CPUARCH} != "riscv"
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= adddf3
|
|
|
|
SRCF+= addsf3
|
|
|
|
SRCF+= divdf3
|
|
|
|
SRCF+= divsf3
|
|
|
|
SRCF+= extendsfdf2
|
|
|
|
SRCF+= fixdfsi
|
|
|
|
SRCF+= fixsfsi
|
|
|
|
SRCF+= floatsidf
|
|
|
|
SRCF+= floatsisf
|
|
|
|
SRCF+= muldf3
|
|
|
|
SRCF+= mulsf3
|
|
|
|
SRCF+= subdf3
|
|
|
|
SRCF+= subsf3
|
|
|
|
SRCF+= truncdfsf2
|
|
|
|
.endif
|
|
|
|
|
2018-02-02 05:04:43 +00:00
|
|
|
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
|
2016-09-27 18:55:45 +00:00
|
|
|
SRCF+= comparedf2
|
|
|
|
SRCF+= comparesf2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# FreeBSD-specific atomic intrinsics.
|
2017-08-14 22:38:54 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
2016-09-27 18:55:45 +00:00
|
|
|
.PATH: ${SRCTOP}/sys/arm/arm
|
|
|
|
|
|
|
|
SRCF+= stdatomic
|
|
|
|
CFLAGS+= -DEMIT_SYNC_ATOMICS
|
|
|
|
.elif ${MACHINE_CPUARCH} == "mips"
|
|
|
|
.PATH: ${SRCTOP}/sys/mips/mips
|
|
|
|
|
|
|
|
SRCF+= stdatomic
|
|
|
|
.endif
|
|
|
|
|
2019-12-26 23:06:28 +00:00
|
|
|
|
|
|
|
.if "${COMPILER_TYPE}" == "clang" && \
|
|
|
|
(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
|
|
|
|
SRCS+= atomic.c
|
|
|
|
CFLAGS.atomic.c+= -Wno-atomic-alignment
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2016-09-27 18:55:45 +00:00
|
|
|
.for file in ${SRCF}
|
2017-10-05 23:01:33 +00:00
|
|
|
.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \
|
2016-09-27 18:55:45 +00:00
|
|
|
&& exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
|
|
|
|
SRCS+= ${file}vfp.S
|
|
|
|
. elif exists(${CRTSRC}/${CRTARCH}/${file}.S)
|
|
|
|
SRCS+= ${file}.S
|
|
|
|
. else
|
|
|
|
SRCS+= ${file}.c
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
|
|
|
SRCS+= aeabi_div0.c
|
|
|
|
SRCS+= aeabi_idivmod.S
|
|
|
|
SRCS+= aeabi_ldivmod.S
|
|
|
|
SRCS+= aeabi_memcmp.S
|
|
|
|
SRCS+= aeabi_memcpy.S
|
|
|
|
SRCS+= aeabi_memmove.S
|
|
|
|
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
|
2017-05-21 23:15:32 +00:00
|
|
|
|
2017-07-06 13:27:01 +00:00
|
|
|
# On some archs GCC-6.3 requires bswap32 built-in.
|
2019-08-14 18:41:28 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \
|
|
|
|
${MACHINE_CPUARCH} == "sparc64"
|
2017-05-21 23:15:32 +00:00
|
|
|
SRCS+= bswapdi2.c
|
|
|
|
SRCS+= bswapsi2.c
|
|
|
|
.endif
|
2019-12-04 20:18:12 +00:00
|
|
|
|
|
|
|
.if ${MACHINE_ARCH:Mriscv*sf}
|
|
|
|
CFLAGS+= -D__SOFT_FP__
|
|
|
|
.endif
|