diff options
author | kris <kris@FreeBSD.org> | 2001-02-19 03:59:05 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-02-19 03:59:05 +0000 |
commit | 337d7ba539a9d8f5f19110edd365ae6d3a7d8aba (patch) | |
tree | 60450ca990b063182ef023cd353e304633e4be4f /usr.bin/make | |
parent | 405108c6cdec7aa38d58c740b468341671eca930 (diff) | |
download | FreeBSD-src-337d7ba539a9d8f5f19110edd365ae6d3a7d8aba.zip FreeBSD-src-337d7ba539a9d8f5f19110edd365ae6d3a7d8aba.tar.gz |
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 <silby@silby.com>
Reviewed by: current
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 4695066..8ff1de3 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -472,6 +472,7 @@ main(argc, argv) char cdpath[MAXPATHLEN + 1]; char *machine = getenv("MACHINE"); char *machine_arch = getenv("MACHINE_ARCH"); + char *machine_cpu = getenv("MACHINE_CPU"); Lst sysMkPath; /* Path of sys.mk */ char *cp = NULL, *start; /* avoid faults on read-only strings */ @@ -571,6 +572,19 @@ main(argc, argv) } /* + * Set machine_cpu to the minumum supported CPU revision based + * on the target architecture, if not already set. + */ + if (!machine_cpu) { + if (!strcmp(machine_arch, "i386")) + machine_cpu = "i386"; + else if (!strcmp(machine_arch, "alpha")) + machine_cpu = "ev4"; + else + machine_cpu = "unknown"; + } + + /* * The object directory location is determined using the * following order of preference: * @@ -672,6 +686,7 @@ main(argc, argv) Var_Set("MFLAGS", "", VAR_GLOBAL); Var_Set("MACHINE", machine, VAR_GLOBAL); Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL); + Var_Set("MACHINE_CPU", machine_cpu, VAR_GLOBAL); /* * First snag any flags out of the MAKE environment variable. |