1 # $NetBSD: Makefile.inc,v 1.1 2013/07/04 22:14:43 joerg Exp $ 2 3 COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist 4 5 .if ${MACHINE_ARCH} == "powerpc" 6 COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/ppc 7 COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/ppc 8 .else 9 COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_CPU} 10 COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_ARCH} 11 .endif 12 13 14 .PATH: ${COMPILER_RT_CPU_DIR} 15 .PATH: ${COMPILER_RT_ARCH_DIR} 16 .PATH: ${COMPILER_RT_SRCDIR}/lib 17 18 # Complex support needs parts of libm 19 #GENERIC_SRCS+= 20 # mulxc3.c \ 21 # mulsc3.c \ 22 # divxc3.c \ 23 # divdc3.c \ 24 # divsc3.c 25 26 GENERIC_SRCS+= \ 27 absvdi2.c \ 28 absvsi2.c \ 29 absvti2.c \ 30 adddf3.c \ 31 addsf3.c \ 32 addvdi3.c \ 33 addvsi3.c \ 34 addvti3.c \ 35 ashldi3.c \ 36 ashlti3.c \ 37 ashrdi3.c \ 38 ashrti3.c \ 39 atomic.c \ 40 clzdi2.c \ 41 clzsi2.c \ 42 clzti2.c \ 43 cmpdi2.c \ 44 cmpti2.c \ 45 comparedf2.c \ 46 comparesf2.c \ 47 ctzdi2.c \ 48 ctzsi2.c \ 49 ctzti2.c \ 50 divdf3.c \ 51 divdi3.c \ 52 divmoddi4.c \ 53 divmodsi4.c \ 54 divsf3.c \ 55 divsi3.c \ 56 divti3.c \ 57 extendsfdf2.c \ 58 ffsdi2.c \ 59 ffsti2.c \ 60 fixdfdi.c \ 61 fixdfsi.c \ 62 fixdfti.c \ 63 fixsfdi.c \ 64 fixsfsi.c \ 65 fixsfti.c \ 66 fixunsdfdi.c \ 67 fixunsdfsi.c \ 68 fixunsdfti.c \ 69 fixunssfdi.c \ 70 fixunssfsi.c \ 71 fixunssfti.c \ 72 fixunsxfdi.c \ 73 fixunsxfsi.c \ 74 fixunsxfti.c \ 75 fixxfdi.c \ 76 fixxfti.c \ 77 floatdidf.c \ 78 floatdisf.c \ 79 floatdixf.c \ 80 floatsidf.c \ 81 floatsisf.c \ 82 floattidf.c \ 83 floattisf.c \ 84 floattixf.c \ 85 floatundidf.c \ 86 floatundisf.c \ 87 floatundixf.c \ 88 floatunsidf.c \ 89 floatunsisf.c \ 90 floatuntidf.c \ 91 floatuntisf.c \ 92 floatuntixf.c \ 93 gcc_personality_v0.c \ 94 int_util.c \ 95 lshrdi3.c \ 96 lshrti3.c \ 97 moddi3.c \ 98 modsi3.c \ 99 modti3.c \ 100 muldc3.c \ 101 muldf3.c \ 102 muldi3.c \ 103 mulodi4.c \ 104 mulosi4.c \ 105 muloti4.c \ 106 mulsf3.c \ 107 multi3.c \ 108 mulvdi3.c \ 109 mulvsi3.c \ 110 mulvti3.c \ 111 negdf2.c \ 112 negdi2.c \ 113 negsf2.c \ 114 negti2.c \ 115 negvdi2.c \ 116 negvsi2.c \ 117 negvti2.c \ 118 paritydi2.c \ 119 paritysi2.c \ 120 parityti2.c \ 121 popcountdi2.c \ 122 popcountsi2.c \ 123 popcountti2.c \ 124 powidf2.c \ 125 powisf2.c \ 126 powitf2.c \ 127 powixf2.c \ 128 subdf3.c \ 129 subsf3.c \ 130 subvdi3.c \ 131 subvsi3.c \ 132 subvti3.c \ 133 truncdfsf2.c \ 134 ucmpdi2.c \ 135 ucmpti2.c \ 136 udivdi3.c \ 137 udivmoddi4.c \ 138 udivmodsi4.c \ 139 udivmodti4.c \ 140 udivsi3.c \ 141 udivti3.c \ 142 umoddi3.c \ 143 umodsi3.c \ 144 umodti3.c 145 146 .if ${MACHINE_ARCH} == "powerpc" 147 GENERIC_SRCS+= \ 148 fixtfdi.c \ 149 fixunstfdi.c \ 150 floatditf.c \ 151 floatunditf.c \ 152 gcc_qadd.c \ 153 gcc_qdiv.c \ 154 gcc_qmul.c \ 155 gcc_qsub.c 156 .endif 157 158 .for src in ${GENERIC_SRCS} 159 . if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \ 160 exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S) 161 SRCS+= ${src:R}.S 162 . else 163 SRCS+= ${src} 164 COPTS.${src}+= -Wno-error=missing-prototypes 165 . endif 166 .endfor 167