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:
Brian Van Essen 2018-01-04 08:48:22 -07:00 committed by Adam J. Stewart
parent 3f9ed72f68
commit 45188d6d96
2 changed files with 27 additions and 0 deletions

View 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))

View File

@ -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