PGMATH library symbols patch (#14254)
* Add symbols patch * Apply symbols patch to pgmath * Add github issue number for symbols patch. * Add naromero77 as a maintainer. * Patch only applied to March 2019 release and master.
This commit is contained in:
parent
abf8e09fe5
commit
1b93320848
2 changed files with 97 additions and 0 deletions
|
@ -0,0 +1,91 @@
|
|||
diff --git a/runtime/libpgmath/lib/common/ceil.c b/runtime/libpgmath/lib/common/ceil.c
|
||||
index 3b66ca5c..341c5194 100644
|
||||
--- a/runtime/libpgmath/lib/common/ceil.c
|
||||
+++ b/runtime/libpgmath/lib/common/ceil.c
|
||||
@@ -16,9 +16,11 @@
|
||||
*/
|
||||
|
||||
#include "mthdecls.h"
|
||||
+/*
|
||||
#if defined(__SSE4_1__) || defined(__AVX__)
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
+*/
|
||||
|
||||
float
|
||||
__mth_i_ceil(float x)
|
||||
diff --git a/runtime/libpgmath/lib/common/dceil.c b/runtime/libpgmath/lib/common/dceil.c
|
||||
index 67482ef2..5dae82f9 100644
|
||||
--- a/runtime/libpgmath/lib/common/dceil.c
|
||||
+++ b/runtime/libpgmath/lib/common/dceil.c
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "mthdecls.h"
|
||||
+/*
|
||||
#if defined(__SSE4_1__) || defined(__AVX__)
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
@@ -33,9 +34,12 @@ __mth_i_dceil_sse(double x)
|
||||
return _mm_cvtsd_f64(_mm_ceil_sd(_mm_set1_pd(x), _mm_set1_pd(x)));
|
||||
}
|
||||
#else
|
||||
+*/
|
||||
double
|
||||
__mth_i_dceil(double x)
|
||||
{
|
||||
return ceil(x);
|
||||
}
|
||||
+/*
|
||||
#endif
|
||||
+*/
|
||||
diff --git a/runtime/libpgmath/lib/common/dfloor.c b/runtime/libpgmath/lib/common/dfloor.c
|
||||
index f947ef33..8b955897 100644
|
||||
--- a/runtime/libpgmath/lib/common/dfloor.c
|
||||
+++ b/runtime/libpgmath/lib/common/dfloor.c
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "mthdecls.h"
|
||||
+/*
|
||||
#if defined(__SSE4_1__) || defined(__AVX__)
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
@@ -33,9 +34,12 @@ __mth_i_dfloor_sse(double x)
|
||||
return _mm_cvtsd_f64(_mm_floor_sd(_mm_set1_pd(x), _mm_set1_pd(x)));
|
||||
}
|
||||
#else
|
||||
+*/
|
||||
double
|
||||
__mth_i_dfloor(double x)
|
||||
{
|
||||
return floor(x);
|
||||
}
|
||||
+/*
|
||||
#endif
|
||||
+*/
|
||||
diff --git a/runtime/libpgmath/lib/common/floor.c b/runtime/libpgmath/lib/common/floor.c
|
||||
index 7865bedc..c13872df 100644
|
||||
--- a/runtime/libpgmath/lib/common/floor.c
|
||||
+++ b/runtime/libpgmath/lib/common/floor.c
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "mthdecls.h"
|
||||
+/*
|
||||
#if defined(__SSE4_1__) || defined(__AVX__)
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
@@ -33,9 +34,12 @@ __mth_i_floor_sse(float x)
|
||||
return _mm_cvtss_f32(_mm_floor_ss(_mm_set1_ps(x), _mm_set1_ps(x)));
|
||||
}
|
||||
#else
|
||||
+*/
|
||||
float
|
||||
__mth_i_floor(float x)
|
||||
{
|
||||
return floorf(x);
|
||||
}
|
||||
+/*
|
||||
#endif
|
||||
+*/
|
|
@ -14,11 +14,17 @@ class Pgmath(CMakePackage):
|
|||
url = "https://github.com/flang-compiler/flang/archive/flang_20190329.tar.gz"
|
||||
git = "https://github.com/flang-compiler/flang.git"
|
||||
|
||||
maintainers = ['naromero77']
|
||||
|
||||
version('master', branch='master')
|
||||
version('20190329', sha256='b8c621da53829f8c53bad73125556fb1839c9056d713433b05741f7e445199f2')
|
||||
version('20180921', sha256='f33bd1f054e474f1e8a204bb6f78d42f8f6ecf7a894fdddc3999f7c272350784')
|
||||
version('20180612', sha256='6af858bea013548e091371a97726ac784edbd4ff876222575eaae48a3c2920ed')
|
||||
|
||||
# workaround for this issue
|
||||
# https://github.com/flang-compiler/flang/issues/838
|
||||
patch('libpgmath_symbols.patch', when='@20190329,master')
|
||||
|
||||
depends_on("awk", type="build")
|
||||
conflicts("%gcc@:7.1.9999")
|
||||
|
||||
|
|
Loading…
Reference in a new issue