algo-gate-api.c:215: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [cpuminer-algo-gate-api.o] Error 1
make[1]: Leaving directory `/usr/cpuminer-opt'
make: *** [install-recursive] Error 1
You're likely using gcc 4.4. Use newer compiler.