freebsd kernel with SKQ
Go to file
Ruslan Ermilov 0f399181d3 Further fix the case mentioned in rev. 1.302. The
intent was (and still is) that if a user has say
CPUTYPE=i686 set in /etc/make.conf, we don't print
the assignment type warning unless TARGET_CPUTYPE
is overridden.

Unfortunately, the implementation was buggy, and
only recent changes to bsd.cpu.mk that swapped
canonical and alias values of some CPU types made
the bug apparent.

Here's what happens here.

- CPUTYPE=i686 is set in /etc/make.conf,
- bsd.cpu.mk reset it to "pentiumpro",
- Makefile.inc1 compares this canonical value
  with the result of the following test,

make -f /dev/null CPUTYPE=pentiumpro -V CPUTYPE

and expects the result to be "pentiumpro" too,
but "i686" is returned, here's why.  We have two
CPUTYPE variables, global, set to "i686" in
/etc/make.conf, and command-line (of a higher
precedence), set to "pentiumpro".

The following part of bsd.cpu.mk,

.  elif ${CPUTYPE} == "i686"
CPUTYPE = pentiumpro

which is responsible for converting aliases to
canonical values, sees the value of the CPUTYPE
command-line variable first, "pentiumpro", and
no conversion is done -- the net effect is that
CPUTYPE global stays with its old value "i686",
and "make -V CPUTYPE" (which prints variables
in the global context) returns "i686".

The fix was to pass the CPUTYPE in the test above
as an environment variable instead of as a command
line variable, i.e.,

CPUTYPE=pentiumpro make -f /dev/null -V CPUTYPE

This time, CPUTYPE global is still set to "i686"
initially (by /etc/make.conf), and an envieronment
variable CPUTYPE (of a lower precedence) is set
to "pentiumpro".  The .elif sees it's set to
"i686" and resets it to "pentiumpro", and so
"make -V" returns "pentiumpro".

NB: these various types of make(1) variables can
be very painful, especially when combined with
"make -V".
2004-12-22 22:00:01 +00:00
bin Remove single line containing the word "KLD" ommitted in ps.1:1.80. 2004-12-22 09:04:47 +00:00
contrib NOINET6 -> NO_INET6 2004-12-21 10:49:29 +00:00
crypto Better Xlist command line. 2004-10-28 16:13:28 +00:00
etc NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
games NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
gnu NOHTML -> NO_HTML 2004-12-21 12:05:11 +00:00
include Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
kerberos5 NODOCCOMPRESS -> NO_DOCCOMPRESS 2004-12-21 09:33:47 +00:00
lib Correct speling erors. 2004-12-22 17:31:28 +00:00
libexec NOPAM -> NO_PAM 2004-12-21 12:49:24 +00:00
release NOPAM -> NO_PAM 2004-12-21 12:49:24 +00:00
rescue NOINET6 -> NO_INET6 2004-12-21 10:49:29 +00:00
sbin 'forget' command takes device names, not provider names. 2004-12-22 17:50:44 +00:00
secure NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
share And this, kids, is what happens if you act on a patch without looking 2004-12-21 20:02:50 +00:00
sys Add send buffer locking to uipc_send(). Without this locking a race can 2004-12-22 20:28:46 +00:00
tools Wait a bit after creating device. 2004-12-21 19:03:10 +00:00
usr.bin Look into machine-specific manpage subdirectories too. 2004-12-22 16:04:58 +00:00
usr.sbin Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid 2004-12-22 08:26:48 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
MAINTAINERS add myself as the contact for the pkg_install tools 2004-11-30 20:04:47 +00:00
Makefile NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Makefile.inc1 Further fix the case mentioned in rev. 1.302. The 2004-12-22 22:00:01 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Note requirement to manually load/configure ancillary wlan modules. 2004-12-20 04:27:23 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html