Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 2019 18:07:29 +0000 (UTC)
From:      Johannes M Dieterich <jmd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r515064 - in head/math/libpgmath: . files
Message-ID:  <201910201807.x9KI7T1w015534@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmd
Date: Sun Oct 20 18:07:29 2019
New Revision: 515064
URL: https://svnweb.freebsd.org/changeset/ports/515064

Log:
  math/libpgmath: update to latest snapshot
  
  Bump LLVM requirement to devel/llvm70. Unify handling in port.

Added:
  head/math/libpgmath/files/patch-CMakeLists.txt   (contents, props changed)
  head/math/libpgmath/files/patch-lib_common_pgstdinit.h   (contents, props changed)
  head/math/libpgmath/files/patch-lib_x86__64_libm__inlines__amd.h   (contents, props changed)
Deleted:
  head/math/libpgmath/files/patch-lib_common_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_acos_fma3_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_asin_fma3_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_cos_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_exp_fma3_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_log_fma3_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_pow_fma3_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_powi_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_sin_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_sincos_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_x86__64_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_x86__64_fast_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_x86__64_libm__amd.h
Modified:
  head/math/libpgmath/Makefile
  head/math/libpgmath/distinfo
  head/math/libpgmath/files/patch-lib_CMakeLists.txt
  head/math/libpgmath/files/patch-lib_common_dispatch.c

Modified: head/math/libpgmath/Makefile
==============================================================================
--- head/math/libpgmath/Makefile	Sun Oct 20 17:22:47 2019	(r515063)
+++ head/math/libpgmath/Makefile	Sun Oct 20 18:07:29 2019	(r515064)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	libpgmath
-DISTVERSION=	g20180904
-PORTREVISION=	3
+DISTVERSION=	g20191020
 CATEGORIES=	math
 
 MAINTAINER=	jmd@FreeBSD.org
@@ -14,8 +13,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 ONLY_FOR_ARCHS=	amd64
 
-BUILD_DEPENDS=	llvm60>=0:devel/llvm60
-RUN_DEPENDS=	llvm60>=0:devel/llvm60
+LLVM_VER=	70
+BUILD_DEPENDS=	llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER}
+RUN_DEPENDS=	llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER}
 
 USES=		cmake
 USE_LDCONFIG=	yes
@@ -23,12 +23,12 @@ USE_LDCONFIG=	yes
 USE_GITHUB=	yes
 GH_ACCOUNT=	flang-compiler
 GH_PROJECT=	flang
-GH_TAGNAME=	53e368b
+GH_TAGNAME=	d07daf3
 
-CC=		${LOCALBASE}/llvm60/bin/clang
-CXX=		${LOCALBASE}/llvm60/bin/clang++
+CC=		${LOCALBASE}/llvm${LLVM_VER}/bin/clang
+CXX=		${LOCALBASE}/llvm${LLVM_VER}/bin/clang++
 
-CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config60
+CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VER} -DLIBPGMATH_LLVM_LIT_EXECUTABLE=${LOCALBASE}/llvm${LLVM_VER}/bin/llvm-lit
 
 WRKSRC_SUBDIR=	runtime/libpgmath
 

Modified: head/math/libpgmath/distinfo
==============================================================================
--- head/math/libpgmath/distinfo	Sun Oct 20 17:22:47 2019	(r515063)
+++ head/math/libpgmath/distinfo	Sun Oct 20 18:07:29 2019	(r515064)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1536097093
-SHA256 (flang-compiler-flang-g20180904-53e368b_GH0.tar.gz) = e9cf2589c6cbad3ec953f4622ee60f7746c6921518d6905aef0526705d83c888
-SIZE (flang-compiler-flang-g20180904-53e368b_GH0.tar.gz) = 4603486
+TIMESTAMP = 1571582029
+SHA256 (flang-compiler-flang-g20191020-d07daf3_GH0.tar.gz) = 24c54eaad89d1bc3a30fd50b5cd4aa5a563ef8377157c246781681297e19a893
+SIZE (flang-compiler-flang-g20191020-d07daf3_GH0.tar.gz) = 133245436

