List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:August 20 2008 3:27pm
Subject:bzr commit into mysql-6.0-falcon branch (olav:2791) Bug#38891
View as plain text  
#At file:///home/os136802/mysql/develop/repo/falcon-sparc-build/

 2791 Olav Sandstaa	2008-08-20
      Fix for Bug #38891 Falcon is not supported when using Sun Studio and compiling with
optizer on SPARC
      
      When using the Sun Studio compiler on SPARC, configure will check for the support of

      the atomic_* operations on Solaris instead of trying to compile the gcc style
assembly code
      in order to determine if Falcon is supported or not.
modified:
  configure.in
  storage/falcon/plug.in

per-file messages:
  configure.in
    Add check for support for the atomic_* operations on Solaris. These are found, 
    HAVE_SOLARIS_ATOMIC will be defined.
  storage/falcon/plug.in
    Falcon support on SPARC: When compiling with Sun Studio compiler: check for the
support 
    for the atomic_* operations on Solaris instead of trying to compile the gcc style 
    assembly code.
=== modified file 'configure.in'

=== modified file 'configure.in'
--- a/configure.in	2008-08-12 22:21:35 +0000
+++ b/configure.in	2008-08-20 13:27:29 +0000
@@ -1797,6 +1797,9 @@
             [Define to 1 if compiler provides atomic builtins.])
 fi
 
+# Check if we have the atomic_* functions on Solaris
+AC_CHECK_FUNC(atomic_cas_32, AC_DEFINE([HAVE_SOLARIS_ATOMIC], [1], [Define to 1 if
Solaris support atomic functions.]))
+
 # Force static compilation to avoid linking problems/get more speed
 AC_ARG_WITH(mysqld-ldflags,
     [  --with-mysqld-ldflags   Extra linking arguments for mysqld],

=== modified file 'storage/falcon/plug.in'
--- a/storage/falcon/plug.in	2008-08-12 21:50:50 +0000
+++ b/storage/falcon/plug.in	2008-08-20 13:27:29 +0000
@@ -19,6 +19,18 @@
 int compare= 1;
 int exchange= 2;
       ],[
+#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+  /* When compiling with Sun Studio compiler we need the Solaris atomic 
+     functions. These were first introduced in Solaris 10. */
+#if defined(HAVE_SOLARIS_ATOMIC)
+  return 0;
+#else 
+  /* Fail if the atomic functions are not available. Support for this
+     will be added when the fix for bug 37622 is completed. */
+#error Need Solaris atomic functions to use Sun Studio compiler
+#endif /* HAVE_SOLARIS_ATOMIC */
+#else
+  /* Use gcc style inline assembly when compiling with gcc */
   char ret;
   __asm__ __volatile__ (
 	  "membar #LoadLoad | #LoadStore | #StoreLoad | #StoreStore\n\t"
@@ -32,6 +44,7 @@
 	  : "r" (&target), "0" (compare)
 	  : "memory", "cc"
 	  )
+#endif /* !__SUNPRO_C && !__SUNPRO_CC */
       ], falcon_supported_by_machine="yes", 
          falcon_supported_by_machine="no")
       ;;

Thread
bzr commit into mysql-6.0-falcon branch (olav:2791) Bug#38891Olav Sandstaa20 Aug