summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2018-01-04 08:48:22 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2018-01-04 09:48:22 -0600
commit45188d6d9673706506fc56aabf72bb87a9ed7853 (patch)
treee19cbfd199e6599567879a9cb8f28c8262eadc30
parent3f9ed72f68624cd0fd982a7325554bdf1f3fd250 (diff)
downloadspack-45188d6d9673706506fc56aabf72bb87a9ed7853.tar.gz
spack-45188d6d9673706506fc56aabf72bb87a9ed7853.tar.bz2
spack-45188d6d9673706506fc56aabf72bb87a9ed7853.tar.xz
spack-45188d6d9673706506fc56aabf72bb87a9ed7853.zip
Protobuf intel patch (#5233)
* Added a package for the MDAnalysis toolkit. * Added a patch file to get rid of compiler warnings with intel compiler and inlining. Added checksum values for other versions of protobuf. * Added dependency on Intel compiler for intel patch
-rw-r--r--var/spack/repos/builtin/packages/protobuf/intel_inline.patch25
-rw-r--r--var/spack/repos/builtin/packages/protobuf/package.py2
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/protobuf/intel_inline.patch b/var/spack/repos/builtin/packages/protobuf/intel_inline.patch
new file mode 100644
index 0000000000..61f1334293
--- /dev/null
+++ b/var/spack/repos/builtin/packages/protobuf/intel_inline.patch
@@ -0,0 +1,25 @@
+diff -Naur src_a/google/protobuf/stubs/port.h src_b/google/protobuf/stubs/port.h
+--- a/src/google/protobuf/stubs/port.h 2017-08-24 18:17:47.149533997 -0700
++++ b/src/google/protobuf/stubs/port.h 2017-08-24 22:13:12.907241538 -0700
+@@ -167,7 +167,9 @@
+ // is not right for you.
+
+ #ifndef GOOGLE_ATTRIBUTE_ALWAYS_INLINE
+-#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
++#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER > 1700)
++#define GOOGLE_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline))
++#elif defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+ // For functions we want to force inline.
+ // Introduced in gcc 3.1.
+ #define GOOGLE_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline))
+@@ -178,7 +180,9 @@
+ #endif
+
+ #ifndef GOOGLE_ATTRIBUTE_NOINLINE
+-#if defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
++#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER > 1700)
++#define GOOGLE_ATTRIBUTE_NOINLINE
++#elif defined(__GNUC__) && (__GNUC__ > 3 ||(__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+ // For functions we want to force not inline.
+ // Introduced in gcc 3.1.
+ #define GOOGLE_ATTRIBUTE_NOINLINE __attribute__ ((noinline))
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py
index 038c208864..7453c11cb6 100644
--- a/var/spack/repos/builtin/packages/protobuf/package.py
+++ b/var/spack/repos/builtin/packages/protobuf/package.py
@@ -48,6 +48,8 @@ class Protobuf(CMakePackage):
# first fixed in 3.4.0: https://github.com/google/protobuf/pull/3406
patch('pkgconfig.patch', when='@:3.3.2')
+ patch('intel_inline.patch', when='@3.2.0: %intel')
+
def fetch_remote_versions(self):
"""Ignore additional source artifacts uploaded with releases,
only keep known versions