1# $FreeBSD$ 2 3.include <bsd.own.mk> 4 5LIB= compiler_rt 6NO_PIC= 7WARNS?= 2 8 9CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN 10 11.if ${MACHINE_CPUARCH} == "amd64" 12CRTARCH=x86_64 13.else 14CRTARCH=${MACHINE_CPUARCH} 15.endif 16 17CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib 18 19.PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC} 20 21SRCF= absvdi2 \ 22 absvsi2 \ 23 absvti2 \ 24 addvdi3 \ 25 addvsi3 \ 26 addvti3 \ 27 ashldi3 \ 28 ashlti3 \ 29 ashrdi3 \ 30 ashrti3 \ 31 clear_cache \ 32 clzdi2 \ 33 clzsi2 \ 34 clzti2 \ 35 cmpdi2 \ 36 cmpti2 \ 37 comparedf2 \ 38 comparesf2 \ 39 ctzdi2 \ 40 ctzsi2 \ 41 ctzti2 \ 42 divdc3 \ 43 divdi3 \ 44 divmoddi4 \ 45 divmodsi4 \ 46 divsc3 \ 47 divti3 \ 48 divxc3 \ 49 enable_execute_stack \ 50 eprintf \ 51 ffsdi2 \ 52 ffsti2 \ 53 fixdfdi \ 54 fixdfti \ 55 fixsfdi \ 56 fixsfti \ 57 fixunsdfdi \ 58 fixunsdfsi \ 59 fixunsdfti \ 60 fixunssfdi \ 61 fixunssfsi \ 62 fixunssfti \ 63 fixunsxfdi \ 64 fixunsxfsi \ 65 fixunsxfti \ 66 fixxfdi \ 67 fixxfti \ 68 floatdidf \ 69 floatdisf \ 70 floatdixf \ 71 floattidf \ 72 floattisf \ 73 floattixf \ 74 floatundidf \ 75 floatundisf \ 76 floatundixf \ 77 floatunsidf \ 78 floatunsisf \ 79 floatuntidf \ 80 floatuntisf \ 81 floatuntixf \ 82 lshrdi3 \ 83 lshrti3 \ 84 moddi3 \ 85 modti3 \ 86 muldc3 \ 87 muldi3 \ 88 mulsc3 \ 89 multi3 \ 90 mulvdi3 \ 91 mulvsi3 \ 92 mulvti3 \ 93 mulxc3 \ 94 negdf2 \ 95 negdi2 \ 96 negsf2 \ 97 negti2 \ 98 negvdi2 \ 99 negvsi2 \ 100 negvti2 \ 101 paritydi2 \ 102 paritysi2 \ 103 parityti2 \ 104 popcountdi2 \ 105 popcountsi2 \ 106 popcountti2 \ 107 powidf2 \ 108 powisf2 \ 109 powitf2 \ 110 powixf2 \ 111 subvdi3 \ 112 subvsi3 \ 113 subvti3 \ 114 trampoline_setup \ 115 ucmpdi2 \ 116 ucmpti2 \ 117 udivdi3 \ 118 udivmoddi4 \ 119 udivmodsi4 \ 120 udivmodti4 \ 121 udivti3 \ 122 umoddi3 \ 123 umodti3 124 125# These are already shipped by libc.a on arm and mips 126.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" 127SRCF+= adddf3 \ 128 addsf3 \ 129 divdf3 \ 130 divsf3 \ 131 divsi3 \ 132 extendsfdf2 \ 133 fixdfsi \ 134 fixsfsi \ 135 floatsidf \ 136 floatsisf \ 137 modsi3 \ 138 muldf3 \ 139 mulsf3 \ 140 subdf3 \ 141 subsf3 \ 142 truncdfsf2 \ 143 udivsi3 \ 144 umodsi3 145.endif 146 147.for file in ${SRCF} 148. if ${MACHINE_CPUARCH} != "arm" && exists(${CRTSRC}/${CRTARCH}/${file}.S) 149SRCS+= ${file}.S 150. else 151SRCS+= ${file}.c 152. endif 153.endfor 154 155.if ${MACHINE_CPUARCH} != "sparc64" && ${MACHINE_CPUARCH} != "mips" 156. if ${MK_INSTALLLIB} != "no" 157SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a 158. endif 159. if ${MK_PROFILE} != "no" 160SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a 161. endif 162.endif 163 164.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ 165 ${MACHINE_CPUARCH} == "powerpc" 166AFLAGS+=--noexecstack 167ACFLAGS+=-Wa,--noexecstack 168.endif 169 170 171.include <bsd.lib.mk> 172