diff --git a/ext/mysql2/extconf.rb b/ext/mysql2/extconf.rb
index <HASH>..<HASH> 100644
--- a/ext/mysql2/extconf.rb
+++ b/ext/mysql2/extconf.rb
@@ -57,7 +57,7 @@ end
   asplode h unless have_header h
 end
 
-unless RUBY_PLATFORM =~ /mswin/
+unless RUBY_PLATFORM =~ /mswin/ or RUBY_PLATFORM =~ /sparc/
   $CFLAGS << ' -Wall -funroll-loops'
 end
 # $CFLAGS << ' -O0 -ggdb3 -Wextra'
fix to CFLAGS to allow compilation on SPARC with sunstudio compiler