diff options
| author | Kris Kennaway <kris@FreeBSD.org> | 2001-03-04 09:40:33 +0000 |
|---|---|---|
| committer | Kris Kennaway <kris@FreeBSD.org> | 2001-03-04 09:40:33 +0000 |
| commit | 7965184842db8889354f11ec2e207a0e5b4d26b3 (patch) | |
| tree | 287bbe2facec8efcffb5e00df406a55cd4b3f856 | |
| parent | 259f01e88327ec067b4f80f64823603ab63920e5 (diff) | |
Notes
| -rw-r--r-- | etc/defaults/make.conf | 18 | ||||
| -rw-r--r-- | share/mk/Makefile | 2 | ||||
| -rw-r--r-- | share/mk/bsd.cpu.mk | 6 | ||||
| -rw-r--r-- | share/mk/sys.mk | 2 | ||||
| -rw-r--r-- | usr.bin/make/main.c | 15 |
5 files changed, 35 insertions, 8 deletions
diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index 470b634942ed..8fff4998e6f9 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -9,6 +9,22 @@ # You have to find the things you can put here in the Makefiles and # documentation of the source tree. # +# +# The CPUTYPE variable controls which processor should be targetted for +# generated code. This controls processor-specific optimizations in +# certain code (currently only OpenSSL) as well as modifying the value +# of CFLAGS to contain the appropriate optimization directive to gcc. +# The automatic setting of CFLAGS may be overridden using the +# NO_CPU_CFLAGS variable below. +# Currently the following CPU types are recognised: +# Intel x86 architecture: +# (AMD CPUs) k7 k6-2 k6 k5 +# (Intel CPUs) p4 p3 p2 i686 i586/mmx i586 i486 i386 +# Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4 +# +#CPUTYPE=i686 +#NO_CPU_CFLAGS= true # Don't add -march=<cpu> to CFLAGS automatically +# # 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 @@ -76,7 +92,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 diff --git a/share/mk/Makefile b/share/mk/Makefile index e8abc6348f67..bfc3102e30c3 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -2,7 +2,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/8/93 FILES= bsd.README -FILES+= bsd.dep.mk bsd.doc.mk bsd.docb.mk bsd.info.mk bsd.kern.mk bsd.kmod.mk +FILES+= bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.docb.mk bsd.info.mk bsd.kern.mk bsd.kmod.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.man.mk bsd.obj.mk bsd.own.mk FILES+= bsd.port.mk bsd.port.post.mk bsd.port.pre.mk bsd.port.subdir.mk FILES+= bsd.prog.mk bsd.sgml.mk bsd.subdir.mk diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 63937f340e22..bb16e24d655e 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -7,8 +7,6 @@ CPUTYPE ?= i386 .elif ${MACHINE_ARCH} == "alpha" CPUTYPE ?= ev4 -.elif ${MACHINE_ARCH} == "ia64" -CPUTYPE ?= itanium .endif # Handle aliases (not documented in make.conf to avoid user confusion @@ -114,8 +112,4 @@ MACHINE_CPU = ev45 ev4 . elif ${CPUTYPE} == "ev4" MACHINE_CPU = ev4 . endif -.elif ${MACHINE_ARCH} == "ia64" -. if ${CPUTYPE} == "itanium" -MACHINE_CPU = itanium -. endif .endif diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 1449d9937007..4fac78f54745 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -244,6 +244,8 @@ HTAGSFLAGS= .include </etc/make.conf> .endif +.include <bsd.cpu.mk> + .if exists(/etc/make.conf.local) .error Error, original /etc/make.conf should be moved to the /etc/defaults/ directory and /etc/make.conf.local should be renamed to /etc/make.conf. .include </etc/make.conf.local> diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index d8ed082b29b9..c256b2f17e98 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -480,6 +480,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 */ @@ -572,6 +573,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: * @@ -673,6 +687,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. |
