]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Disable kernel opt by default on Solaris 10 and 11
authorAndrew Deason <adeason@sinenomine.net>
Mon, 6 Feb 2012 19:23:41 +0000 (13:23 -0600)
committerDerrick Brashear <shadow@dementix.org>
Wed, 8 Feb 2012 21:51:21 +0000 (13:51 -0800)
With newer Solaris Studio (sometime in the 12.* series), cc started
adding SSE instructions to optimized x86 code, which is invalid for
kernel code and can generate panics. There appears to be no way to
turn this off currently (-xvector=%none is non-functional), so default
to not optimizing kernel code.

Reviewed-on: http://gerrit.openafs.org/6671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 80592c53cbb0bce782eb39a5e64860786654be9f)

Change-Id: If1539dd88d4d28771a7eafcdaff30a75cb230917
Reviewed-on: http://gerrit.openafs.org/6683
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
acinclude.m4
src/cf/osconf.m4

index 41ef6d1a4c5feba0288e573d8c4b75361dbb754e..ba157c0aeb1ac789121e567928249cfc165fc25d 100644 (file)
@@ -200,7 +200,7 @@ AC_ARG_ENABLE([optimize-kernel],
         [disable compilation of the kernel module with optimization (defaults
          based on platform)])],
     , 
-    [enable_optimize_kernel="yes"])
+    [enable_optimize_kernel=""])
 AC_ARG_ENABLE([debug-lwp],
     [AS_HELP_STRING([--enable-debug-lwp],
         [enable compilation of the LWP code with debugging information
index a42d33b2497c5ff9ed8317979a7322b13b1e1a82..93a5279deec74382bffde908f4a779d3b10b2a85 100644 (file)
@@ -725,6 +725,20 @@ case $AFS_SYSNAME in
                ;;
 esac
 
+#
+# Defaults for --enable-optimize-kernel
+#
+if test "x$enable_optimize_kernel" = "x" ; then
+  AS_CASE([$AFS_SYSNAME],
+    [sunx86_510|sunx86_511],
+      dnl Somewhere around Solaris Studio 12.*, the compiler started adding SSE
+      dnl instructions to optimized code, without any ability to turn it off.
+      dnl So just default to not optimizing kernel code for the relevant
+      dnl platforms, until we get a better autoconf test for this.
+      [enable_optimize_kernel=no],
+    [enable_optimize_kernel=yes])
+fi
+
 #
 # Special build targets
 #