libcompiler_rt: move file list to Makefile.inc for reuse elsewhere

Also switch to the style used in the clang390-import branch to reduce
future conflicts.

Reviewed by:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8039
This commit is contained in:
Ed Maste 2016-09-27 18:55:45 +00:00
parent feeb22f34a
commit 040b30497c
2 changed files with 217 additions and 217 deletions

View File

@ -10,223 +10,7 @@ WARNS?= 2
CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN
CFLAGS+=-I${SRCTOP}/contrib/libcxxrt
.if ${MACHINE_CPUARCH} == "amd64"
CRTARCH=x86_64
.else
CRTARCH=${MACHINE_CPUARCH}
.endif
CRTSRC=${SRCTOP}/contrib/compiler-rt/lib/builtins
.PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC}
SRCF= absvdi2 \
absvsi2 \
absvti2 \
addvdi3 \
addvsi3 \
addvti3 \
apple_versioning \
ashldi3 \
ashlti3 \
ashrdi3 \
ashrti3 \
clear_cache \
clzdi2 \
clzsi2 \
clzti2 \
cmpdi2 \
cmpti2 \
ctzdi2 \
ctzsi2 \
ctzti2 \
divdc3 \
divdi3 \
divmoddi4 \
divmodsi4 \
divsc3 \
divtc3 \
divti3 \
divxc3 \
enable_execute_stack \
eprintf \
extendhfsf2 \
ffsdi2 \
ffsti2 \
fixdfdi \
fixdfti \
fixsfdi \
fixsfti \
fixunsdfdi \
fixunsdfsi \
fixunsdfti \
fixunssfdi \
fixunssfsi \
fixunssfti \
fixunsxfdi \
fixunsxfsi \
fixunsxfti \
fixxfdi \
fixxfti \
floatdidf \
floatdisf \
floatditf \
floatdixf \
floatsitf \
floattidf \
floattisf \
floattixf \
floatundidf \
floatundisf \
floatunditf \
floatundixf \
floatunsidf \
floatunsisf \
floatuntidf \
floatuntisf \
floatuntixf \
gcc_personality_v0 \
int_util \
lshrdi3 \
lshrti3 \
moddi3 \
modti3 \
muldc3 \
muldi3 \
mulodi4 \
mulosi4 \
muloti4 \
mulsc3 \
multi3 \
mulvdi3 \
mulvsi3 \
mulvti3 \
multc3 \
mulxc3 \
negdf2 \
negdi2 \
negsf2 \
negti2 \
negvdi2 \
negvsi2 \
negvti2 \
paritydi2 \
paritysi2 \
parityti2 \
popcountdi2 \
popcountsi2 \
popcountti2 \
powidf2 \
powisf2 \
powitf2 \
powixf2 \
subvdi3 \
subvsi3 \
subvti3 \
trampoline_setup \
truncdfhf2 \
truncsfhf2 \
ucmpdi2 \
ucmpti2 \
udivdi3 \
udivmoddi4 \
udivmodsi4 \
udivmodti4 \
udivti3 \
umoddi3 \
umodti3
# 128-bit quad precision long double support, only used on arm64
.if ${MACHINE_CPUARCH} == "aarch64"
SRCF+= addtf3 \
comparetf2 \
divtf3 \
extenddftf2 \
extendsftf2 \
fixtfdi \
fixtfsi \
fixtfti \
fixunstfdi \
fixunstfsi \
fixunstfti \
floatunsitf \
multf3 \
subtf3 \
trunctfdf2 \
trunctfsf2
.endif
# These are already shipped by libc.a on arm and mips
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
SRCF+= adddf3 \
addsf3 \
divdf3 \
divsf3 \
extendsfdf2 \
fixdfsi \
fixsfsi \
floatsidf \
floatsisf \
muldf3 \
mulsf3 \
subdf3 \
subsf3 \
truncdfsf2
.endif
.if ${MACHINE_CPUARCH} != "arm"
SRCF+= comparedf2 \
comparesf2
.endif
.if ${MACHINE_CPUARCH} != "mips"
SRCF+= divsi3 \
modsi3 \
udivsi3 \
umodsi3
.endif
# FreeBSD-specific atomic intrinsics.
.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6"
.PATH: ${.CURDIR}/../../sys/arm/arm
SRCF+= stdatomic
CFLAGS+= -DEMIT_SYNC_ATOMICS
.elif ${MACHINE_CPUARCH} == "mips"
.PATH: ${.CURDIR}/../../sys/mips/mips
SRCF+= stdatomic
.endif
.for file in ${SRCF}
.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") && \
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 \
aeabi_idivmod.S \
aeabi_ldivmod.S \
aeabi_memcmp.S \
aeabi_memcpy.S \
aeabi_memmove.S \
aeabi_memset.S \
aeabi_uidivmod.S \
aeabi_uldivmod.S \
bswapdi2.S \
bswapsi2.S \
switch16.S \
switch32.S \
switch8.S \
switchu8.S \
sync_synchronize.S
.endif
.include "Makefile.inc"
.if ${MK_INSTALLLIB} != "no"
SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a

View File

@ -0,0 +1,216 @@
# $FreeBSD$
CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/}
CRTSRC= ${SRCTOP}/contrib/compiler-rt/lib/builtins
.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
SRCF+= divtc3
SRCF+= divti3
SRCF+= divxc3
SRCF+= enable_execute_stack
SRCF+= eprintf
SRCF+= extendhfsf2
SRCF+= ffsdi2
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+= floatdidf
SRCF+= floatdisf
SRCF+= floatditf
SRCF+= floatdixf
SRCF+= floatsitf
SRCF+= floattidf
SRCF+= floattisf
SRCF+= floattixf
SRCF+= floatundidf
SRCF+= floatundisf
SRCF+= floatunditf
SRCF+= floatundixf
SRCF+= floatunsidf
SRCF+= floatunsisf
SRCF+= floatuntidf
SRCF+= floatuntisf
SRCF+= floatuntixf
SRCF+= gcc_personality_v0
SRCF+= int_util
SRCF+= lshrdi3
SRCF+= lshrti3
SRCF+= moddi3
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
SRCF+= udivti3
SRCF+= umoddi3
SRCF+= umodti3
# 128-bit quad precision long double support, only used on arm64
.if ${MACHINE_CPUARCH} == "aarch64"
SRCF+= addtf3
SRCF+= comparetf2
SRCF+= divtf3
SRCF+= extenddftf2
SRCF+= extendsftf2
SRCF+= fixtfdi
SRCF+= fixtfsi
SRCF+= fixtfti
SRCF+= fixunstfdi
SRCF+= fixunstfsi
SRCF+= fixunstfti
SRCF+= floatunsitf
SRCF+= multf3
SRCF+= subtf3
SRCF+= trunctfdf2
SRCF+= trunctfsf2
.endif
# These are already shipped by libc.a on arm and mips
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
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
.if ${MACHINE_CPUARCH} != "arm"
SRCF+= comparedf2
SRCF+= comparesf2
.endif
.if ${MACHINE_CPUARCH} != "mips"
SRCF+= divsi3
SRCF+= modsi3
SRCF+= udivsi3
SRCF+= umodsi3
.endif
# FreeBSD-specific atomic intrinsics.
.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6"
.PATH: ${SRCTOP}/sys/arm/arm
SRCF+= stdatomic
CFLAGS+= -DEMIT_SYNC_ATOMICS
.elif ${MACHINE_CPUARCH} == "mips"
.PATH: ${SRCTOP}/sys/mips/mips
SRCF+= stdatomic
.endif
.for file in ${SRCF}
.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \
&& 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