Don't rely on gcc extensions

Make the code more compatible with different compilers.
clang doesn't allow extra static qualifiers on template
specializations, const qualifiers on function types,
or inline attributes on lambda functions, and is more
picky about casting away constness with reinterpret_cast.

These modifications are compatible with both gcc and
clang.

Change-Id: I739b10df2780bec537827a13679fd2bcc2cc7188
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
diff --git a/runtime/base/macros.h b/runtime/base/macros.h
index 00a530a..cf7029a 100644
--- a/runtime/base/macros.h
+++ b/runtime/base/macros.h
@@ -140,6 +140,13 @@
 #define ALWAYS_INLINE  __attribute__ ((always_inline))
 #endif
 
+#ifdef __clang__
+/* clang doesn't like attributes on lambda functions */
+#define ALWAYS_INLINE_LAMBDA
+#else
+#define ALWAYS_INLINE_LAMBDA ALWAYS_INLINE
+#endif
+
 #if defined (__APPLE__)
 #define HOT_ATTR
 #define COLD_ATTR