sha256_4way.c:54:49: warning: always_inline function might not be inlinable [-Wattributes]
sha256_4way.c:50:48: warning: always_inline function might not be inlinable [-Wattributes]
The '__attribute__((always_inline))' does not strictly imply 'inline'. Newer versions of GCC detect this misuse and issue
the above warning. Including the missing 'inline' resolves the build warning.
cd /path-to-build-folder
git clone git://github.com/ckolivas/cgminer.git
patch -p0 < git+d4af2d0535.patch
/path-to-build-folder/git+d4af2d0535.patch
--- cgminer/sha256_4way.c.orig
+++ cgminer/sha256_4way.c
@@ -47,11 +47,11 @@
return _mm_xor_si128(_mm_xor_si128(_mm_and_si128(b,c),_mm_and_si128(b,d)),_mm_and_si128(c,d));
}
-static __attribute__((always_inline)) __m128i ROTR(__m128i x, const int n) {
+static inline __attribute__((always_inline)) __m128i ROTR(__m128i x, const int n) {
return _mm_or_si128(_mm_srli_epi32(x, n),_mm_slli_epi32(x, 32 - n));
}
-static __attribute__((always_inline)) __m128i SHR(__m128i x, const int n) {
+static inline __attribute__((always_inline)) __m128i SHR(__m128i x, const int n) {
return _mm_srli_epi32(x, n);
}