]> granicus.if.org Git - gc/commitdiff
Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
authorIvan Maidanski <ivmai@mail.ru>
Sun, 8 Jun 2014 13:24:17 +0000 (17:24 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 15 Jun 2014 09:11:47 +0000 (13:11 +0400)
* configure.ac (CFLAGS): Add -O flag if Solaris SunCC (i.e., not GCC)
regardless of threads support (i.e., even in case it is off).

configure.ac

index 76679498d478cd7361f8b2d53ed117d904ad5f41..aa00ea54e81890f3a0cbe5711431fe5cad0b59c7 100644 (file)
@@ -310,9 +310,8 @@ case "$THREADS" in
         ;;
     esac
     case "$host" in
-     sparc*-*-solaris*)
+      sparc*-*-solaris*)
         if test "$GCC" != yes; then
-          CFLAGS="-O $CFLAGS"
           need_atomic_ops_asm=true
         fi
         ;;
@@ -382,6 +381,12 @@ case "$host" in
    powerpc-*-darwin*)
       powerpc_darwin=true
       ;;
+   *-*-solaris*)
+      if test "$GCC" != yes; then
+        # Solaris SunCC
+        CFLAGS="-O $CFLAGS"
+      fi
+      ;;
    *-*-wince*)
       if test "$enable_gc_debug" != "no"; then
         AC_DEFINE([GC_READ_ENV_FILE], 1,