Home | History | Annotate | Download | only in Softfloat
      1 #	$NetBSD: Makefile.inc,v 1.17 2014/01/30 19:11:54 matt Exp $
      2 
      3 SOFTFLOAT_BITS?=64
      4 .PATH:		${ARCHDIR}/softfloat \
      5 		${.CURDIR}/softfloat/bits${SOFTFLOAT_BITS} ${.CURDIR}/softfloat
      6 
      7 CPPFLAGS+=	-I${ARCHDIR}/softfloat -I${.CURDIR}/softfloat
      8 CPPFLAGS+=	-DSOFTFLOAT_FOR_GCC
      9 
     10 SRCS.softfloat= softfloat.c
     11 
     12 SRCS.softfloat+=fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \
     13 		fpgetsticky.c fpsetsticky.c
     14 
     15 .if !empty(LIBC_MACHINE_ARCH:Mearm*)
     16 SRCS.softfloat+=__aeabi_dcmpeq.c __aeabi_fcmpeq.c
     17 SRCS.softfloat+=__aeabi_dcmpge.c __aeabi_fcmpge.c
     18 SRCS.softfloat+=__aeabi_dcmpgt.c __aeabi_fcmpgt.c
     19 SRCS.softfloat+=__aeabi_dcmple.c __aeabi_fcmple.c
     20 SRCS.softfloat+=__aeabi_dcmplt.c __aeabi_fcmplt.c
     21 SRCS.softfloat+=__aeabi_dcmpun.c __aeabi_fcmpun.c
     22 .else
     23 SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \
     24 		eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \
     25 		eqtf2.c netf2.c gttf2.c getf2.c lttf2.c letf2.c negtf2.c \
     26 		nexf2.c gtxf2.c gexf2.c negxf2.c \
     27 		unordsf2.c unorddf2.c unordtf2.c
     28 .endif
     29 
     30 SRCS+=		${SRCS.softfloat}
     31 
     32 # XXX
     33 .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45
     34 .if (${MACHINE_CPU} == "arm")
     35 # See doc/HACKS for more information.
     36 COPTS.softfloat.c+=	-Wno-enum-compare
     37 COPTS.softfloat.c+=	${${ACTIVE_CXX} == "gcc":? -fno-tree-vrp :}
     38 .elif (${MACHINE_CPU} == "mips" || \
     39      ${MACHINE_CPU} == "sh3")
     40 COPTS.softfloat.c+=	-Wno-enum-compare
     41 .endif
     42 .endif
     43