From 337d7ba539a9d8f5f19110edd365ae6d3a7d8aba Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 19 Feb 2001 03:59:05 +0000 Subject: Introduce support for using OpenSSL ASM optimizations. This is done through the use of a new build directive, MACHINE_CPU, which contains a list of the CPU generations/features for which optimizations are desired. This feature will be extended to cover the ports tree in the future. Currently OpenSSL provides optimizations for i386, i586 and i686-class CPUs. Currently it has not been tested on an i386 or i486. Teach make(1) to provide sensible defaults for MACHINE_CPU if it is not defined (namely, the lowest common denominator CPU we support for each architecture). Currently this is i386 for the i386 architecture and ev4 for the alpha. sys.mk also sets the variable as a last resort for consistency with MACHINE_ARCH and bootstrapping from very old versions of make. Benchmarks show a significant speed increase even in the i386 case, with additional improvements for i586 and i686 systems. For maximum performance define MACHINE_CPU=i686 i586 i386 in /etc/make.conf. Based on a patch submitted by: Mike Silbersack Reviewed by: current --- etc/defaults/make.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index 9e9d669..41ad7bf 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -13,6 +13,19 @@ # You have to find the things you can put here in the Makefiles and # documentation of the source tree. # +# +# MACHINE_CPU controls which processor-specific optimizations will be +# used by certain components of FreeBSD (currently only OpenSSL). +# This should be set to a list of your CPU type, plus all previous +# generations of the CPU architecture. The reason for using a list is +# because not all programs which use the MACHINE_CPU variable may have +# optimizations for your specific CPU generation (e.g. Pentium Pro), +# but may have optimizations for the previous generation (e.g. Pentium). +# Currently only the following CPU generations are used: +# i686 i585 i386 +# +#MACHINE_CPU=i686 i586 i386 +# # CFLAGS controls the compiler settings used when compiling C code. # Note that optimization settings above -O (-O2, ...) are not recommended # or supported for compiling the world or the kernel - please revert any @@ -82,7 +95,7 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ #NOGAMES= true # do not build games (games/ subdir) #NOINFO= true # do not make or install info files #NOLIBC_R= true # do not build libc_r (re-entrant version of libc) -#NOPERL= true # To avoid building perl +#NOPERL= true # do not build perl. Disables OpenSSL optimizations #NOPROFILE= true # Avoid compiling profiled libraries #NOSECURE= true # do not build crypto code in secure/ subdir #NOSHARE= true # do not go into the share subdir -- cgit v1.1