Bring in the last 2 months of flang development; many build system patches
go away due to upstream accepting some of my patches. amd64 only right now; hoping to fix arm64 support soon
This commit is contained in:
parent
bc587ab77e
commit
24bfc39a36
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.22 2019/08/27 16:02:47 bcallah Exp $
|
||||
# $OpenBSD: Makefile,v 1.23 2019/11/10 16:50:31 bcallah Exp $
|
||||
|
||||
# If you are updating to a new version
|
||||
# (e.g. 8.0->8.1 or 9.0), you need to sync
|
||||
# patches with devel/llvm
|
||||
COMMENT = LLVM Fortran compiler driver
|
||||
DISTNAME = flang-driver-8.0.0.20190819
|
||||
DISTNAME = flang-driver-8.0.1.20190819
|
||||
|
||||
GH_PROJECT = flang-driver
|
||||
GH_COMMIT = ea411daaafc7ec5b85be1cd7857c0ceab42e54aa
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (flang-driver-8.0.0.20190819-ea411daa.tar.gz) = L5IQdweYYc4NtOtIkcLnj3Dp2q+UvDQbGwr52HzgdsE=
|
||||
SIZE (flang-driver-8.0.0.20190819-ea411daa.tar.gz) = 18124570
|
||||
SHA256 (flang-driver-8.0.1.20190819-ea411daa.tar.gz) = L5IQdweYYc4NtOtIkcLnj3Dp2q+UvDQbGwr52HzgdsE=
|
||||
SIZE (flang-driver-8.0.1.20190819-ea411daa.tar.gz) = 18124570
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-lib_Driver_ToolChains_OpenBSD_cpp,v 1.7 2019/08/05 18:31:02 bcallah Exp $
|
||||
$OpenBSD: patch-lib_Driver_ToolChains_OpenBSD_cpp,v 1.8 2019/11/10 16:50:31 bcallah Exp $
|
||||
|
||||
Index: lib/Driver/ToolChains/OpenBSD.cpp
|
||||
--- lib/Driver/ToolChains/OpenBSD.cpp.orig
|
||||
@ -12,7 +12,7 @@ Index: lib/Driver/ToolChains/OpenBSD.cpp
|
||||
#include "clang/Driver/Options.h"
|
||||
#include "clang/Driver/SanitizerArgs.h"
|
||||
#include "llvm/Option/ArgList.h"
|
||||
@@ -198,8 +200,22 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
|
||||
@@ -198,8 +200,23 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
|
||||
}
|
||||
// FIXME: For some reason GCC passes -lgcc before adding
|
||||
// the default system libraries. Just mimic this for now.
|
||||
@ -29,6 +29,7 @@ Index: lib/Driver/ToolChains/OpenBSD.cpp
|
||||
+ CmdArgs.push_back(Args.MakeArgString("-L/usr/lib"));
|
||||
+
|
||||
+ if (!Args.hasArg(options::OPT_noFlangLibs)) {
|
||||
+ CmdArgs.push_back("-lm");
|
||||
+ CmdArgs.push_back("-lpgmath");
|
||||
+ CmdArgs.push_back("-lflang");
|
||||
+ }
|
||||
@ -36,7 +37,7 @@ Index: lib/Driver/ToolChains/OpenBSD.cpp
|
||||
if (Args.hasArg(options::OPT_pthread)) {
|
||||
if (!Args.hasArg(options::OPT_shared) && Args.hasArg(options::OPT_pg))
|
||||
CmdArgs.push_back("-lpthread_p");
|
||||
@@ -214,7 +230,10 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
|
||||
@@ -214,7 +231,10 @@ void openbsd::Linker::ConstructJob(Compilation &C, con
|
||||
CmdArgs.push_back("-lc");
|
||||
}
|
||||
|
||||
@ -48,7 +49,7 @@ Index: lib/Driver/ToolChains/OpenBSD.cpp
|
||||
}
|
||||
|
||||
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
|
||||
@@ -255,16 +274,70 @@ OpenBSD::OpenBSD(const Driver &D, const llvm::Triple &
|
||||
@@ -255,16 +275,70 @@ OpenBSD::OpenBSD(const Driver &D, const llvm::Triple &
|
||||
getFilePaths().push_back(getDriver().SysRoot + "/usr/lib");
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.49 2019/09/20 14:51:52 bcallah Exp $
|
||||
# $OpenBSD: Makefile,v 1.50 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
COMMENT = LLVM Fortran compiler passes and runtime library
|
||||
DISTNAME = flang-8.0.0.20190917
|
||||
DISTNAME = flang-8.0.1.20191107
|
||||
|
||||
SHARED_LIBS += flang 2.0 # 8.0
|
||||
SHARED_LIBS += flangrti 4.1 # 8.0
|
||||
SHARED_LIBS += flang 2.1 # 8.0
|
||||
SHARED_LIBS += flangrti 5.0 # 8.0
|
||||
SHARED_LIBS += ompstub 0.0 # 8.0
|
||||
|
||||
GH_PROJECT = flang
|
||||
GH_COMMIT = e5f8d337d5bf86cb19314b61e1b49bab895d4757
|
||||
GH_COMMIT = cbadb27675c4681c8a77eef73c1fbeafee155602
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} aio_compat c execinfo m pgmath z
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (flang-8.0.0.20190917-e5f8d337.tar.gz) = 3Zl0mJIjQX/XXO9OCSoB6hjxVZryQA1ImKUdcl1CA/Y=
|
||||
SIZE (flang-8.0.0.20190917-e5f8d337.tar.gz) = 133246929
|
||||
SHA256 (flang-8.0.1.20191107-cbadb276.tar.gz) = /N/6BwlONotQRaJdkWjuuu/6/tho+twOFG1XFAiokR8=
|
||||
SIZE (flang-8.0.1.20191107-cbadb276.tar.gz) = 133268730
|
||||
|
@ -1,11 +1,11 @@
|
||||
$OpenBSD: patch-runtime_flangrti_CMakeLists_txt,v 1.6 2019/06/24 15:53:37 bcallah Exp $
|
||||
$OpenBSD: patch-runtime_flangrti_CMakeLists_txt,v 1.7 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
We need -lexecinfo. Use the static version for ease.
|
||||
|
||||
Index: runtime/flangrti/CMakeLists.txt
|
||||
--- runtime/flangrti/CMakeLists.txt.orig
|
||||
+++ runtime/flangrti/CMakeLists.txt
|
||||
@@ -107,6 +107,9 @@ find_library(
|
||||
@@ -103,6 +103,9 @@ find_library(
|
||||
HINTS ${CMAKE_BINARY_DIR}/lib)
|
||||
target_link_libraries(flangrti_shared ${LIBPGMATH})
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-runtime_flangrti_aarch64-Linux_dumpregs_c,v 1.1 2018/06/27 00:09:26 bcallah Exp $
|
||||
$OpenBSD: patch-runtime_flangrti_aarch64-Linux_dumpregs_c,v 1.2 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
No ucontext on OpenBSD.
|
||||
|
||||
@ -11,11 +11,11 @@ Index: runtime/flangrti/aarch64-Linux/dumpregs.c
|
||||
|
||||
+#ifndef __OpenBSD__
|
||||
#include <sys/ucontext.h>
|
||||
#include <stddef.h>
|
||||
#include <stdioInterf.h>
|
||||
@@ -29,6 +30,21 @@ typedef struct {
|
||||
} xregs_t;
|
||||
|
||||
void
|
||||
@@ -29,3 +30,18 @@ getRegs(ucontext_t *u)
|
||||
return (gregset_t *)0;
|
||||
}
|
||||
|
||||
+#else
|
||||
+
|
||||
@ -32,3 +32,6 @@ Index: runtime/flangrti/aarch64-Linux/dumpregs.c
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
/*
|
||||
* The way the structure below is organized, the X registers are all
|
||||
* sequential with no gaps - the structure is probably overkill - but
|
||||
|
@ -1,85 +0,0 @@
|
||||
$OpenBSD: patch-runtime_flangrti_aarch64-Linux_flt_env_c,v 1.1 2018/06/27 00:09:26 bcallah Exp $
|
||||
|
||||
Workaround glibc nonsense
|
||||
|
||||
Index: runtime/flangrti/aarch64-Linux/flt_env.c
|
||||
--- runtime/flangrti/aarch64-Linux/flt_env.c.orig
|
||||
+++ runtime/flangrti/aarch64-Linux/flt_env.c
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <fenv.h>
|
||||
-#include <fpu_control.h>
|
||||
|
||||
int
|
||||
__fenv_fegetround(void)
|
||||
@@ -115,14 +114,14 @@ __fenv_feupdateenv(fenv_t *env)
|
||||
int
|
||||
__fenv_fesetzerodenorm(int uflow)
|
||||
{
|
||||
- uint64_t cw;
|
||||
+ fenv_t fenv;
|
||||
|
||||
- _FPU_GETCW(cw);
|
||||
+ fegetenv(&fenv);
|
||||
if (uflow)
|
||||
- cw |= (1ULL << 24);
|
||||
+ fenv |= (1ULL << 24);
|
||||
else
|
||||
- cw &= ~(1ULL << 24);
|
||||
- _FPU_SETCW(cw);
|
||||
+ fenv &= ~(1ULL << 24);
|
||||
+ fesetenv(&fenv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -133,10 +132,10 @@ __fenv_fesetzerodenorm(int uflow)
|
||||
int
|
||||
__fenv_fegetzerodenorm(void)
|
||||
{
|
||||
- uint64_t cw;
|
||||
+ fenv_t fenv;
|
||||
|
||||
- _FPU_GETCW(cw);
|
||||
- return (cw & (1ULL << 24)) ? 1 : 0;
|
||||
+ fegetenv(&fenv);
|
||||
+ return (fenv & (1ULL << 24)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/** \brief
|
||||
@@ -150,16 +149,16 @@ __fenv_fegetzerodenorm(void)
|
||||
void
|
||||
__fenv_mask_fz(int mask, int *psv)
|
||||
{
|
||||
- uint64_t tmp;
|
||||
+ fenv_t tmp;
|
||||
|
||||
- _FPU_GETCW(tmp);
|
||||
+ fegetenv(&tmp);
|
||||
if (psv)
|
||||
*psv = ((tmp & (1ULL << 24)) ? 1 : 0);
|
||||
if (mask)
|
||||
tmp |= (1ULL << 24);
|
||||
else
|
||||
tmp &= ~(1ULL << 24);
|
||||
- _FPU_SETCW(tmp);
|
||||
+ fesetenv(&tmp);
|
||||
}
|
||||
|
||||
/** \brief
|
||||
@@ -168,12 +167,12 @@ __fenv_mask_fz(int mask, int *psv)
|
||||
void
|
||||
__fenv_restore_fz(int sv)
|
||||
{
|
||||
- uint64_t tmp;
|
||||
+ fenv_t tmp;
|
||||
|
||||
- _FPU_GETCW(tmp);
|
||||
+ fegetenv(&tmp);
|
||||
if (sv)
|
||||
tmp |= (1ULL << 24);
|
||||
else
|
||||
tmp &= ~(1ULL << 24);
|
||||
- _FPU_SETCW(tmp);
|
||||
+ fesetenv(&tmp);
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-tools_flang2_flang2exe_ompaccel_cpp,v 1.1 2019/09/20 14:51:52 bcallah Exp $
|
||||
|
||||
https://github.com/flang-compiler/flang/pull/801
|
||||
|
||||
Index: tools/flang2/flang2exe/ompaccel.cpp
|
||||
--- tools/flang2/flang2exe/ompaccel.cpp.orig
|
||||
+++ tools/flang2/flang2exe/ompaccel.cpp
|
||||
@@ -2412,7 +2412,6 @@ init_test()
|
||||
init_tgtutil();
|
||||
}
|
||||
|
||||
-#endif
|
||||
/* Expander - OpenMP Accelerator Model */
|
||||
|
||||
|
||||
@@ -2475,3 +2474,5 @@ ompaccel_tinfo_get_current_parent_devsptr(SPTR sptr)
|
||||
}
|
||||
return SPTR_NULL;
|
||||
}
|
||||
+
|
||||
+#endif
|
@ -1,14 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.35 2019/09/20 14:51:52 bcallah Exp $
|
||||
# $OpenBSD: Makefile,v 1.36 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
# Sync version with lang/flang/flang always!
|
||||
COMMENT = LLVM Fortran math library
|
||||
DISTNAME = flang-8.0.0.20190917
|
||||
DISTNAME = flang-8.0.1.20191107
|
||||
PKGNAME = ${DISTNAME:S/flang/libpgmath/}
|
||||
|
||||
SHARED_LIBS += pgmath 4.3 # 8.0
|
||||
SHARED_LIBS += pgmath 4.4 # 8.0
|
||||
|
||||
GH_PROJECT = flang
|
||||
GH_COMMIT = e5f8d337d5bf86cb19314b61e1b49bab895d4757
|
||||
GH_COMMIT = cbadb27675c4681c8a77eef73c1fbeafee155602
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} m
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (flang-8.0.0.20190917-e5f8d337.tar.gz) = 3Zl0mJIjQX/XXO9OCSoB6hjxVZryQA1ImKUdcl1CA/Y=
|
||||
SIZE (flang-8.0.0.20190917-e5f8d337.tar.gz) = 133246929
|
||||
SHA256 (flang-8.0.1.20191107-cbadb276.tar.gz) = /N/6BwlONotQRaJdkWjuuu/6/tho+twOFG1XFAiokR8=
|
||||
SIZE (flang-8.0.1.20191107-cbadb276.tar.gz) = 133268730
|
||||
|
@ -1,24 +1,9 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.5 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -51,8 +51,13 @@ if (LIBPGMATH_STANDALONE_BUILD)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+set(LIBPGMATH_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
|
||||
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
|
||||
+ set(LIBPGMATH_SYSTEM_NAME "Linux")
|
||||
+endif ()
|
||||
+
|
||||
set(LIBPGMATH_SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
-if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
|
||||
+if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
|
||||
set(LIBPGMATH_SYSTEM_PROCESSOR "x86_64")
|
||||
endif ()
|
||||
|
||||
@@ -106,7 +111,7 @@ set(LIBPGMATH_TOOLS_DIR ${LIBPGMATH_BASE_DIR}/tools)
|
||||
@@ -112,7 +112,7 @@ set(LIBPGMATH_TOOLS_DIR ${LIBPGMATH_BASE_DIR}/tools)
|
||||
set(LIBPGMATH_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(LIBPGMATH_RUNTIME_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
set(LIBPGMATH_LIBRARY_NAME pgmath)
|
||||
|
@ -1,54 +1,54 @@
|
||||
$OpenBSD: patch-lib_CMakeLists_txt,v 1.8 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_CMakeLists_txt,v 1.9 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Some ugly hacks here.
|
||||
|
||||
Index: lib/CMakeLists.txt
|
||||
--- lib/CMakeLists.txt.orig
|
||||
+++ lib/CMakeLists.txt
|
||||
@@ -25,19 +25,19 @@ find_program(SH_PROGRAM NAMES sh bash)
|
||||
set_property(GLOBAL APPEND PROPERTY "TARGET_OBJECTS")
|
||||
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND NOT ${LIBPGMATH_WITH_GENERIC})
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
set(DEFINITIONS_L1
|
||||
@@ -31,13 +31,13 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
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__ PG_PIC)
|
||||
- set(FLAGS_L1 "-m64 -O3 ")
|
||||
+ __gnu_linux__ linux PG_PIC)
|
||||
+ set(FLAGS_L1 "-m64 ")
|
||||
|
||||
set(DEFINITIONS_L2
|
||||
LINUX LINUX86 LINUX8664 MAXCPUS=256 MAXCPUSL=8 MAXCPUSR=8 __gnu_linux__
|
||||
TARGET_LINUX TARGET_LINUX_X86 TARGET_LINUX_X8664 TARGET_X86 TARGET_X8664
|
||||
- PG_PIC)
|
||||
PG_PIC)
|
||||
- set(FLAGS_L2 "-m64 -O3 -mtune=core-avx2 -march=core-avx2 ")
|
||||
+ linux PG_PIC)
|
||||
+ set(FLAGS_L2 "-m64 -mtune=core-avx2 -march=core-avx2 ")
|
||||
|
||||
# common
|
||||
# Definitions and compiler flags for level 1 directories
|
||||
@@ -59,7 +59,7 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
set_property(GLOBAL APPEND_STRING PROPERTY "FLAGS_X8664_L2" ${FLAGS_L2})
|
||||
# x86_64
|
||||
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin")
|
||||
@@ -63,10 +63,10 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
set(DEFINITIONS_L1 HOST_OSX MAXCPUS=256 MAXCPUSL=8 MAXCPUSR=4 OSX OSX86
|
||||
OSX8664 TARGET_OSX TARGET_OSX_X86 TARGET_OSX_X8664 TARGET_X86
|
||||
TARGET_X8664 __gnu_osx__ PG_PIC)
|
||||
@@ -87,7 +87,7 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
set_property(GLOBAL APPEND PROPERTY "DEFINITIONS_X8664_L2" ${DEFINITIONS_L2})
|
||||
set_property(GLOBAL APPEND_STRING PROPERTY "FLAGS_X8664_L2" ${FLAGS_L2})
|
||||
# x86_64
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(DEFINITIONS_L1
|
||||
TARGET_WIN_X8664 TARGET_WIN _PGI_NOBUILTINS MAXCPUS=256
|
||||
MAXCPUSL=8 MAXCPUSR=8 WINNT WIN64 LONG_IS_32
|
||||
@@ -155,12 +155,12 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64"
|
||||
- set(FLAGS_L1 "-m64 -O3 -fomit-frame-pointer ")
|
||||
+ set(FLAGS_L1 "-m64 -fomit-frame-pointer ")
|
||||
|
||||
set(DEFINITIONS_L2 OSX86 TARGET_OSX TARGET_OSX_X86 TARGET_OSX_X8664 PG_PIC TARGET_X86 TARGET_X8664)
|
||||
- set(FLAGS_L2 "-m64 -O3 -fomit-frame-pointer -mavx2 -mfma ")
|
||||
+ set(FLAGS_L2 "-m64 -fomit-frame-pointer -mavx2 -mfma ")
|
||||
|
||||
# common
|
||||
# Definitions and compiler flags for level 1 directories
|
||||
@@ -130,11 +130,11 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "ppc64le"
|
||||
|
||||
set(DEFINITIONS_L1 HOST_LINUX MAXCPUS=256 MAXCPUSL=8 MAXCPUSR=8 TARGET_LINUX
|
||||
TARGET_LINUX_POWER TARGET_LLVM TARGET_LLVM_LINUXPOWER TM_I8 PG_PIC)
|
||||
- set(FLAGS_L1 "-m64 -O3 ")
|
||||
+ set(FLAGS_L1 "-m64 ")
|
||||
|
||||
set(DEFINITIONS_L2 HOST_LINUX MAXCPUS=256 MAXCPUSL=8 MAXCPUSR=8 TARGET_LINUX
|
||||
TARGET_LINUX_POWER TARGET_LLVM TARGET_LLVM_LINUXPOWER TM_I8 PG_PIC)
|
||||
- set(FLAGS_L2 "-m64 -O3 ")
|
||||
+ set(FLAGS_L2 "-m64 ")
|
||||
|
||||
# common
|
||||
# Definitions and compiler flags for level 1 directories
|
||||
@@ -159,12 +159,12 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64"
|
||||
set(DEFINITIONS_L1 HOST_LINUX MAXCPUS=8192 MAXCPUSL=128 MAXCPUSR=128
|
||||
TARGET_LINUX TARGET_LINUX_ARM TARGET_LINUX_ARM64 TARGET_LLVM
|
||||
TARGET_LLVM_LINUXAARCH64 TM_I8)
|
||||
@ -63,7 +63,7 @@ Index: lib/CMakeLists.txt
|
||||
|
||||
# common
|
||||
# Definitions and compiler flags for level 1 directories
|
||||
@@ -185,12 +185,12 @@ else()
|
||||
@@ -189,12 +189,12 @@ else()
|
||||
set(DEFINITIONS_L1 HOST_LINUX MAXCPUS=256 MAXCPUSL=8 MAXCPUSR=8 TARGET_LINUX
|
||||
TARGET_LINUX_64 TARGET_LLVM TARGET_LLVM_64 TARGET_LLVM_LINUX64
|
||||
TARGET_LINUX_GENERIC TARGET_64 PG_PIC)
|
||||
@ -78,12 +78,3 @@ Index: lib/CMakeLists.txt
|
||||
|
||||
# common
|
||||
# Definitions and compiler flags for level 1 directories
|
||||
@@ -244,7 +244,7 @@ get_property(TARGET_OBJECTS GLOBAL PROPERTY "TARGET_OB
|
||||
add_library(${LIBPGMATH_LIBRARY_NAME}_static STATIC ${TARGET_OBJECTS})
|
||||
add_library(${LIBPGMATH_LIBRARY_NAME} SHARED ${TARGET_OBJECTS})
|
||||
target_link_libraries(${LIBPGMATH_LIBRARY_NAME} INTERFACE ${LIBPGMATH_LIBRARY_NAME}_static)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
set_target_properties(${LIBPGMATH_LIBRARY_NAME}_static PROPERTIES OUTPUT_NAME lib${LIBPGMATH_LIBRARY_NAME})
|
||||
set_target_properties(${LIBPGMATH_LIBRARY_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
||||
if(${CMAKE_GENERATOR} MATCHES "MSYS Makefiles")
|
||||
|
@ -1,107 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_CMakeLists_txt,v 1.11 2019/09/20 14:51:52 bcallah Exp $
|
||||
|
||||
Index: lib/common/CMakeLists.txt
|
||||
--- lib/common/CMakeLists.txt.orig
|
||||
+++ lib/common/CMakeLists.txt
|
||||
@@ -43,7 +43,7 @@ get_property(DEFINITIONS GLOBAL PROPERTY "DEFINITIONS_
|
||||
|
||||
set(SRCS)
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND NOT ${LIBPGMATH_WITH_GENERIC})
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
add_subdirectory("sincosf")
|
||||
add_subdirectory("tanf")
|
||||
|
||||
@@ -83,7 +83,7 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
set(SRCS
|
||||
mth_yintrinsics.c
|
||||
mth_zintrinsics.c)
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
add_subdirectory("sincosf")
|
||||
add_subdirectory("tanf")
|
||||
|
||||
@@ -288,9 +288,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
add_custom_command(OUTPUT ${TARGET_NAME}.c DEPENDS ${LIBPGMATH_TOOLS_DIR}/mth_mask.awk PRE_BUILD
|
||||
COMMAND awk -v MAX_VREG_SIZE=128 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_mask.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-march=core2")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-msse2")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
||||
@@ -301,9 +301,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
add_custom_command(OUTPUT ${TARGET_NAME}.c DEPENDS ${LIBPGMATH_TOOLS_DIR}/mth_generic_frp.awk PRE_BUILD
|
||||
COMMAND awk -v MAX_VREG_SIZE=128 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_generic_frp.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-march=core2")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-msse2")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
||||
@@ -314,9 +314,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
add_custom_command(OUTPUT ${TARGET_NAME}.c DEPENDS ${LIBPGMATH_TOOLS_DIR}/mth_mask.awk PRE_BUILD
|
||||
COMMAND awk -v MAX_VREG_SIZE=256 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_mask.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-march=sandybridge")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mavx")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
||||
@@ -327,9 +327,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
add_custom_command(OUTPUT ${TARGET_NAME}.c DEPENDS ${LIBPGMATH_TOOLS_DIR}/mth_generic_frp.awk PRE_BUILD
|
||||
COMMAND awk -v MAX_VREG_SIZE=256 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_generic_frp.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-march=sandybridge")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mavx")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
||||
@@ -341,9 +341,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
COMMAND awk -v MAX_VREG_SIZE=512 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_mask.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mtune=knl -march=knl")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mavx512f -mfma")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
||||
@@ -354,9 +354,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
add_custom_command(OUTPUT ${TARGET_NAME}.c DEPENDS ${LIBPGMATH_TOOLS_DIR}/mth_generic_frp.awk PRE_BUILD
|
||||
COMMAND awk -v MAX_VREG_SIZE=512 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_generic_frp.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mtune=knl -march=knl")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mavx512f -mfma")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
||||
@@ -367,9 +367,9 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64" AND
|
||||
add_custom_command(OUTPUT ${TARGET_NAME}.c DEPENDS ${LIBPGMATH_TOOLS_DIR}/mth_z2yy.awk PRE_BUILD
|
||||
COMMAND awk -v MAX_VREG_SIZE=512 -v TARGET=X8664 -f ${LIBPGMATH_TOOLS_DIR}/mth_z2yy.awk > ${TARGET_NAME}.c)
|
||||
add_custom_target(${TARGET_NAME} ALL DEPENDS "${TARGET_NAME}.c")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mtune=knl -march=knl")
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
set_property(SOURCE ${TARGET_NAME}.c APPEND_STRING PROPERTY COMPILE_FLAGS "-mavx512f -mfma")
|
||||
endif()
|
||||
libmath_add_object_library("${TARGET_NAME}.c" "${FLAGS}" "${DEFINITIONS}" "${TARGET_NAME}_build")
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_acos_fma3_CMakeLists_txt,v 1.3 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/acos/fma3/CMakeLists.txt
|
||||
--- lib/common/acos/fma3/CMakeLists.txt.orig
|
||||
+++ lib/common/acos/fma3/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ set(SRCS)
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
set(SRCS
|
||||
sdacos.cpp
|
||||
ssacos.cpp
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_asin_fma3_CMakeLists_txt,v 1.3 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/asin/fma3/CMakeLists.txt
|
||||
--- lib/common/asin/fma3/CMakeLists.txt.orig
|
||||
+++ lib/common/asin/fma3/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ set(SRCS)
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
set(SRCS
|
||||
sdasin.cpp
|
||||
ssasin.cpp
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_cexp_CMakeLists_txt,v 1.1 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/cexp/CMakeLists.txt
|
||||
--- lib/common/cexp/CMakeLists.txt.orig
|
||||
+++ lib/common/cexp/CMakeLists.txt
|
||||
@@ -25,7 +25,7 @@ set(SRCS
|
||||
)
|
||||
|
||||
list(APPEND DEFINITIONS NDEBUG)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE)
|
||||
endif()
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_cexpf_CMakeLists_txt,v 1.1 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/cexpf/CMakeLists.txt
|
||||
--- lib/common/cexpf/CMakeLists.txt.orig
|
||||
+++ lib/common/cexpf/CMakeLists.txt
|
||||
@@ -25,7 +25,7 @@ set(SRCS
|
||||
)
|
||||
|
||||
list(APPEND DEFINITIONS NDEBUG)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE)
|
||||
endif()
|
||||
|
@ -1,17 +1,8 @@
|
||||
$OpenBSD: patch-lib_common_exp_fma3_CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_common_exp_fma3_CMakeLists_txt,v 1.5 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/common/exp/fma3/CMakeLists.txt
|
||||
--- lib/common/exp/fma3/CMakeLists.txt.orig
|
||||
+++ lib/common/exp/fma3/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ set(SRCS)
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
set(SRCS
|
||||
sdexp.cpp
|
||||
ssexp.cpp
|
||||
@@ -58,6 +58,6 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64"
|
||||
sdexp.cpp
|
||||
vdexp2.cpp
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_log10_CMakeLists_txt,v 1.1 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/log10/CMakeLists.txt
|
||||
--- lib/common/log10/CMakeLists.txt.orig
|
||||
+++ lib/common/log10/CMakeLists.txt
|
||||
@@ -29,7 +29,7 @@ set(SRCS_VECTOR
|
||||
)
|
||||
|
||||
list(APPEND DEFINITIONS NDEBUG)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE)
|
||||
endif()
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_log10f_CMakeLists_txt,v 1.1 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/log10f/CMakeLists.txt
|
||||
--- lib/common/log10f/CMakeLists.txt.orig
|
||||
+++ lib/common/log10f/CMakeLists.txt
|
||||
@@ -46,7 +46,7 @@ set(SRCS_VECTOR_LEGACY
|
||||
)
|
||||
|
||||
list(APPEND DEFINITIONS NDEBUG)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE)
|
||||
endif()
|
||||
|
@ -1,17 +1,8 @@
|
||||
$OpenBSD: patch-lib_common_log_fma3_CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_common_log_fma3_CMakeLists_txt,v 1.5 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/common/log/fma3/CMakeLists.txt
|
||||
--- lib/common/log/fma3/CMakeLists.txt.orig
|
||||
+++ lib/common/log/fma3/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ set(SRCS)
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
set(SRCS
|
||||
fdlog1.cpp
|
||||
fdlog2.cpp
|
||||
@@ -78,6 +78,6 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64"
|
||||
${LONG_SRCS})
|
||||
set_property(SOURCE ${INT_SRCS} APPEND PROPERTY COMPILE_DEFINITIONS VINT=)
|
||||
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_logf_CMakeLists_txt,v 1.1 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/logf/CMakeLists.txt
|
||||
--- lib/common/logf/CMakeLists.txt.orig
|
||||
+++ lib/common/logf/CMakeLists.txt
|
||||
@@ -30,7 +30,7 @@ set(SRCS_VECTOR
|
||||
)
|
||||
|
||||
list(APPEND DEFINITIONS NDEBUG)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE)
|
||||
endif()
|
||||
|
@ -1,17 +1,8 @@
|
||||
$OpenBSD: patch-lib_common_pow_fma3_CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_common_pow_fma3_CMakeLists_txt,v 1.5 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/common/pow/fma3/CMakeLists.txt
|
||||
--- lib/common/pow/fma3/CMakeLists.txt.orig
|
||||
+++ lib/common/pow/fma3/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ set(SRCS)
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux|Darwin|Windows")
|
||||
set(SRCS
|
||||
sdpow.cpp
|
||||
sspow.cpp
|
||||
@@ -55,5 +55,5 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64"
|
||||
vdpow2.cpp)
|
||||
set_property(SOURCE sdpow.cpp vdpow2.cpp APPEND PROPERTY COMPILE_DEFINITIONS VINT=long)
|
||||
|
@ -1,26 +1,8 @@
|
||||
$OpenBSD: patch-lib_common_powi_CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_common_powi_CMakeLists_txt,v 1.5 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/common/powi/CMakeLists.txt
|
||||
--- lib/common/powi/CMakeLists.txt.orig
|
||||
+++ lib/common/powi/CMakeLists.txt
|
||||
@@ -20,7 +20,7 @@ get_property(FLAGS GLOBAL PROPERTY "FLAGS_L1")
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
# Set source files
|
||||
set(CORE2_SRCS fxpowi.c pxpowi.c)
|
||||
set_property(SOURCE ${CORE2_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS "-march=core2 ")
|
||||
@@ -32,7 +32,7 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
${CORE2_SRCS}
|
||||
${SANDYBRIDGE_SRCS}
|
||||
${KNL_SRCS})
|
||||
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
# Set source files
|
||||
set(CORE2_SRCS fxpowi.c pxpowi.c)
|
||||
set_property(SOURCE ${CORE2_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS "-msse2 ")
|
||||
@@ -50,7 +50,7 @@ elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "ppc64le"
|
||||
set_property(SOURCE ${SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS "-mcpu=power8 ")
|
||||
elseif(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64")
|
||||
|
@ -1,23 +0,0 @@
|
||||
$OpenBSD: patch-lib_common_sincos_CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: lib/common/sincos/CMakeLists.txt
|
||||
--- lib/common/sincos/CMakeLists.txt.orig
|
||||
+++ lib/common/sincos/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ endif()
|
||||
|
||||
# Set source files, compiler flags and definitions
|
||||
if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "gssincos4")
|
||||
set_property(TARGET gssincos4 APPEND PROPERTY COMPILE_DEFINITIONS SINCOS=__mth_sincos PRECSIZE=4 VLEN=4)
|
||||
libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "gdsincos2")
|
||||
@@ -77,7 +77,7 @@ if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
libmath_add_object_library("${SRC_VECTOR}" "${AVX512_FLAGS}" "${DEFINITIONS} -DSINE -DVL=8" "fd_sin_16_avx2")
|
||||
libmath_add_object_library("${SRC_VECTOR}" "${KNL_FLAGS}" "${DEFINITIONS} -DSINE -DVL=8" "fd_sin_16_knl")
|
||||
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin|Windows")
|
||||
libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "gssincos4")
|
||||
set_property(TARGET gssincos4 APPEND PROPERTY COMPILE_DEFINITIONS SINCOS=__mth_sincos PRECSIZE=4 VLEN=4)
|
||||
libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "gdsincos2")
|
@ -1,30 +1,14 @@
|
||||
$OpenBSD: patch-lib_x86_64_CMakeLists_txt,v 1.4 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_x86_64_CMakeLists_txt,v 1.5 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/x86_64/CMakeLists.txt
|
||||
--- lib/x86_64/CMakeLists.txt.orig
|
||||
+++ lib/x86_64/CMakeLists.txt
|
||||
@@ -92,12 +92,12 @@ set(SRCS
|
||||
tan.c
|
||||
tanh.c)
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE _ISOC99_SOURCE)
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS _GNU_SOURCE)
|
||||
@@ -97,7 +97,7 @@ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
endif()
|
||||
set(FLAGS "${FLAGS}-Wall -W -Wstrict-prototypes -Wwrite-strings ")
|
||||
-if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
if(NOT ${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
- set(FLAGS "${FLAGS}-Werror ")
|
||||
+if(NOT ${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
+ set(FLAGS "${FLAGS} ")
|
||||
endif()
|
||||
libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "isoc99")
|
||||
|
||||
@@ -141,7 +141,7 @@ set(SRCS
|
||||
tan.c
|
||||
tanh.c)
|
||||
set(FLAGS "${FLAGS} -mavx2 -mfma")
|
||||
-if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
+if(NOT ${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(FLAGS "${FLAGS} -ffp-contract=fast")
|
||||
elseif (${CMAKE_COMPILER_ID} MATCHES "Clang")
|
||||
set(FLAGS "${FLAGS} -Xclang -ffp-contract=fast -Xclang -Wno-language-extension-token")
|
||||
|
@ -1,25 +1,9 @@
|
||||
$OpenBSD: patch-lib_x86_64_fast_CMakeLists_txt,v 1.3 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_x86_64_fast_CMakeLists_txt,v 1.4 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/x86_64/fast/CMakeLists.txt
|
||||
--- lib/x86_64/fast/CMakeLists.txt.orig
|
||||
+++ lib/x86_64/fast/CMakeLists.txt
|
||||
@@ -32,7 +32,7 @@ add_custom_command(OUTPUT ${TARGET_NAME}.i PRE_BUILD
|
||||
COMMAND ${PREPROCESSOR} > ${TARGET_NAME}.i
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../${TARGET_NAME}.h)
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp.${TARGET_NAME}.h.bak "#define __MTH_C99_CMPLX_SUFFIX _c99")
|
||||
configure_file(${CMAKE_CURRENT_BINARY_DIR}/tmp.${TARGET_NAME}.h.bak ${CMAKE_CURRENT_BINARY_DIR}/tmp.${TARGET_NAME}.h COPYONLY)
|
||||
else()
|
||||
@@ -44,11 +44,11 @@ endif()
|
||||
add_custom_target(${TARGET_NAME} ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tmp.${TARGET_NAME}.h)
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND DEFINITIONS LINUX_ELF)
|
||||
endif()
|
||||
@@ -50,5 +50,5 @@ endif()
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(SRCS
|
||||
fastmath.S)
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-lib_x86_64_libm_amd_h,v 1.5 2019/08/12 15:41:55 bcallah Exp $
|
||||
$OpenBSD: patch-lib_x86_64_libm_amd_h,v 1.6 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
We need the compat.
|
||||
|
||||
@ -14,26 +14,16 @@ Index: lib/x86_64/libm_amd.h
|
||||
typedef long __INT8_T;
|
||||
typedef unsigned long __UINT8_T;
|
||||
|
||||
@@ -80,7 +80,13 @@ typedef unsigned long long __UINT8_T;
|
||||
@@ -79,6 +79,12 @@ typedef unsigned long long __UINT8_T;
|
||||
|
||||
/* Open Tools #defines ldexpf */
|
||||
#undef ldexpf
|
||||
|
||||
+
|
||||
+/* We're missing these on OpenBSD, found in NetBSD math.h */
|
||||
+#define DOMAIN 1
|
||||
+#define SING 2
|
||||
+#define OVERFLOW 3
|
||||
+#define UNDERFLOW 4
|
||||
|
||||
+
|
||||
|
||||
/* Types of exceptions in the `type' field. */
|
||||
#if ! defined(TARGET_WIN)
|
||||
# define DOMAIN 1
|
||||
@@ -91,6 +97,8 @@ typedef unsigned long long __UINT8_T;
|
||||
# define PLOSS 6
|
||||
#endif
|
||||
|
||||
+/* The BSDs (and probably macOS too) already define HUGE in math.h */
|
||||
+# undef HUGE
|
||||
# define HUGE 3.40282347e+38F
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-lib_x86_64_libm_inlines_amd_h,v 1.1 2019/11/10 16:50:32 bcallah Exp $
|
||||
|
||||
Index: lib/x86_64/libm_inlines_amd.h
|
||||
--- lib/x86_64/libm_inlines_amd.h.orig
|
||||
+++ 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(TARGET_LINUX_X8664)
|
||||
unsigned int cw;
|
||||
/* Get the current floating-point control/status word */
|
||||
asm volatile("STMXCSR %0" : "=m"(cw));
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-test_CMakeLists_txt,v 1.1 2019/08/12 15:41:55 bcallah Exp $
|
||||
|
||||
Index: test/CMakeLists.txt
|
||||
--- test/CMakeLists.txt.orig
|
||||
+++ test/CMakeLists.txt
|
||||
@@ -114,11 +114,11 @@ set(LIBPGMATH_GETARCH_LIB_FULL "${CMAKE_SHARED_LIBRARY
|
||||
target_include_directories(${LIBPGMATH_GETARCH_LIB} PUBLIC ${LIBPGMATH_SRC_DIR}/x86_64)
|
||||
add_dependencies(check-lib${LIBPGMATH_LIBRARY_NAME} ${LIBPGMATH_GETARCH_LIB})
|
||||
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ if(${LIBPGMATH_SYSTEM_NAME} MATCHES "Linux")
|
||||
set_property(TARGET ${LIBPGMATH_GETARCH_LIB} APPEND PROPERTY COMPILE_DEFINITIONS TARGET_LINUX_X8664)
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set_property(TARGET ${LIBPGMATH_GETARCH_LIB} APPEND PROPERTY COMPILE_DEFINITIONS TARGET_OSX_X8664)
|
||||
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
+ elseif(${LIBPGMATH_SYSTEM_NAME} MATCHES "Windows")
|
||||
set_property(TARGET ${LIBPGMATH_GETARCH_LIB} APPEND PROPERTY COMPILE_DEFINITIONS TARGET_WIN_X8664)
|
||||
set_property(TARGET ${LIBPGMATH_GETARCH_LIB} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user