diff options
-rw-r--r-- | var/spack/repos/builtin/packages/protobuf/intel_inline.patch | 25 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/protobuf/package.py | 2 |
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 |