summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorToyohisa Kameyama <kameyama@riken.jp>2019-07-22 11:56:14 +0900
committerAdam J. Stewart <ajstewart426@gmail.com>2019-07-21 21:56:14 -0500
commit8ca90e26d933a263066ba02efc150753f1cad0c7 (patch)
treea380b6645b80949e9ba16a9de961c4aa32a72b6b /var
parent1d5ab13be899035616c28efe17a3a2f3b2a7847d (diff)
downloadspack-8ca90e26d933a263066ba02efc150753f1cad0c7.tar.gz
spack-8ca90e26d933a263066ba02efc150753f1cad0c7.tar.bz2
spack-8ca90e26d933a263066ba02efc150753f1cad0c7.tar.xz
spack-8ca90e26d933a263066ba02efc150753f1cad0c7.zip
libsharp: Don't add -march=native on ARM (#12064)
* libsharp: Don't add -march=native on ARM * Add preferred=True to version 1.0.0.
Diffstat (limited to 'var')
-rwxr-xr-xvar/spack/repos/builtin/packages/libsharp/1.0.0-arm.patch13
-rwxr-xr-xvar/spack/repos/builtin/packages/libsharp/arm.patch15
-rw-r--r--var/spack/repos/builtin/packages/libsharp/package.py5
3 files changed, 32 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libsharp/1.0.0-arm.patch b/var/spack/repos/builtin/packages/libsharp/1.0.0-arm.patch
new file mode 100755
index 0000000000..1f68c96ce9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsharp/1.0.0-arm.patch
@@ -0,0 +1,13 @@
+diff -ru spack-src/configure.ac spack-src.new/configure.ac
+--- spack-src/configure.ac 2019-07-19 13:59:16.000000000 +0900
++++ spack-src.new/configure.ac 2019-07-19 14:13:36.973408139 +0900
+@@ -49,7 +49,7 @@
+
+ case $CCTYPE in
+ gcc)
+- CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors -march=native"
++ CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors"
+ GCCVERSION="`$CC -dumpversion 2>&1`"
+ echo "Using gcc version $GCCVERSION"
+ AC_SUBST(GCCVERSION)
+Only in spack-src.new: configure.ac.new
diff --git a/var/spack/repos/builtin/packages/libsharp/arm.patch b/var/spack/repos/builtin/packages/libsharp/arm.patch
new file mode 100755
index 0000000000..19ed264757
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsharp/arm.patch
@@ -0,0 +1,15 @@
+diff -ru spack-src/configure.ac spack-src.new/configure.ac
+--- spack-src/configure.ac 2019-07-19 11:40:41.000000000 +0900
++++ spack-src.new/configure.ac 2019-07-19 13:48:48.773238828 +0900
+@@ -56,8 +56,9 @@
+ changequote(,)
+ gcc43=`echo $GCCVERSION | grep -c '^4\.[3456789]'`
+ gcc44=`echo $GCCVERSION | grep -c '^4\.4'`
++ arch=`uname -m`
+ changequote([,])
+- if test $gcc43 -gt 0; then
++ if test $gcc43 -gt 0 -a $arch != aarch64; then
+ CCFLAGS="$CCFLAGS -march=native"
+ fi
+ if test $gcc44 -gt 0; then
+Only in spack-src.new: configure.ac.new
diff --git a/var/spack/repos/builtin/packages/libsharp/package.py b/var/spack/repos/builtin/packages/libsharp/package.py
index ed13fecd78..ab1007e013 100644
--- a/var/spack/repos/builtin/packages/libsharp/package.py
+++ b/var/spack/repos/builtin/packages/libsharp/package.py
@@ -17,12 +17,15 @@ class Libsharp(AutotoolsPackage):
homepage = "https://github.com/Libsharp/libsharp"
git = "https://github.com/Libsharp/libsharp.git"
- version('1.0.0', commit='cc4753ff4b0ef393f0d4ada41a175c6d1dd85d71')
+ version('1.0.0', commit='cc4753ff4b0ef393f0d4ada41a175c6d1dd85d71', preferred=True)
version('2018-01-17', commit='593d4eba67d61827191c32fb94bf235cb31205e1')
depends_on('autoconf', type='build')
depends_on('mpi', when='+mpi')
+ patch('arm.patch', when='@2018-01-17 target=aarch64')
+ patch('1.0.0-arm.patch', when='@1.0.0 target=aarch64')
+
def autoreconf(self, spec, prefix):
"""Generate autotools configuration"""
bash = which('bash')