Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm Hook complex operation support into libm when not u...



details:   https://anonhg.NetBSD.org/src/rev/47918e58189f
branches:  trunk
changeset: 790514:47918e58189f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Oct 15 23:59:36 2013 +0000

description:
Hook complex operation support into libm when not using libgcc.

diffstat:

 lib/libm/Makefile                 |   7 ++++++-
 lib/libm/compiler_rt/Makefile.inc |  33 +++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletions(-)

diffs (57 lines):

diff -r 2f4eb2a6105b -r 47918e58189f lib/libm/Makefile
--- a/lib/libm/Makefile Tue Oct 15 22:15:17 2013 +0000
+++ b/lib/libm/Makefile Tue Oct 15 23:59:36 2013 +0000
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.142 2013/09/21 22:28:12 joerg Exp $
+#  $NetBSD: Makefile,v 1.143 2013/10/15 23:59:36 joerg Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -324,5 +324,10 @@
 COPTS.compat_cabsf.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
 
 .include "${.CURDIR}/gen/Makefile.inc"
+
+.if ${HAVE_LIBGCC} == "no"
+.include "${.CURDIR}/compiler_rt/Makefile.inc"
+.endif
+
 .include <bsd.lib.mk>
 .include <bsd.subdir.mk>
diff -r 2f4eb2a6105b -r 47918e58189f lib/libm/compiler_rt/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/compiler_rt/Makefile.inc Tue Oct 15 23:59:36 2013 +0000
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/10/15 23:59:36 joerg Exp $
+
+COMPILER_RT_SRCDIR=    ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
+
+.if ${MACHINE_ARCH} == "powerpc"
+COMPILER_RT_CPU_DIR=   ${COMPILER_RT_SRCDIR}/lib/ppc
+COMPILER_RT_ARCH_DIR=  ${COMPILER_RT_SRCDIR}/lib/ppc
+.else
+COMPILER_RT_CPU_DIR=   ${COMPILER_RT_SRCDIR}/lib/${MACHINE_CPU}
+COMPILER_RT_ARCH_DIR=  ${COMPILER_RT_SRCDIR}/lib/${MACHINE_ARCH}
+.endif
+
+.PATH: ${COMPILER_RT_CPU_DIR}
+.PATH: ${COMPILER_RT_ARCH_DIR}
+.PATH: ${COMPILER_RT_SRCDIR}/lib
+
+# Needs scaling support
+GENERIC_SRCS+= \
+       mulxc3.c \
+       mulsc3.c \
+       divxc3.c \
+       divdc3.c \
+       divsc3.c
+
+.for src in ${GENERIC_SRCS}
+.  if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
+      exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S)
+SRCS+= ${src:R}.S
+.  else
+SRCS+= ${src}
+COPTS.${src}+= -Wno-error=missing-prototypes
+.  endif
+.endfor



Home | Main Index | Thread Index | Old Index