Home | History | Annotate | Line # | Download | only in compiler_rt
Makefile.inc revision 1.13
      1 # $NetBSD: Makefile.inc,v 1.13 2014/01/18 21:27:11 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 .PATH: ${COMPILER_RT_CPU_DIR}
     14 .PATH: ${COMPILER_RT_ARCH_DIR}
     15 .PATH: ${COMPILER_RT_SRCDIR}/lib
     16 .PATH: ${COMPILER_RT_SRCDIR}/lib/profile
     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 .if ${HAVE_LLVM:Uno} == "yes"
     27 # Requires C11 support
     28 GENERIC_SRCS+= atomic.c
     29 .endif
     30 
     31 .if ${HAVE_LIBGCC_EH} == "no"
     32 GENERIC_SRCS+= \
     33 	gcc_personality_v0.c
     34 .endif
     35 
     36 .if 0
     37 # Conflicts with soft-float
     38 GENERIC_SRCS+= \
     39 	comparedf2.c \
     40 	comparesf2.c \
     41 	adddf3.c \
     42 	addsf3.c \
     43 	divdf3.c \
     44 	divsf3.c \
     45 	extendsfdf2.c \
     46 	fixdfsi.c \
     47 	fixdfti.c \
     48 	fixsfsi.c \
     49 	fixsfti.c \
     50 	floatsidf.c \
     51 	floatsisf.c \
     52 	floatunsidf.c \
     53 	floatunsisf.c \
     54 	muldf3.c \
     55 	mulsf3.c \
     56 	subdf3.c \
     57 	subsf3.c \
     58 	truncdfsf2.c
     59 .endif
     60 
     61 GENERIC_SRCS+= \
     62 	absvsi2.c \
     63 	absvti2.c \
     64 	addvsi3.c \
     65 	addvti3.c \
     66 	ashlti3.c \
     67 	ashrti3.c \
     68 	clzsi2.c \
     69 	clzti2.c \
     70 	cmpti2.c \
     71 	ctzsi2.c \
     72 	ctzti2.c \
     73 	divmodsi4.c \
     74 	divsi3.c \
     75 	divti3.c \
     76 	ffsti2.c \
     77 	fixsfdi.c \
     78 	fixdfdi.c \
     79 	fixunsdfdi.c \
     80 	fixunsdfsi.c \
     81 	fixunsdfti.c \
     82 	fixunssfdi.c \
     83 	fixunssfsi.c \
     84 	fixunssfti.c \
     85 	fixunsxfdi.c \
     86 	fixunsxfsi.c \
     87 	fixunsxfti.c \
     88 	fixxfdi.c \
     89 	fixxfti.c \
     90 	floatdidf.c \
     91 	floatdisf.c \
     92 	floatdixf.c \
     93 	floattidf.c \
     94 	floattisf.c \
     95 	floattixf.c \
     96 	floatundidf.c \
     97 	floatundisf.c \
     98 	floatundixf.c \
     99 	floatuntidf.c \
    100 	floatuntisf.c \
    101 	floatuntixf.c \
    102 	int_util.c \
    103 	lshrti3.c \
    104 	modsi3.c \
    105 	modti3.c \
    106 	muldc3.c \
    107 	mulosi4.c \
    108 	muloti4.c \
    109 	multi3.c \
    110 	mulvsi3.c \
    111 	mulvti3.c \
    112 	negdf2.c \
    113 	negsf2.c \
    114 	negti2.c \
    115 	negvsi2.c \
    116 	negvti2.c \
    117 	paritysi2.c \
    118 	parityti2.c \
    119 	popcountsi2.c \
    120 	popcountti2.c \
    121 	powidf2.c \
    122 	powisf2.c \
    123 	powitf2.c \
    124 	powixf2.c \
    125 	subvsi3.c \
    126 	subvti3.c \
    127 	ucmpti2.c \
    128 	udivmodsi4.c \
    129 	udivmodti4.c \
    130 	udivsi3.c \
    131 	udivti3.c \
    132 	umodsi3.c \
    133 	umodti3.c
    134 
    135 GENERIC_SRCS+= \
    136 	absvdi2.c \
    137 	addvdi3.c \
    138 	clzdi2.c \
    139 	ctzdi2.c \
    140 	ffsdi2.c \
    141 	mulodi4.c \
    142 	mulvdi3.c \
    143 	negvdi2.c \
    144 	paritydi2.c \
    145 	popcountdi2.c \
    146 	subvdi3.c
    147 
    148 .if empty(LIBC_MACHINE_ARCH:M*64*) && ${LIBC_MACHINE_ARCH} != "alpha"
    149 GENERIC_SRCS+= \
    150 	cmpdi2.c \
    151 	ashldi3.c \
    152 	ashrdi3.c \
    153 	divdi3.c \
    154 	divmoddi4.c \
    155 	lshrdi3.c \
    156 	moddi3.c \
    157 	muldi3.c \
    158 	negdi2.c \
    159 	ucmpdi2.c \
    160 	udivdi3.c \
    161 	udivmoddi4.c \
    162 	umoddi3.c
    163 .endif
    164 
    165 GENERIC_SRCS+= \
    166 	GCDAProfiling.c \
    167 	PGOProfiling.c
    168 
    169 .if ${HAVE_LIBGCC} == "no"
    170 .if ${MACHINE_ARCH} == "powerpc"
    171 GENERIC_SRCS+= \
    172 	fixtfdi.c \
    173 	fixunstfdi.c \
    174 	floatditf.c \
    175 	floatunditf.c \
    176 	gcc_qadd.c \
    177 	gcc_qdiv.c \
    178 	gcc_qmul.c \
    179 	gcc_qsub.c
    180 .endif
    181 .endif
    182 
    183 .if ${MACHINE_CPU} == "arm"
    184 .if !empty(LIBC_MACHINE_ARCH:Mearm*)
    185 GENERIC_SRCS+= \
    186 	aeabi_idivmod.S \
    187 	aeabi_ldivmod.S \
    188 	aeabi_uidivmod.S \
    189 	aeabi_uldivmod.S
    190 .endif
    191 GENERIC_SRCS+= \
    192 	clear_cache.c
    193 # Not yet, overlaps with softfloat
    194 #	aeabi_dcmp.S \
    195 #	aeabi_fcmp.S
    196 # Not yet, requires ARMv6
    197 #GENERIC_SRCS+= \
    198 #	bswapdi2.S \
    199 #	bswapsi2.S
    200 .endif
    201 
    202 .for src in ${GENERIC_SRCS}
    203 .  if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
    204       exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S)
    205 SRCS+=	${src:R}.S
    206 .  else
    207 SRCS+=	${src}
    208 COPTS.${src}+=	-Wno-missing-prototypes \
    209 		-Wno-old-style-definition \
    210 		-Wno-strict-prototypes \
    211 		-Wno-uninitialized
    212 .  endif
    213 .endfor
    214