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
This commit is contained in:
parent
3f9ed72f68
commit
45188d6d96
25
var/spack/repos/builtin/packages/protobuf/intel_inline.patch
Normal file
25
var/spack/repos/builtin/packages/protobuf/intel_inline.patch
Normal file
@ -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))
|
@ -48,6 +48,8 @@ class Protobuf(CMakePackage):
|
|||||||
# first fixed in 3.4.0: https://github.com/google/protobuf/pull/3406
|
# first fixed in 3.4.0: https://github.com/google/protobuf/pull/3406
|
||||||
patch('pkgconfig.patch', when='@:3.3.2')
|
patch('pkgconfig.patch', when='@:3.3.2')
|
||||||
|
|
||||||
|
patch('intel_inline.patch', when='@3.2.0: %intel')
|
||||||
|
|
||||||
def fetch_remote_versions(self):
|
def fetch_remote_versions(self):
|
||||||
"""Ignore additional source artifacts uploaded with releases,
|
"""Ignore additional source artifacts uploaded with releases,
|
||||||
only keep known versions
|
only keep known versions
|
||||||
|
Loading…
Reference in New Issue
Block a user