From: Andrew Deason Date: Mon, 6 Feb 2012 19:23:41 +0000 (-0600) Subject: Disable kernel opt by default on Solaris 10 and 11 X-Git-Tag: upstream/1.8.0_pre1^2~2776 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=80592c53cbb0bce782eb39a5e64860786654be9f;p=packages%2Fo%2Fopenafs.git Disable kernel opt by default on Solaris 10 and 11 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. Change-Id: I5fdedb11219df68e0146b8e0cee9010c2eb4067e Reviewed-on: http://gerrit.openafs.org/6671 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/acinclude.m4 b/acinclude.m4 index 433542d05..92cad6f29 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -199,7 +199,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 ab64a0492..04ed6a708 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -652,6 +652,20 @@ esac MT_CFLAGS="${MT_CFLAGS} -DAFS_PTHREAD_ENV" +# +# 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 #