Home | History | Annotate | Line # | Download | only in libkern
Makefile.compiler-rt revision 1.9.4.1
      1  1.9.4.1   martin # $NetBSD: Makefile.compiler-rt,v 1.9.4.1 2021/08/08 10:11:39 martin Exp $
      2      1.1    joerg 
      3  1.9.4.1   martin COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
      4  1.9.4.1   martin COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
      5      1.1    joerg 
      6      1.1    joerg .if ${MACHINE_ARCH} == "powerpc"
      7      1.4    joerg COMPILER_RT_CPU_DIR=	${COMPILER_RT_SRCDIR}/lib/builtins/ppc
      8      1.4    joerg COMPILER_RT_ARCH_DIR=	${COMPILER_RT_SRCDIR}/lib/builtins/ppc
      9      1.1    joerg .else
     10      1.4    joerg COMPILER_RT_CPU_DIR=	${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_CPU}
     11      1.4    joerg COMPILER_RT_ARCH_DIR=	${COMPILER_RT_SRCDIR}/lib/builtins/${MACHINE_ARCH}
     12      1.1    joerg .endif
     13      1.1    joerg 
     14      1.1    joerg .PATH: ${COMPILER_RT_CPU_DIR}
     15      1.1    joerg .PATH: ${COMPILER_RT_ARCH_DIR}
     16      1.4    joerg .PATH: ${COMPILER_RT_SRCDIR}/lib/builtins
     17      1.1    joerg 
     18      1.1    joerg GENERIC_SRCS+= \
     19      1.1    joerg 	absvdi2.c \
     20      1.1    joerg 	absvsi2.c \
     21      1.1    joerg 	absvti2.c \
     22      1.1    joerg 	addvdi3.c \
     23      1.1    joerg 	addvsi3.c \
     24      1.1    joerg 	addvti3.c \
     25      1.1    joerg 	ashlti3.c \
     26      1.1    joerg 	ashrti3.c \
     27      1.1    joerg 	clzti2.c \
     28      1.1    joerg 	cmpti2.c \
     29      1.1    joerg 	ctzti2.c \
     30      1.1    joerg 	divti3.c \
     31      1.1    joerg 	ffsti2.c \
     32      1.1    joerg 	int_util.c \
     33      1.1    joerg 	lshrti3.c \
     34      1.1    joerg 	modti3.c \
     35      1.1    joerg 	mulodi4.c \
     36      1.1    joerg 	mulosi4.c \
     37      1.1    joerg 	muloti4.c \
     38      1.1    joerg 	multi3.c \
     39      1.1    joerg 	mulvdi3.c \
     40      1.1    joerg 	mulvsi3.c \
     41      1.1    joerg 	mulvti3.c \
     42      1.1    joerg 	negti2.c \
     43      1.1    joerg 	negvdi2.c \
     44      1.1    joerg 	negvsi2.c \
     45      1.1    joerg 	negvti2.c \
     46      1.1    joerg 	paritydi2.c \
     47      1.1    joerg 	paritysi2.c \
     48      1.1    joerg 	parityti2.c \
     49      1.1    joerg 	popcountdi2.c \
     50      1.1    joerg 	popcountsi2.c \
     51      1.1    joerg 	popcountti2.c \
     52      1.1    joerg 	subvdi3.c \
     53      1.1    joerg 	subvsi3.c \
     54      1.1    joerg 	subvti3.c \
     55      1.1    joerg 	ucmpti2.c \
     56      1.1    joerg 	udivmodti4.c \
     57      1.1    joerg 	udivti3.c \
     58      1.1    joerg 	umodti3.c
     59      1.1    joerg 
     60      1.5     matt .if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha"
     61      1.5     matt GENERIC_SRCS+= \
     62      1.5     matt 	clzsi2.c \
     63      1.5     matt 	ctzsi2.c
     64      1.5     matt .endif
     65      1.5     matt 
     66      1.5     matt .if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha"
     67      1.5     matt GENERIC_SRCS+= \
     68      1.5     matt 	divmodsi4.c \
     69      1.5     matt 	divsi3.c \
     70      1.5     matt 	modsi3.c \
     71      1.5     matt 	udivmodsi4.c \
     72      1.5     matt 	udivsi3.c \
     73      1.5     matt 	umodsi3.c
     74      1.5     matt .endif
     75      1.5     matt 
     76      1.9  thorpej .if ${MACHINE_CPU} != "aarch64"
     77      1.5     matt GENERIC_SRCS+= \
     78      1.5     matt 	clzdi2.c \
     79      1.5     matt 	ctzdi2.c \
     80      1.5     matt 	ffsdi2.c
     81      1.5     matt .endif
     82      1.5     matt 
     83      1.5     matt .if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha"
     84      1.5     matt GENERIC_SRCS+= \
     85      1.5     matt 	ashldi3.c \
     86      1.5     matt 	ashrdi3.c \
     87      1.5     matt 	lshrdi3.c
     88      1.5     matt .endif
     89      1.5     matt 
     90      1.5     matt .if ${MACHINE_CPU} != "aarch64" && ${MACHINE} != "alpha"
     91      1.5     matt GENERIC_SRCS+= \
     92      1.5     matt 	cmpdi2.c \
     93      1.5     matt 	divdi3.c \
     94      1.5     matt 	divmoddi4.c \
     95      1.5     matt 	moddi3.c \
     96      1.5     matt 	muldi3.c \
     97      1.5     matt 	negdi2.c \
     98      1.5     matt 	ucmpdi2.c \
     99      1.5     matt 	udivdi3.c \
    100      1.5     matt 	udivmoddi4.c \
    101      1.5     matt 	umoddi3.c
    102      1.5     matt .endif
    103      1.5     matt 
    104      1.1    joerg .if ${MACHINE_CPU} == "arm"
    105      1.2    joerg .  if !empty(MACHINE_ARCH:Mearm*)
    106      1.1    joerg GENERIC_SRCS+= \
    107      1.1    joerg 	aeabi_idivmod.S \
    108      1.1    joerg 	aeabi_ldivmod.S \
    109      1.1    joerg 	aeabi_uidivmod.S \
    110      1.3    joerg 	aeabi_uldivmod.S \
    111      1.3    joerg 	__aeabi_idiv0.c \
    112      1.3    joerg 	__aeabi_ldiv0.c
    113      1.1    joerg .  endif
    114      1.1    joerg .endif
    115      1.1    joerg 
    116      1.1    joerg .for src in ${GENERIC_SRCS}
    117      1.1    joerg .  if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
    118      1.1    joerg       exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S)
    119      1.1    joerg SRCS+=	${src:R}.S
    120      1.1    joerg .  else
    121      1.1    joerg SRCS+=	${src}
    122      1.1    joerg COPTS.${src}+=	-Wno-missing-prototypes \
    123      1.1    joerg 		-Wno-old-style-definition \
    124      1.1    joerg 		-Wno-strict-prototypes \
    125      1.1    joerg 		-Wno-uninitialized
    126      1.1    joerg .  endif
    127      1.1    joerg .endfor
    128      1.1    joerg 
    129      1.1    joerg CPPFLAGS.int_util.c+=	-DKERNEL_USE
    130      1.6      mrg 
    131      1.6      mrg # XXX Explicit divide by zero in udivmoddi4.c -> abort().
    132      1.6      mrg .if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
    133      1.8      mrg . if ${MACHINE_CPU} != "arm"
    134      1.6      mrg COPTS.udivmoddi4.c+=	-fnon-call-exceptions
    135      1.8      mrg . endif
    136      1.6      mrg .endif
    137  1.9.4.1   martin 
    138  1.9.4.1   martin # XXX This makes no binary changes at the moment.
    139  1.9.4.1   martin .include "${COMPILER_RT_DIR}/abi.mk"
    140