diff --git a/acinclude.m4 b/acinclude.m4 index 41ef6d1a4c..ba157c0aeb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index a42d33b249..93a5279dee 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -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 #