Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2017 21:01:25 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432389 - in head/math: . opensolaris-libm
Message-ID:  <201701242101.v0OL1PlF018941@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Tue Jan 24 21:01:25 2017
New Revision: 432389
URL: https://svnweb.freebsd.org/changeset/ports/432389

Log:
  Add new port math/opensolaris-libm
  
  In 2006, Sun Microsystems released math and vector math libraries as
  part of their effort to open-source Solaris:
  
  libmvec - vector math library
    This library contains function to evaluate common mathematical functions
    for several arguments at once. The argument values are specified by one
    or more vectors (arrays) of data, and the corresponding result values
    are stored in another vector.
  
  libm - C99 math library
    Functions  in  this  library provide common elementary mathematical
    functions and floating point environment routines defined by System V,
    ANSI C, POSIX, and so on.  Additional functions in this library provide
    extended support for handling floating point exceptions.
  
  The original source has been modified to build on FreeBSD and DragonFly
  using GCC or clang and the GNU assembler.  All fixes introduced by Nexenta
  and Illumos projects have also been incorporated.  Missing x86_64 variants
  of lrint and lround have added.  The floating-point exception logging
  including address->symbol tranlation has also been implemented.

Added:
  head/math/opensolaris-libm/
  head/math/opensolaris-libm/Makefile   (contents, props changed)
  head/math/opensolaris-libm/distinfo   (contents, props changed)
  head/math/opensolaris-libm/pkg-descr   (contents, props changed)
  head/math/opensolaris-libm/pkg-plist   (contents, props changed)
Modified:
  head/math/Makefile

Modified: head/math/Makefile
==============================================================================
--- head/math/Makefile	Tue Jan 24 20:51:10 2017	(r432388)
+++ head/math/Makefile	Tue Jan 24 21:01:25 2017	(r432389)
@@ -401,6 +401,7 @@
     SUBDIR += openblas
     SUBDIR += openfst
     SUBDIR += openlibm
+    SUBDIR += opensolaris-libm
     SUBDIR += orpie
     SUBDIR += p5-AI-DecisionTree
     SUBDIR += p5-AI-Genetic

Added: head/math/opensolaris-libm/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/opensolaris-libm/Makefile	Tue Jan 24 21:01:25 2017	(r432389)
@@ -0,0 +1,64 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	opensolaris-libm
+PORTVERSION=	2006.01.31
+DISTVERSIONPREFIX=	v
+CATEGORIES=	math
+
+MAINTAINER=	marino@FreeBSD.org
+COMMENT=	C99 Math and vector libraries from OpenSolaris snv_33
+
+LICENSE=	CDDL
+LICENSE_FILE=	${WRKSRC}/usr/src/OPENSOLARIS.LICENSE
+
+ONLY_FOR_ARCHS=	amd64	# i386 and sparc possible with much work
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	jrmarino
+GH_TAGNAME=	2017.01.24
+
+BUILD_WRKSRC=	${WRKSRC}/usr/src/libm/wos64
+INSTALL_WRKSRC=	${WRKSRC}/usr/src/libm/wos64
+MAKEFILE=	Makefile.bsd
+MAKE_ENV=	ARCH=${ARCH} USE_ASSEMBLY_VERSIONS=yes
+
+# On FreeBSD 11+, libm will build on base clang.  Using OpenLibm testsuite,
+# all float tests pass on both clang and gcc.  On the "double" tests, all
+# tests pass when built by gcc save 4 gamma tests off by 1e-16, also seen
+# on Illumos.  However, on Clang and gcc with -fno-builtin set, 27 other
+# tests fail with results off by values ranging from e-17 to e-14.  All of
+# these extremely slightly inaccurate results seem to be caused by the j0
+# Bessel function implementation.  Fix that and likely all 27 tests
+# involving j0, j1, jn, y0, y1, yn pass.
+
+# On FreeBSD 10, the base clang (v3.4) cannot even build libm without emitting
+# Internal Compiler Errors, so GCC is required and does not appear as an
+# option.  Similarly, the GCC option does not appear on DragonFly as the
+# base compiler is already GCC.  Programs compiled with GCC that link to
+# these libraries require that the libraries are compiled with GCC for
+# proper functioning.
+
+OPTIONS_DEFINE=			GCC
+OPTIONS_EXCLUDE_FreeBSD_10=	GCC
+OPTIONS_EXCLUDE_DragonFly=	GCC
+
+GCC_USE=	GCC=yes
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD
+. if ${OSREL:R} < 11
+USE_GCC=	yes
+. endif
+
+RUN_DEPENDS=	${LOCALBASE}/bin/addr2line:devel/binutils
+
+post-patch:
+	# The addr2line program in FreeBSD is inadequate, so pull in
+	# binutils on FreeBSD
+	@${REINPLACE_CMD} -e 's|/usr/bin|/usr/local/bin|' \
+		${WRKSRC}/usr/src/libm/src/m9x/__traceback.c
+.endif
+
+.include <bsd.port.mk>

Added: head/math/opensolaris-libm/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/opensolaris-libm/distinfo	Tue Jan 24 21:01:25 2017	(r432389)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1485190474
+SHA256 (jrmarino-opensolaris-libm-v2006.01.31-2017.01.24_GH0.tar.gz) = c063cbc7db749b7c87455964dfa6ead7808108f9c991cede192f2ee108fced80
+SIZE (jrmarino-opensolaris-libm-v2006.01.31-2017.01.24_GH0.tar.gz) = 985294

Added: head/math/opensolaris-libm/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/opensolaris-libm/pkg-descr	Tue Jan 24 21:01:25 2017	(r432389)
@@ -0,0 +1,22 @@
+In 2006, Sun Microsystems released math and vector math libraries as
+part of their effort to open-source Solaris:
+
+libmvec - vector math library
+  This library contains function to evaluate common mathematical functions
+  for several arguments at once. The argument values are specified by one
+  or more vectors (arrays) of data, and the corresponding result values
+  are stored in another vector.
+
+libm - C99 math library
+  Functions  in  this  library provide common elementary mathematical
+  functions and floating point environment routines defined by System V,
+  ANSI C, POSIX, and so on.  Additional functions in this library provide
+  extended support for handling floating point exceptions.
+
+The original source has been modified to build on FreeBSD and DragonFly
+using GCC or clang and the GNU assembler.  All fixes introduced by Nexenta
+and Illumos projects have also been incorporated.  Missing x86_64 variants
+of lrint and lround have added.  The floating-point exception logging
+including address->symbol tranlation has also been implemented.
+
+WWW: https://docs.oracle.com/cd/E19422-01/819-3693/ncg_lib.html

Added: head/math/opensolaris-libm/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/opensolaris-libm/pkg-plist	Tue Jan 24 21:01:25 2017	(r432389)
@@ -0,0 +1,15 @@
+include/opensolaris-libm/complex.h
+include/opensolaris-libm/fenv.h
+include/opensolaris-libm/floatingpoint.h
+include/opensolaris-libm/iso/math_c99.h
+include/opensolaris-libm/iso/math_iso.h
+include/opensolaris-libm/math.h
+include/opensolaris-libm/sys/feature_tests.h
+include/opensolaris-libm/sys/ieeefp.h
+include/opensolaris-libm/tgmath.h
+lib/opensolaris/libm.a
+lib/opensolaris/libm.so
+lib/opensolaris/libm.so.2
+lib/opensolaris/libmvec.a
+lib/opensolaris/libmvec.so
+lib/opensolaris/libmvec.so.1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701242101.v0OL1PlF018941>