summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNichols A. Romero <naromero77@users.noreply.github.com>2019-12-20 16:23:38 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2019-12-20 16:23:38 -0600
commit1b93320848b41057f8892c2a59287d904d28ce6e (patch)
treede19c356187ed6d03a0f1298d4f555a28b916763
parentabf8e09fe5deef30af1970c9de0cd9abeccc5b29 (diff)
downloadspack-1b93320848b41057f8892c2a59287d904d28ce6e.tar.gz
spack-1b93320848b41057f8892c2a59287d904d28ce6e.tar.bz2
spack-1b93320848b41057f8892c2a59287d904d28ce6e.tar.xz
spack-1b93320848b41057f8892c2a59287d904d28ce6e.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/pgmath/libpgmath_symbols.patch91
-rw-r--r--var/spack/repos/builtin/packages/pgmath/package.py6
2 files changed, 97 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/pgmath/libpgmath_symbols.patch b/var/spack/repos/builtin/packages/pgmath/libpgmath_symbols.patch
new file mode 100644
index 0000000000..65b7d40bea
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pgmath/libpgmath_symbols.patch
@@ -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
++*/
diff --git a/var/spack/repos/builtin/packages/pgmath/package.py b/var/spack/repos/builtin/packages/pgmath/package.py
index e096a596d8..c4c3c5d9d6 100644
--- a/var/spack/repos/builtin/packages/pgmath/package.py
+++ b/var/spack/repos/builtin/packages/pgmath/package.py
@@ -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")