1# $NetBSD: Makefile.compiler-rt,v 1.1 2013/12/03 16:15:22 joerg Exp $ 2 3COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist 4 5.if ${MACHINE_ARCH} == "powerpc" 6COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/ppc 7COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/ppc 8.else 9COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_CPU} 10COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_ARCH} 11.endif 12 13.PATH: ${COMPILER_RT_CPU_DIR} 14.PATH: ${COMPILER_RT_ARCH_DIR} 15.PATH: ${COMPILER_RT_SRCDIR}/lib 16 17GENERIC_SRCS+= \ 18 absvdi2.c \ 19 absvsi2.c \ 20 absvti2.c \ 21 addvdi3.c \ 22 addvsi3.c \ 23 addvti3.c \ 24 ashldi3.c \ 25 ashlti3.c \ 26 ashrdi3.c \ 27 ashrti3.c \ 28 clzdi2.c \ 29 clzsi2.c \ 30 clzti2.c \ 31 cmpdi2.c \ 32 cmpti2.c \ 33 ctzdi2.c \ 34 ctzsi2.c \ 35 ctzti2.c \ 36 divdi3.c \ 37 divmoddi4.c \ 38 divmodsi4.c \ 39 divsi3.c \ 40 divti3.c \ 41 ffsdi2.c \ 42 ffsti2.c \ 43 int_util.c \ 44 lshrdi3.c \ 45 lshrti3.c \ 46 moddi3.c \ 47 modsi3.c \ 48 modti3.c \ 49 muldi3.c \ 50 mulodi4.c \ 51 mulosi4.c \ 52 muloti4.c \ 53 multi3.c \ 54 mulvdi3.c \ 55 mulvsi3.c \ 56 mulvti3.c \ 57 negdi2.c \ 58 negti2.c \ 59 negvdi2.c \ 60 negvsi2.c \ 61 negvti2.c \ 62 paritydi2.c \ 63 paritysi2.c \ 64 parityti2.c \ 65 popcountdi2.c \ 66 popcountsi2.c \ 67 popcountti2.c \ 68 subvdi3.c \ 69 subvsi3.c \ 70 subvti3.c \ 71 ucmpdi2.c \ 72 ucmpti2.c \ 73 udivdi3.c \ 74 udivmoddi4.c \ 75 udivmodsi4.c \ 76 udivmodti4.c \ 77 udivsi3.c \ 78 udivti3.c \ 79 umoddi3.c \ 80 umodsi3.c \ 81 umodti3.c 82 83.if ${MACHINE_CPU} == "arm" 84. if !empty(LIBC_MACHINE_ARCH:Mearm*) 85GENERIC_SRCS+= \ 86 aeabi_idivmod.S \ 87 aeabi_ldivmod.S \ 88 aeabi_uidivmod.S \ 89 aeabi_uldivmod.S 90. endif 91.endif 92 93.for src in ${GENERIC_SRCS} 94. if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \ 95 exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S) 96SRCS+= ${src:R}.S 97. else 98SRCS+= ${src} 99COPTS.${src}+= -Wno-missing-prototypes \ 100 -Wno-old-style-definition \ 101 -Wno-strict-prototypes \ 102 -Wno-uninitialized 103. endif 104.endfor 105 106CPPFLAGS.int_util.c+= -DKERNEL_USE 107