Added: head/math/libpgmath/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/libpgmath/files/patch-CMakeLists.txt	Sun Oct 20 18:07:29 2019	(r515064)
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2019-10-20 14:17:43 UTC
++++ CMakeLists.txt
+@@ -52,7 +52,7 @@ if (LIBPGMATH_STANDALONE_BUILD)
+ endif()
+ 
+ set(LIBPGMATH_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
+-if ("${LIBPGMATH_SYSTEM_NAME}" STREQUAL "OpenBSD")
++if ("${LIBPGMATH_SYSTEM_NAME}" STREQUAL "OpenBSD" OR "${LIBPGMATH_SYSTEM_NAME}" STREQUAL "FreeBSD")
+   set(LIBPGMATH_SYSTEM_NAME "Linux")
+ endif ()
+ 

Modified: head/math/libpgmath/files/patch-lib_CMakeLists.txt
==============================================================================
--- head/math/libpgmath/files/patch-lib_CMakeLists.txt	Sun Oct 20 17:22:47 2019	(r515063)
+++ head/math/libpgmath/files/patch-lib_CMakeLists.txt	Sun Oct 20 18:07:29 2019	(r515064)
@@ -1,48 +1,25 @@
---- lib/CMakeLists.txt.orig	2018-09-03 06:03:48 UTC
+--- lib/CMakeLists.txt.orig	2019-10-20 13:54:36 UTC
 +++ lib/CMakeLists.txt
-@@ -16,19 +16,23 @@
+@@ -15,6 +15,11 @@
+ #
  
- # This value will be the same as CMAKE_SYSTEM_PROCESSOR
- set(PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
--if(${LIBPGMATH_WITH_GENERIC} OR (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|aarch64"))
-+if(${LIBPGMATH_WITH_GENERIC} OR (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|amd64|aarch64"))
+ # This value will be the same as LIBPGMATH_SYSTEM_PROCESSOR
++
++if ("${LIBPGMATH_SYSTEM_PROCESSOR}" STREQUAL "amd64")
++    set(LIBPGMATH_SYSTEM_PROCESSOR "x86_64")
++endif ()
++
+ set(PROCESSOR ${LIBPGMATH_SYSTEM_PROCESSOR})
+ if(${LIBPGMATH_WITH_GENERIC} OR (NOT ${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64|aarch64"))
    set(PROCESSOR "generic")
- endif()
+@@ -23,6 +28,10 @@ endif()
+ find_program(SH_PROGRAM NAMES sh bash)
  
-+if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND ${PROCESSOR} MATCHES "amd64")
-+  set(PROCESSOR "x86_64")
-+endif()
-+
  set_property(GLOBAL APPEND PROPERTY "TARGET_OBJECTS")
++
++if ("${LIBPGMATH_SYSTEM_NAME}" STREQUAL "FreeBSD")
++    set(LIBPGMATH_SYSTEM_NAME "Linux")
++endif ()
  
--if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64" AND NOT ${LIBPGMATH_WITH_GENERIC})
--  if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-+if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64|amd64" AND NOT ${LIBPGMATH_WITH_GENERIC})
-+  if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD")
- 
-     set(DEFINITIONS_L1
-       HOST_LINUX LINUX LINUX86 LINUX8664 MAXCPUS=256 MAXCPUSL=8 MAXCPUSR=8
-       TARGET_LINUX TARGET_LINUX_X86 TARGET_LINUX_X8664 TARGET_X86 TARGET_X8664
--      __gnu_linux__ PG_PIC)
-+      __gnu_linux__ linux PG_PIC)
-     set(FLAGS_L1 "-m64 -O3 ")
- 
-     set(DEFINITIONS_L2
-@@ -210,7 +214,7 @@ else()
- endif()
- 
- include_directories(common)
--if(${PROCESSOR} MATCHES "x86_64|AMD64" AND NOT ${LIBPGMATH_WITH_GENERIC})
-+if(${PROCESSOR} MATCHES "x86_64|AMD64|amd64" AND NOT ${LIBPGMATH_WITH_GENERIC})
-   include_directories(x86_64)
- # elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
- #   include_directories(ppc64le)
-@@ -223,7 +227,7 @@ endif()
- 
- # Add directories to build
- add_subdirectory(common)
--if(${PROCESSOR} MATCHES "x86_64|AMD64" AND NOT ${LIBPGMATH_WITH_GENERIC})
-+if(${PROCESSOR} MATCHES "x86_64|AMD64|amd64" AND NOT ${LIBPGMATH_WITH_GENERIC})
-   add_subdirectory(x86_64)
- # elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
- #   add_subdirectory(ppc64le)
+ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND NOT ${LIBPGMATH_WITH_GENERIC})
+   if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")

Modified: head/math/libpgmath/files/patch-lib_common_dispatch.c
==============================================================================
--- head/math/libpgmath/files/patch-lib_common_dispatch.c	Sun Oct 20 17:22:47 2019	(r515063)
+++ head/math/libpgmath/files/patch-lib_common_dispatch.c	Sun Oct 20 18:07:29 2019	(r515064)
@@ -1,14 +1,14 @@
---- lib/common/dispatch.c.orig	2018-09-04 21:58:51 UTC
+--- lib/common/dispatch.c.orig	2019-10-20 14:21:37 UTC
 +++ lib/common/dispatch.c
-@@ -62,11 +62,7 @@
- #include <time.h>
- #include <unistd.h>
- #include <inttypes.h>
--#ifdef TARGET_LINUX_X8664
+@@ -95,11 +95,7 @@
+ 
+ #endif      // #ifndef _WIN64
+ 
+-#if defined(TARGET_LINUX_X8664) || defined(TARGET_LINUX_POWER) || defined(TARGET_WIN_X8664)
 -#include <malloc.h>
 -#else
  #include <sched.h>
 -#endif
+ 
+ 
  #include "mth_tbldefs.h"
- #if defined(TARGET_LINUX_X8664) || defined(TARGET_OSX_X8664)
- #include "cpuid8664.h"

Added: head/math/libpgmath/files/patch-lib_common_pgstdinit.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/libpgmath/files/patch-lib_common_pgstdinit.h	Sun Oct 20 18:07:29 2019	(r515064)
@@ -0,0 +1,11 @@
+--- lib/common/pgstdinit.h.orig	2019-10-20 14:27:37 UTC
++++ lib/common/pgstdinit.h
+@@ -36,7 +36,7 @@ typedef unsigned long long size_t;
+ #define _SIZE_T__
+ #define _SIZE_T_DEFINED
+ #define __SIZE_T__
+-#if defined(LINUX8664) || defined(TARGET_OSX_X8664) || defined(TARGET_LLVM_64)
++#if defined(LINUX8664) || defined(TARGET_OSX_X8664) || defined(TARGET_LLVM_64) || defined(__FreeBSD__)
+ typedef unsigned long size_t;
+ #else
+ typedef unsigned size_t;

Added: head/math/libpgmath/files/patch-lib_x86__64_libm__inlines__amd.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/libpgmath/files/patch-lib_x86__64_libm__inlines__amd.h	Sun Oct 20 18:07:29 2019	(r515064)
@@ -0,0 +1,11 @@
+--- lib/x86_64/libm_inlines_amd.h.orig	2019-10-20 13:59:45 UTC
++++ lib/x86_64/libm_inlines_amd.h
+@@ -283,7 +283,7 @@ raise_fpsw_flags(int flags)
+ {
+ #if defined(DONOTDEFINE_WINDOWS)
+   _mm_setcsr(_mm_getcsr() | flags);
+-#elif defined(linux)
++#elif defined(linux) || defined(__FreeBSD__)
+   unsigned int cw;
+   /* Get the current floating-point control/status word */
+   asm volatile("STMXCSR %0" : "=m"(cw));



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