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