aboutsummaryrefslogtreecommitdiff
path: root/etc/defaults/make.conf
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2001-02-22 11:14:25 +0000
committerKris Kennaway <kris@FreeBSD.org>2001-02-22 11:14:25 +0000
commit62d90fb7934e36dac601a6975734f3f7814e84e5 (patch)
tree67a7ddcba3a9d90f4657b23bda3d1d814c955a86 /etc/defaults/make.conf
parentafbf4651521de7abfda9ee859d9e5259e0b29624 (diff)
downloadsrc-62d90fb7934e36dac601a6975734f3f7814e84e5.tar.gz
src-62d90fb7934e36dac601a6975734f3f7814e84e5.zip
Overhaul the MACHINE_CPU behaviour:
* Rip out MACHINE_CPU stuff from sys.mk and include a new <bsd.cpu.mk> after we pull in /etc/make.conf. We need to do it afterwards so we can react to the user setting of the: * CPUTYPE variable, which contains the CPU type which the user wants to optimize for. For example, if you want your binaries to only run on an i686-class machine (or higher), set this to i686. If you want to support running binaries on a variety of CPU generations, set this to the lowest common denominator. Supported values are listed in make.conf. * bsd.cpu.mk does the expansion of CPUTYPE into MACHINE_CPU using the (hopefully) correct unordered list of CPU types which should be used on that CPU. For example, an AMD k6 CPU wants any of the following: k6 k5 i586 i486 i386 This is still an unordered list so the client makefile logic is simple - client makefiles need to test for the various elements of the set in decreasing order of priority using ${MACHINE_CPU:M<foo>}, as before. The various MACHINE_CPU lists are believed to be correct, but should be checked. * If NO_CPU_CFLAGS is not defined, add relevant gcc compiler optimization settings by default (e.g. -karch=k6 for CPUTYPE=k6, etc). Release builders and developers of third-party software need to make sure not to enable CPU-specific optimization when generating code intended to be portable. We probably need to move to an /etc/world.conf to allow the optimization stuff to be applied separately to world/kernel and external compilations, but it's not any worse a problem than it was before. * Add coverage for the ia64/itanium MACHINE_ARCH/CPUTYPE. * Add CPUTYPE support for all of the CPU types supported by FreeBSD and gcc (only i386, alpha and ia64 first, since those are the minimally-working ports. Other architecture porters, please feel free to add the relevant gunk for your platform). Reviewed by: jhb, obrien
Notes
Notes: svn path=/head/; revision=72878
Diffstat (limited to 'etc/defaults/make.conf')
-rw-r--r--etc/defaults/make.conf26
1 files changed, 14 insertions, 12 deletions
diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf
index f909dfd37081..be729cf3f493 100644
--- a/etc/defaults/make.conf
+++ b/etc/defaults/make.conf
@@ -13,18 +13,20 @@
# 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
+#
+# 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: k7 k6 k5 i686 i585 i486 i386
+# Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4
+# Intel ia64 architecture: itanium
+#
+#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