Makefile.compiler-rt revision 1.12
11.12Srin# $NetBSD: Makefile.compiler-rt,v 1.12 2020/04/24 00:22:57 rin Exp $ 21.1Sjoerg 31.1SjoergCOMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist 41.1Sjoerg 51.1Sjoerg.if ${MACHINE_ARCH} == "powerpc" 61.4SjoergCOMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc 71.4SjoergCOMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc 81.1Sjoerg.else 91.4SjoergCOMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_CPU} 101.4SjoergCOMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_ARCH} 111.1Sjoerg.endif 121.1Sjoerg 131.1Sjoerg.PATH: ${COMPILER_RT_CPU_DIR} 141.1Sjoerg.PATH: ${COMPILER_RT_ARCH_DIR} 151.4Sjoerg.PATH: ${COMPILER_RT_SRCDIR}/lib/builtins 161.1Sjoerg 171.1SjoergGENERIC_SRCS+= \ 181.1Sjoerg absvdi2.c \ 191.1Sjoerg absvsi2.c \ 201.1Sjoerg absvti2.c \ 211.1Sjoerg addvdi3.c \ 221.1Sjoerg addvsi3.c \ 231.1Sjoerg addvti3.c \ 241.1Sjoerg ashlti3.c \ 251.1Sjoerg ashrti3.c \ 261.1Sjoerg clzti2.c \ 271.1Sjoerg cmpti2.c \ 281.1Sjoerg ctzti2.c \ 291.1Sjoerg divti3.c \ 301.1Sjoerg ffsti2.c \ 311.1Sjoerg int_util.c \ 321.1Sjoerg lshrti3.c \ 331.1Sjoerg modti3.c \ 341.1Sjoerg mulodi4.c \ 351.1Sjoerg mulosi4.c \ 361.1Sjoerg muloti4.c \ 371.1Sjoerg multi3.c \ 381.1Sjoerg mulvdi3.c \ 391.1Sjoerg mulvsi3.c \ 401.1Sjoerg mulvti3.c \ 411.1Sjoerg negti2.c \ 421.1Sjoerg negvdi2.c \ 431.1Sjoerg negvsi2.c \ 441.1Sjoerg negvti2.c \ 451.1Sjoerg paritydi2.c \ 461.1Sjoerg paritysi2.c \ 471.1Sjoerg parityti2.c \ 481.1Sjoerg popcountdi2.c \ 491.1Sjoerg popcountsi2.c \ 501.1Sjoerg popcountti2.c \ 511.1Sjoerg subvdi3.c \ 521.1Sjoerg subvsi3.c \ 531.1Sjoerg subvti3.c \ 541.1Sjoerg ucmpti2.c \ 551.1Sjoerg udivmodti4.c \ 561.1Sjoerg udivti3.c \ 571.1Sjoerg umodti3.c 581.1Sjoerg 591.5Smatt.if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha" 601.5SmattGENERIC_SRCS+= \ 611.5Smatt clzsi2.c \ 621.5Smatt ctzsi2.c 631.5Smatt.endif 641.5Smatt 651.11Srin.if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha" && \ 661.11Srin ${MACHINE_ARCH} != "m68k" 671.11SrinGENERIC_SRCS+= \ 681.12Srin divmodsi4.c \ 691.5Smatt divsi3.c \ 701.5Smatt modsi3.c \ 711.12Srin udivmodsi4.c \ 721.5Smatt udivsi3.c \ 731.5Smatt umodsi3.c 741.5Smatt.endif 751.5Smatt 761.9Sthorpej.if ${MACHINE_CPU} != "aarch64" 771.5SmattGENERIC_SRCS+= \ 781.5Smatt clzdi2.c \ 791.5Smatt ctzdi2.c \ 801.5Smatt ffsdi2.c 811.5Smatt.endif 821.5Smatt 831.5Smatt.if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha" 841.5SmattGENERIC_SRCS+= \ 851.5Smatt ashldi3.c \ 861.5Smatt ashrdi3.c \ 871.5Smatt lshrdi3.c 881.5Smatt.endif 891.5Smatt 901.5Smatt.if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha" 911.5SmattGENERIC_SRCS+= \ 921.5Smatt cmpdi2.c \ 931.5Smatt divdi3.c \ 941.5Smatt divmoddi4.c \ 951.5Smatt moddi3.c \ 961.5Smatt muldi3.c \ 971.5Smatt negdi2.c \ 981.5Smatt ucmpdi2.c \ 991.5Smatt udivdi3.c \ 1001.5Smatt udivmoddi4.c \ 1011.5Smatt umoddi3.c 1021.5Smatt.endif 1031.5Smatt 1041.1Sjoerg.if ${MACHINE_CPU} == "arm" 1051.2Sjoerg. if !empty(MACHINE_ARCH:Mearm*) 1061.1SjoergGENERIC_SRCS+= \ 1071.1Sjoerg aeabi_idivmod.S \ 1081.1Sjoerg aeabi_ldivmod.S \ 1091.1Sjoerg aeabi_uidivmod.S \ 1101.3Sjoerg aeabi_uldivmod.S \ 1111.3Sjoerg __aeabi_idiv0.c \ 1121.3Sjoerg __aeabi_ldiv0.c 1131.1Sjoerg. endif 1141.1Sjoerg.endif 1151.1Sjoerg 1161.1Sjoerg.for src in ${GENERIC_SRCS} 1171.1Sjoerg. if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \ 1181.1Sjoerg exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S) 1191.1SjoergSRCS+= ${src:R}.S 1201.1Sjoerg. else 1211.1SjoergSRCS+= ${src} 1221.1SjoergCOPTS.${src}+= -Wno-missing-prototypes \ 1231.1Sjoerg -Wno-old-style-definition \ 1241.1Sjoerg -Wno-strict-prototypes \ 1251.1Sjoerg -Wno-uninitialized 1261.1Sjoerg. endif 1271.1Sjoerg.endfor 1281.1Sjoerg 1291.1SjoergCPPFLAGS.int_util.c+= -DKERNEL_USE 1301.6Smrg 1311.6Smrg# XXX Explicit divide by zero in udivmoddi4.c -> abort(). 1321.10Smrg.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc" 1331.8Smrg. if ${MACHINE_CPU} != "arm" 1341.6SmrgCOPTS.udivmoddi4.c+= -fnon-call-exceptions 1351.8Smrg. endif 1361.6Smrg.endif 137