Commit Graph

302 Commits

Author SHA1 Message Date
Ruslan Ermilov
4d8bba465e Add a tool (and the first application of it) that could be used
to automate building of libraries.

Prodded by:	bde
2002-04-12 19:46:25 +00:00
Ruslan Ermilov
b2490f915f I now don't seem to be able to reproduce the -DNOCLEAN buildworld
breakage with ioctl.c.  The .depend file should track dependencies
just fine, and the worst we can have is to miss new ioctls.

But I still think it's a good idea to have -DNOCLEAN build produce
the same ioctl.c as it would without -DNOCLEAN.

Prodded for a long time by:	bde
2002-04-11 14:49:32 +00:00
Ruslan Ermilov
0445498680 Don't special case i386/pc98, replace it with the smarter logic
of setting ${TARGET} -- make it default to ${MACHINE} if we are
not cross-building, and ${TARGET_ARCH} otherwise.

Set MAKEOBJDIREPREFIX based on ${TARGET}, not on ${TARGET_ARCH}.
This is useful if you want to cross-build pc98 worlds on i386.
2002-04-11 13:43:50 +00:00
Ruslan Ermilov
66002be3e8 Avoid cleaning modules twice in `buildkernel'. 2002-04-08 15:11:29 +00:00
Ruslan Ermilov
e69e77782d Bootstrap xargs(1) -- sys/conf/kmod.mk uses the new -J option.
PR:		bin/36747
2002-04-08 07:40:41 +00:00
Ruslan Ermilov
56f2a75b76 Unbreak buildworld after include/Makefile,v 1.167 commit. 2002-04-04 06:49:46 +00:00
Josef Karthauser
1b88dfbd37 Back out lots of the last commit that was committed by accident.
(It's my test rig for some CVSUP,SUP code).

Spotted by:	Michael G. Petry <petry@NetMasters.Com>
2002-04-01 20:47:27 +00:00
Josef Karthauser
388f4c1dd0 Install libusbhid.h during 'make includes'.
Requested by:	jhb
MFC after:	3 days
2002-04-01 16:59:43 +00:00
Ruslan Ermilov
9f1207d517 Install sys/security/lomac/*.h to /usr/include/security/lomac/.
Install sys/<arch>/include/pc/*.h to /usr/include/machine/pc/.

PR:		docs/29534

Install sys/netatm/*/*.h to /usr/include/netatm/*/.

Don't install compatibility symlinks for <machine/soundcard.h>
and <machine/joystick.h>.  Three years is enough to be aware of
the change, and these weren't visible in the SHARED=symlinks
case.

Back out include/Makefile,v 1.160 that was a null change anyway
due to the bug in the path, and we now don't want to install
these headers because they would otherwise be invisible in the
SHARED=symlinks case.

Don't install IPFILTER headers.  Userland utilities fetch them
directly, and they were not visible in the SHARED=symlinks case.

Resurrect SHARED=symlinks in Makefile.inc1.

PR:		bin/28002

Prodded by:	bde
MFC after:	2 weeks
2002-03-26 16:05:14 +00:00
Ruslan Ermilov
bd42830f0f Make lint(1) a cross-tool.
(See commit log for usr.bin/xlint/Makefile,v 1.11 for what was wrong
with enabling build of lint libraries in rev. 1.12.)

This fixes cross-arch compiles (running binaries for a different arch
when generating lint.7 and lint libraries) and cross-branch compiles
(4.x -> 5.0 buildworld should be working again).
2002-03-20 18:25:50 +00:00
Ruslan Ermilov
7b7aae4225 Fixed the NO_PERL braino. 2002-03-20 09:39:16 +00:00
Mark Murray
5ad400ab91 Update for Perl 5.6.1 2002-03-16 21:41:09 +00:00
Mark Murray
9365c8a336 Allow the use of NO_PERL as well as NOPERL. The latter is going to
be removed.
2002-03-16 14:55:37 +00:00
David E. O'Brien
9c15e38ac2 1-true-AWK has a build-tool target. 2002-03-06 08:24:32 +00:00
Ruslan Ermilov
ea5c0da93b Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1
to pick up the correct cross-tools (the compiler executables and binutils)
and special linker files (crt*.o).  This is now controlled by a single knob,
TOOLS_PREFIX, when building cross-tools.

Fixed regression in Makefile.inc1,v 1.203 (-nostdinc).  This clobbered target
architecture's CFLAGS with building host's CPUTYPE setting in /etc/make.conf,
and had a nice but nasty side effect of exposing some (normally hidden) bugs
in system headers.

(Attempt to move the "-nostdinc -I..." part of CFLAGS into the new CINCLUDES
(modeled after a similar CXXINCLUDES) eventually failed because hard-coding
${WORLDTMP}/usr/include to be the first in the include list does not always
work, e.g. lib/libbind.)

Compensate the -nostdinc removal by making cpp(1) built in the cross-tools
stage to not look for <> header files in the building host's /usr/include
(already committed as gnu/usr.bin/cc/cc_tools/freebsd-native.h, revisions
1.10-1.12, STANDARD_INCLUDE_DIR).

: $ /usr/obj/usr/src/i386/usr/bin/cpp -v /dev/null
:
: Before:
:
: #include <...> search starts here:
:  /usr/obj/usr/src/i386/usr/include
:  /usr/include
: End of search list.
:
: After:
:
: #include <...> search starts here:
:  /usr/obj/usr/src/i386/usr/include
:  /usr/obj/usr/src/i386/usr/include

(Disabling the use of GCC_INCLUDE_DIR in the FREEBSD_NATIVE case would fix
the duplicate above.)

Get rid of the (now unneeded) -I${DESTDIR}/usr/include magic in bsd.prog.mk
and bsd.lib.mk.  Finish the removal of LDDESTDIR in bsd.lib.mk,v 1.55 -- we
no longer have users of it.

The required changes to gcc were already committed as contrib/gcc.295/gcc.c,
revisions 1.23 and 1.24.

Basically, this allows for the changes above plus makes gcc(1) persistent
about path configuration, whether it's configured as a native or a cross
compiler:

: $ /usr/obj/usr/src/i386/usr/bin/cc -print-search-dirs
: install: /usr/obj/usr/src/i386/usr/libexec/(null)
: programs: /usr/obj/usr/src/i386/usr/libexec/elf/:/usr/obj/usr/src/i386/usr/libexec/
: libraries: /usr/obj/usr/src/i386/usr/lib/
:
: $ /usr/obj/alpha/usr/src/i386/usr/bin/cc -print-search-dirs
: install: /usr/obj/alpha/usr/src/i386/usr/libexec/(null)
: programs: /usr/obj/alpha/usr/src/i386/usr/libexec/elf/:/usr/obj/alpha/usr/src/i386/usr/libexec/
: libraries: /usr/obj/alpha/usr/src/i386/usr/lib/

Reviewed by:	bde, obrien
2002-02-21 10:23:41 +00:00
Ruslan Ermilov
7a6051e857 The previous fix for broken -DMAKE_KERBEROS5 world was incomplete.
Finish it by adding kerberos5/lib/libvers to the build-tools list.

(I didn't notice it before because I tested my fix in a -DNOCLEAN
environment, and static libc.a was already in ${WORLDTMP}/usr/lib,
and libvers's make-print-version build tool used it for linking.)

Spotted by:	John Indra <maverick@office.naver.co.id>
2002-02-14 13:06:52 +00:00
Ruslan Ermilov
19f56da943 Fixed -DMAKE_KERBEROS5 world breakage in kerberos5/lib/libroken
(make-roken is a build tool).  This bug was hiding itself after
a just fixed bug in cross-linker (binutuils/ld/Makefile,v 1.20).

The bug was fatal for cross builds; for example, an alpha binary
(make-roken) was attempted to be run on i386.

Added make-roken to the list of build-tools in libasn1.  It only
worked because another build tool needs make-roken implicitly:

(build-tools: asn1_compile: print_version.o: roken.h: make-roken).

Spotted by:	nectar
2002-02-11 16:47:05 +00:00
Ruslan Ermilov
e47a40e7f7 Now that cross-tools ld(1) has been fixed to look for dynamic
dependencies in the correct place, record the fact that -lssh
depends on -lcrypto and -lz.

Removed false dependencies on -lz (except ssh(1) and sshd(8)).
Removed false dependencies on -lcrypto and -lutil for scp(1).

Reviewed by:	markm
2002-02-08 13:42:58 +00:00
Ruslan Ermilov
fac6ec1f62 FreeBSD 4.1 bootstrapping aid (setproctitle(3) is in -lutil).
This backs out (sort of) delta 1.18 to perl/miniperl/Makefile.
Update to the ld(1) comment by peter in this revision:

ld(1) built as part of the cross-tools stage of buildworld has
been fixed to look for dynamic dependencies in the right place,
${WORLDTMP}/usr/lib, effective binutils/ld/Makefile,v 1.20.

Approved by:	markm
2002-02-08 13:09:08 +00:00
Paul Richards
0f958c273a gnu/libexec has gone so remove it from the most targets. 2001-12-28 11:53:18 +00:00
Chris D. Faulhaber
d235a1a0d7 Specify the full path to mktemp 2001-12-23 22:49:06 +00:00
Chris D. Faulhaber
0525c7eafa Use a more secure method of creating the temporary
install directory.
2001-12-21 01:44:11 +00:00
Warner Losh
2694e8c7f4 Move NO_WERROR from CROSSENV to BMAKE. In CROSSENV it disables it for
the entire build.  We only want it for the bootstrap process.

Submitted by: ru
2001-12-13 17:00:59 +00:00
Warner Losh
68f04dad74 Add NO_WERROR to the cross building environment so that we do not bail on
warnings generated by earlier versions of the compilers when bootstrapping.

Also a minor formatting nit in the tools list.

Reviewed by: markm
2001-12-13 01:37:45 +00:00
Alexey Zelkin
5f4a79e5fe Get rid of unsed since rev 1.109 of lib/Makefile WANT_CSRG_LIBM define.
Also replace internal make variable _libm with hardcoded path to lib/msun

Reviewed by:	bde
2001-12-11 16:10:26 +00:00
John Baldwin
b69cb6342c Just to be pedantic and more aesthetically pleasing, move the secure/
top-level subdirectory prior to share/ so that the top-level directories
are processed in alphabetical order.
2001-12-06 07:44:47 +00:00
David E. O'Brien
09b50a9891 Add the CVS knob so it may be overridden (or have options added).
Submitted by:	Andrea Campi <andrea@webcom.it>
2001-11-19 17:43:29 +00:00
Makoto Matsushita
b721f69c14 Don't cleandir also if MODULES_WITH_WORLD.
MFC after:	3 days
2001-11-16 03:02:34 +00:00
Makoto Matsushita
acd9c8a8a1 Typo fix (my test version doesn't have this...) 2001-11-15 07:09:00 +00:00
Makoto Matsushita
6a798cfa81 Run "make cleandir" if NO_MODULES are set, or there is no sys/modules
directory.  Previous commit breaks buildkernel if NO_MODULES was set.
Sorry...

Noticed by: mike
2001-11-15 07:04:23 +00:00
Makoto Matsushita
4271dfbcdd "make cleandir" before building a kernel and modules.
This will hopefully fix the recent 'I cannot compile linux module with
buildworld' problem.  MFC will come shortly.

Submitted by:		imura@ryu16.org
2001-11-14 16:48:47 +00:00
Makoto Matsushita
2ec2294625 Set full-path of cvsup.
In src/Makefile rev 1.232, environment variable PATH is set explicitly
to /sbin:/bin:/usr/sbin:/usr/bin.  As a result, binaries located on
non-standard path cannot be executed without full-path (it's the change
of this revision).

However, cvsup is not in our base system -- you lose if you try to
"make update" without setting SUP in make.conf or command line argument.
I think it is safe to assume that cvsup is located at /usr/local/bin,
and it would help other people who first try to do "make update".

PR:		31932
MFC after:	1 day
2001-11-13 15:47:40 +00:00
David E. O'Brien
2335a3d70a Bring Gawk back. There just isn't any other POSIX compliant AWK out there.
The biggest thing missing from Bell-Labs AWK is the character class regexes.
2001-11-02 23:48:32 +00:00
David E. O'Brien
491beb71f3 Add 'awk' to the build-tools, so that the small utility used to build
one of the source files is made for the host, not target.
2001-11-01 06:14:42 +00:00
Ruslan Ermilov
444ff633bf Fix cross-building further.
Introduce ${TARGET} defaulting to ${MACHINE} which should be set to
whatever your target ${MACHINE} is, and use that with world-related
stages.  That is, to build pc98 on alpha, one now needs to set both
TARGET_ARCH=i386 and TARGET=pc98.

The scope of ${TARGET} is limited to Makefile.inc1 and cross-tools.

In particular, this change was tested to fix:

1.  Cross building of "alpha" on i386.  The breakage was introduced
    by rev. 1.10 to sbin/i386/Makefile (missing <machine/cronyx.h>).

2.  Descending into machine-specific subdirs for a different arch.
    Previously, sbin/i386 and usr.sbin/boot0cfg were descended into
    when cross-building "alpha" or pc98 on i386.

3.  Fixes pc98 cross-building which was horribly broken, caused by
    not setting MACHINE correctly (most ${MACHINE} == pc98 checking
    Makefiles put -DPC98 to CFLAGS).
2001-10-25 07:28:55 +00:00
Ruslan Ermilov
4448c79e47 Fix cross-building, etc:
1.  To cross-build, one now needs to set TARGET_ARCH, and not the
    MACHINE_ARCH.  MACHINE_ARCH should never be changed manually!

2.  Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
    and cross-tools stages.  This fixes broken header and library
    dependencies problem.  We build them in the host environment,
    and obviously want them to depend on host headers and libraries.
    The problem with broken header dependencies for bootstrap-tools
    and cross-tools was already partially solved (see BOOTSTRAPPING
    tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
    build-tools if the user ran "make world DESTDIR=/foo".  Also,
    for all of these stages, the library dependencies were broken
    because of how bsd.libnames.mk define DPADD members.

    We still provide a glue to install bootstrap- and cross-tools
    under the ${WORLDTMP}.

    Removed PATH overrides for bootstrap-, build-, and cross-tools
    stages.  There is just no reason why we would need to override
    it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
    case are no longer needed with fixes from this step.

    That is, we now never use ${WORLDTMP} headers and libraries,
    and we don't use any ${WORLDTMP} installed binaries during
    these stages.  Again, these stages depend solely on the host
    environment, including compiler, headers, and libraries.

3.  Moved "miniperl" back from cross-tools (it has nothing to do
    with a cross-compiler) to build-tools where it belongs.  The
    change from step 1 let to do this.  Also, to make this work,
    build-tools targets of "cc_tools" and "miniperl" were modified
    to call "depend".  Here follow the detailed explanations.

    There are two categories of build tools, for now.  In the first
    category there are "cc_tools" and "miniperl".  They occupy the
    whole (sub)directory, and nothing needs to be done in this
    subdirectory later during the "all" stage.  They are also
    constructed using system makefiles.  We must build the .depend
    early in the build-tools stage because:

    1)  They use (and depend on) the host environment.

    2)  If we don't do this in build-tools, the "depend" stage of
        buildworld will do this for us; wrong library and header
        dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
        what's worse, the "all" stage may then clobber the
        build-architecture format tools (that we built in the
        build-tools stage) with the target-architecture format
        ones, breaking cross build.

    In the second category there are all other build-tools.  They
    share their directory with the "main" module that needs them
    in the "all" stage, and they don't show up themselves in the
    .depend file.  The portion of this fix was already committed
    in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.

4.  "libperl" is no longer a build tool, and "miniperl" is the
    stand-alone application.  I had to make this change because
    build-tools and "all" stages share the same object directory.
    Without this change, if we cross compile, libperl.a is first
    built for the build architecture during the build-tools stage
    (for the purposes of immediate linkage with "miniperl").
    Later on, the "all" stage sees this library as up-to-date,
    and doesn't rebuild it.  The effect is that the wrong format
    static libperl library is installed with installworld.

5.  Fixed "includes" to install secure/lib/libtelnet headers if
    required.

Reviewed by:	bde
2001-09-29 13:17:54 +00:00
Ruslan Ermilov
b4e13f7b2b Removed touch(1) from the list of installworld tools that
was added in previous revision for no apparent reason.

Submitted by:	bde
2001-09-25 12:17:52 +00:00
Mark Murray
9356546b0a Add which(1) the stuff that we need early on. The perl build needs it
to find miniperl.
2001-09-20 12:24:10 +00:00
Ruslan Ermilov
a1e0e968b7 Run the bootstrap-tools' and cross-tools' stages with BOOTSTRAPPING
flag defined.  This replaces the WORLD flag that got lost in revision
1.96.
2001-09-17 11:50:36 +00:00
Bruce Evans
02d4de1533 Fixed world breakage. mkdir was not copied to ${INSTALLTMP}, but it is
used by src/include/Makefile in the SHARED=symlinks case.
2001-08-29 09:11:03 +00:00
Paul Richards
934372e226 Change the name of KRNLDEFDIR to KERNCONFDIR.
Suggested by Bruce, since the latter is more acceptable for a variable
that is externally visible.

Fix a style nit with a long line.
2001-08-27 12:01:46 +00:00
Paul Richards
f981dd25d1 Add a variable KRNLDEFDIR that specifies where to find the kernel
config files.

It defaults to KRNLCONFDIR.
2001-08-26 18:39:07 +00:00
Mark Murray
a1a21b0eb7 More libss removal. 2001-08-26 17:47:21 +00:00
Mark Murray
e2e0201cf6 Adjust dependancies; now that a PAM module (pam_unix) can change
NIS passwords, libpam needs rpc dependancies.
2001-08-26 17:45:56 +00:00
Kris Kennaway
4870a3d346 Say goodbye to libss, which somehow managed to crouch hidden in the tree
for long after it was used.
2001-08-19 21:32:52 +00:00
David E. O'Brien
1687fcd346 Use a build-tool to create the .mgc files.
Submitted by:	ru (partial)
Obtained from:	NetBSD (basic idea)
Reviewed by:	bde, ru
2001-08-17 17:21:38 +00:00
Thomas Moestl
c4a5ef6ef3 Add some features to libdevstat, and overhaul the interface a bit:
1.) prefix all functions in the library with devstat_ (compatability
    functions are available for all functions that were chaned in an
    incompatible way, but are deprecated).
2.) Add a pointer to a kvm_t as the first argument to functions that
    used to get their information via sysctl; they behave the same
    as before when NULL is passed as this argument, otherwise, the
    information is obtained via libkvm using the supplied handle.
3.) Add a new function, devstat_compute_statistics(), that is intended
    to replace the old compute_stats() function. It offers more
    statistics data, and has a more flexible interface.

libdevstat does now require libkvm; a library depedency is added, so
that libkvm only needs to be explicitely specified for statically linked
programs.
The library major version number is bumped.

Submitted by:	Sergey A. Osokin <osa@freebsd.org.ru>, ken (3)
Reviewed by:	ken
2001-08-04 18:25:48 +00:00
Dima Dorfman
7bd0b86765 Enable the new libmp in the build, and disable libgmp and its
henchmen.
2001-07-29 08:58:22 +00:00
Mark Murray
132463cacb Axe S/Key. OPIE is the true and faithful successor. 2001-07-09 17:49:34 +00:00
Peter Wemm
9488e5f340 Part 2 of gensetdefs de-orbit burn. linker sets are now self contained
for ELF, see src/sys/linker_set.h log.
2001-06-14 01:35:23 +00:00
Ruslan Ermilov
d531238a37 WARNS= is fully functional again. 2001-06-13 15:18:11 +00:00
Ruslan Ermilov
8411c946f5 - Restore -nostdinc that got lost in rev.1.105; we don't
want host headers during `buildworld'.

- During `buildworld', install headers in a "copy" mode
  until we decide what to do with the (currently broken)
  SHARED=symlinks.

- Temporarily run `buildworld' with -DNO_WERROR, which
  effectively disabled the -Werror bit of recently added
  WARNS=X feature.  This is required because adding the
  -nostdinc bit back revealed bugs in some header files
  that were hiding after not using -nostdinc.
  It is unclear currently how exactly (and why) -nostdinc
  affects gcc(1) warnings.
2001-06-11 18:09:08 +00:00
Ruslan Ermilov
3f628ce112 Bootstrap install(1). 2001-05-28 16:54:02 +00:00
Ruslan Ermilov
a24874dccd Add kbdcontrol(1) to bootstrap-tools.
This fixes the upgrade path breakage in usr.sbin/sysinstall.
2001-05-14 17:21:02 +00:00
Jeroen Ruigrok van der Werven
19a271529e Remove xlint from build-tools. This needs to be fixed in a different way. 2001-04-26 17:54:24 +00:00
Jeroen Ruigrok van der Werven
1048d3c9eb Add usr.bin/xlint to build-tools. 2001-04-24 20:19:29 +00:00
Gregory Neil Shapiro
0a51d0d9fd ${MAKEOBJDIRPREFIX}/usr/src/i386/usr/include/isc was being created as a plain
file during the bootstrapping process of a buildworld and contained the
last isc include file to be installed.  It was meant to be a directory for
the isc include files.
2001-04-24 02:57:42 +00:00
Ruslan Ermilov
d8d4bc9ab4 Add groff to bootstrap-tools. 2001-04-18 12:20:28 +00:00
Kenneth D. Merry
3393f8daa3 Rewrite of the CAM error recovery code.
Some of the major changes include:

	- The SCSI error handling portion of cam_periph_error() has
	  been broken out into a number of subfunctions to better
	  modularize the code that handles the hierarchy of SCSI errors.
	  As a result, the code is now much easier to read.

	- String handling and error printing has been significantly
	  revamped.  We now use sbufs to do string formatting instead
	  of using printfs (for the kernel) and snprintf/strncat (for
	  userland) as before.

	  There is a new catchall error printing routine,
	  cam_error_print() and its string-based counterpart,
	  cam_error_string() that allow the kernel and userland
	  applications to pass in a CCB and have errors printed out
	  properly, whether or not they're SCSI errors.  Among other
	  things, this helped eliminate a fair amount of duplicate code
	  in camcontrol.

	  We now print out more information than before, including
	  the CAM status and SCSI status and the error recovery action
	  taken to remedy the problem.

	- sbufs are now available in userland, via libsbuf.  This
	  change was necessary since most of the error printing code
	  is shared between libcam and the kernel.

	- A new transfer settings interface is included in this checkin.
	  This code is #ifdef'ed out, and is primarily intended to aid
	  discussion with HBA driver authors on the final form the
	  interface should take.  There is example code in the ahc(4)
	  driver that implements the HBA driver side of the new
	  interface.  The new transfer settings code won't be enabled
	  until we're ready to switch all HBA drivers over to the new
	  interface.

src/Makefile.inc1,
lib/Makefile:		Add libsbuf.  It must be built before libcam,
			since libcam uses sbuf routines.

libcam/Makefile:	libcam now depends on libsbuf.

libsbuf/Makefile:	Add a makefile for libsbuf.  This pulls in the
			sbuf sources from sys/kern.

bsd.libnames.mk:	Add LIBSBUF.

camcontrol/Makefile:	Add -lsbuf.  Since camcontrol is statically
			linked, we can't depend on the dynamic linker
			to pull in libsbuf.

camcontrol.c:		Use cam_error_print() instead of checking for
			CAM_SCSI_STATUS_ERROR on every failed CCB.

sbuf.9:			Change the prototypes for sbuf_cat() and
			sbuf_cpy() so that the source string is now a
			const char *.  This is more in line wth the
			standard system string functions, and helps
			eliminate warnings when dealing with a const
			source buffer.

			Fix a typo.

cam.c:			Add description strings for the various CAM
			error status values, as well as routines to
			look up those strings.

			Add new cam_error_string() and
			cam_error_print() routines for userland and
			the kernel.

cam.h:			Add a new CAM flag, CAM_RETRY_SELTO.

			Add enumerated types for the various options
			available with cam_error_print() and
			cam_error_string().

cam_ccb.h:		Add new transfer negotiation structures/types.

			Change inq_len in the ccb_getdev structure to
			be "reserved".  This field has never been
			filled in, and will be removed when we next
			bump the CAM version.

cam_debug.h:		Fix typo.

cam_periph.c:		Modularize cam_periph_error().  The SCSI error
			handling part of cam_periph_error() is now
			in camperiphscsistatuserror() and
			camperiphscsisenseerror().

			In cam_periph_lock(), increase the reference
			count on the periph while we wait for our lock
			attempt to succeed so that the periph won't go
			away while we're sleeping.

cam_xpt.c:		Add new transfer negotiation code.  (ifdefed
			out)

			Add a new function, xpt_path_string().  This
			is a string/sbuf analog to xpt_print_path().

scsi_all.c:		Revamp string handing and error printing code.
			We now use sbufs for much of the string
			formatting code.  More of that code is shared
			between userland the kernel.

scsi_all.h:		Get rid of SS_TURSTART, it wasn't terribly
			useful in the first place.

			Add a new error action, SS_REQSENSE.  (Send a
			request sense and then retry the command.)
			This is useful when the controller hasn't
			performed autosense for some reason.

			Change the default actions around a bit.

scsi_cd.c,
scsi_da.c,
scsi_pt.c,
scsi_ses.c:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.  Selection
			timeouts shouldn't be covered by a sense flag.

scsi_pass.[ch]:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.

			Get rid of the last vestiges of a read/write
			interface.

libkern/bsearch.c,
sys/libkern.h,
conf/files:		Add bsearch.c, which is needed for some of the
			new table lookup routines.

aic7xxx_freebsd.c:	Define AHC_NEW_TRAN_SETTINGS if
			CAM_NEW_TRAN_CODE is defined.

sbuf.h,
subr_sbuf.c:		Add the appropriate #ifdefs so sbufs can
			compile and run in userland.

			Change sbuf_printf() to use vsnprintf()
			instead of kvprintf(), which is only available
			in the kernel.

			Change the source string for sbuf_cpy() and
			sbuf_cat() to be a const char *.

			Add __BEGIN_DECLS and __END_DECLS around
			function prototypes since they're now exported
			to userland.

kdump/mkioctls:		Include stdio.h before cam.h since cam.h now
			includes a function with a FILE * argument.

Submitted by:	gibbs (mostly)
Reviewed by:	jdp, marcel (libsbuf makefile changes)
Reviewed by:	des (sbuf changes)
Reviewed by:	ken
2001-03-27 05:45:52 +00:00
Ruslan Ermilov
aeebb4e76d Add missing NOSECURE check for `includes' target.
Reviewed by:	markm
2001-03-26 12:46:17 +00:00
Ruslan Ermilov
d9d1a7bb94 Enhancement to 1.99 -> 1.100.
Avoid EPERM from ln(1) in a different (proper) way.
2001-03-22 09:54:25 +00:00
Ruslan Ermilov
afcf05e46a setlocale(3) has been fixed to match POSIX standard:
LC_ALL takes precedence over other LC_* envariables.
2001-03-02 16:52:14 +00:00
John Baldwin
7de7569f50 MACHINE_ARCH is the target arch to crossbuild to, not TARGET_ARCH.
Requested by:	marcel
2001-02-22 22:58:24 +00:00
John Baldwin
682d4db4c8 Document TARGET_ARCH. 2001-02-22 08:27:17 +00:00
Bruce Evans
58445af0f8 Removed some garbage (genassym(8) and its infrastructure). 2001-02-17 06:06:14 +00:00
Mark Murray
c1f3d84722 Fix make world. 2001-02-14 19:48:51 +00:00
Peter Wemm
2f74661cc7 Provide backwards compatable recognition of ${KERNEL}. You should be
able to use KERNEL= again with buildkernel, but it will point you at
KERNCONF= and press on regardless.
2001-01-23 09:52:50 +00:00
Peter Wemm
6d84d742df Sigh, I thought we still had the rm -rf objdir stuff in make world, which
would have taken care of the possibility of buildkernel crossing over
from one binutils set to another.  Back out the part about turning off
'make clean' if the 'make depend' is still active, but add a NO_KERNELCLEAN
target instead that works like NOCLEAN but just for the kernel.
2001-01-22 23:29:13 +00:00
Peter Wemm
51dfb94794 Use 'make clean' instead of 'config -r', and only if the 'depend' step has
been skipped.  We went to a lot of trouble to make the 'blow away' stage
unneeded, and it has not been needed for quite some time.
2001-01-22 23:10:01 +00:00
Warner Losh
5963db0f2e As threatened in hackers@ on Friday, obviate the need for a buildworld
to preceed a buildkernel.

The buildworld is still required when upgrading across major releases,
across binutil upgrades and when config changes version.  If
buildkernel breaks, and you haven't done a buildworld, then do not
complain unless you do a buildworld and it still breaks.
2001-01-22 08:07:58 +00:00
Peter Wemm
c1ae5e3dce Using "KERNEL" for buildkernel was a very very bad mistake. $KERNEL is
already used by the kernel makefiles themselves, and this leads to a lot
of trouble when people put "KERNEL=MYKERNEL" in make.conf.  Bite the bullet
and change it to KERNCONF instead, before it gets too far entrenched.

The kernel Makefiles use ${KERNEL} as the name of what to install the
kernel as, eg: /boot/${KERNEL}/kernel or /${KERNEL}.  This leads to much
unhappiness with things like /LOCAL instead of /kernel.  buildkernel is
severely limited as it is only useful directly after a buildworld.

Reviewed by: jhb
2001-01-22 07:29:48 +00:00
Jordan K. Hubbard
c80a5c4c6e Also add some timing information for kernel builds so that it's
easy to do "make world kernel |grep -e '^>>>'" and get a complete
event log.
2001-01-21 23:44:41 +00:00
Peter Wemm
26379603c0 Create a build-tools target for sysinstall and rtermcap. This is still
not right because rtermcap would be reading the *host* termcap, not
from the termcap in the src tree.  Besides, /usr/sbin/sysinstall
(not the crunched one in /stand) should use the runtime termcap
not the precompiled set.
2001-01-19 09:24:00 +00:00
KATO Takenori
3e530495b9 Removed pc98-hack of aout tools. 2000-12-24 14:58:34 +00:00
Marcel Moolenaar
d6deedefeb Fix cross-building once again.
Forgotten by: ache
2000-12-03 20:29:31 +00:00
Marcel Moolenaar
0a0743b52a Fix release, broken by the perl cross-build fixes.
The distribute target is basicly the same as an install. For
perl, this means that miniperl is needed. Since miniperl is
only present in the object directory, we need to make sure
the path is set correctly. To do this, we have make release
use a new distribworld target that sets the path before doing
a make distribute.
2000-11-21 04:37:30 +00:00
Marcel Moolenaar
ad879ce955 Fix cross-building.
o  Move building libperl and miniperl from build-tools to
   cross-tools. libperl uses MACHINE_ARCH to determine the
   right configuration, which doesn't match the build
   machine when cross-building if they are built as build-
   tools.
o  Since miniperl needs to be built as a cross-tool, it
   needs to be installed under /usr/obj so that it can be
   used (cross-tools have a special object directory to
   avoid build conflicts. As a downside, you can't easily
   run cross-tools from their object directory). Remove
   the install and distribute override targets. To avoid
   having miniperl installed by installworld, remove it
   from SUBDIR.
o  We can't pickup miniperl from the object directory but
   since it's installed, depend on PATH. This is save,
   because the makefiles are run with a known path.
o  Build libperl again as part of the library target. A
   _libperl variable existed, but it was never defined.
o  Add chmod to the list of saved tools, because perl
   conditionally uses it during install.

The bootstrap-tools and cross-tools targets are modified to
avoid building profiled and shared libraries. While here,
have these targets build static binaries instead of shared
binaries.

Approved by: markm
2000-11-20 02:17:34 +00:00
David E. O'Brien
cb6f68576a libgcc now needs to be built earlier in the build.
Submitted by:	jdp
2000-11-10 22:02:06 +00:00
David E. O'Brien
ae7c8a2bb8 * Bring back the guts of crt{i,n}.S. This allows C++ exceptions to work
when using the egcs and gcc-devel ports, along with GCC built from stock
public FSF sources.  With out this change, FreeBSD will be removed from
the list of systems GCC 3.0 must be evaluated on before release.  With
the effort some of us put into getting FreeBSD on this list, we should
not turn this effort into a waste, else we might not be worth fighting
for in the future.  (note that Alpha and IA-64 versions of crt{i,n}.S
are needed)

* Switch from our own crt{begin,in} to those created from GCC's crtstuff.c.
This will allow us to switch to DWARF2 exceptions in the future, along with
staying in sync with any future GCC requirements.

* Break out our ELF branding bits into a seperate file.  Currently this
is now included by our crt1.c files (since this functionality was part of
our native crtbegin.c).  Later crtbrand.o will be merged in the creation
of crti.o.
2000-10-28 21:26:48 +00:00
Joseph Koshy
a62264fb74 Fail the 'buildkernel' target if not even one of the specified kernel configuration
files was found.

Reviewed by:	obrien
2000-10-25 04:31:32 +00:00
David E. O'Brien
13387c45eb Number the stages in the documentation to match what is printed out when
running.
2000-10-13 01:19:36 +00:00
Justin T. Gibbs
18ebc2eaa1 This is really gross.
If a user decides to forego a make depend during "make buildkernel",
they should get what they deserve if no previous make depend has
been run for that kernel.  Instead, the build process includes
special instructions to unconditionally rebuild aicasm.  When aicasm
moved to its own directory, this hack broke.

Correct the hack until a get buy off on killing it.
2000-09-18 03:35:49 +00:00
Warner Losh
66bea2a025 Add reinstallkernel target. Does same thing as installkernel, but
executes the reinstall target rather than the install target that
installkernel does.
2000-09-17 21:02:58 +00:00
Dag-Erling Smørgrav
a3f02cc072 Include libfetch in the includes target. 2000-09-09 14:37:06 +00:00
Peter Wemm
1b73d196cb USA_RESIDENT is no longer required for buildworld, do not force it. 2000-09-09 04:42:34 +00:00
David E. O'Brien
ae78d52fe5 Allow one to specify what the installed kernel's name is by setting
"INSTKERNNAME".

Reviewed by:	marcel
2000-09-03 02:58:39 +00:00
Josef Karthauser
6fd0f27267 Define SUPHOST. If this is set a '-h ${SUPHOST}' is added to the
SUPFLAGS when a 'make update' is run.  This means that the supfile
doesn't need to be edited because the -h will override the
CHANGE_THIS.FreeBSD.org host.
2000-08-13 12:36:40 +00:00
Sheldon Hearn
ef10227633 Make the update target consistent; both ports and doc are updated
if their SUPFILE variables are defined _and_ NO_PORTSUPDATE and
NO_DOCUPDATE respectively are not defined.

Previously, only ports was updated and there was no way to prevent
this without undefining its SUPFILE variable.

PR:		17514
Reported by:	Udo Erdelhoff <ue@nathan.ruhr.de>
2000-08-07 14:35:49 +00:00
Marcel Moolenaar
f7ff24ef81 Fix buildkernel and installkernel when KERNEL is defined in
/etc/make.conf.

PR: 20325
Submitted by: Johan Karlsson <k@numeri.campus.luth.se>
2000-08-03 05:52:22 +00:00
Marcel Moolenaar
a5061fba1f Argh... mtree has been removed from the bootstrap-tools. In that
case we need to save it in installworld. That latter I forgot...

Pointy hat: me
2000-07-23 21:30:35 +00:00
Marcel Moolenaar
dce97721ea Name all kernels 'kernel'. This fixes the incompatible behaviour
of the buildkernel and installkernel targets where the kernel
was called after the config name.

While here, fix the brokenness of the installkernel target. It
used to use ${IMAKEENV}, but since that has a very restricted
PATH, it couldn't find make(1). Use ${CROSSENV} instead.
2000-07-23 17:38:32 +00:00
Marcel Moolenaar
fa90cca2fc Remove mtree for bootstrap-tools. The -L switch change has been
backed out.
2000-07-23 16:43:03 +00:00
Marcel Moolenaar
a0982e9309 Don't save cp(1) in installworld. Its use has been replaced by
a use of install.
2000-07-23 00:20:56 +00:00
Marcel Moolenaar
eb263e0408 Add awk and wc to the list of copied binaries for the installworld
target. These are needed by liloldr.

Found by: make release
2000-07-20 03:03:23 +00:00
Marcel Moolenaar
39b909dad3 Add cp(1) to the list of binaries we need to save. The cp(1) command
is used by the installation of ld-elf.so when an existing version
exists.
2000-07-19 22:48:52 +00:00
Marcel Moolenaar
2e826432aa Don't save install-info. We already have that built. We'll use
the one we built anyway.
2000-07-19 18:18:21 +00:00
Marcel Moolenaar
767ab900c6 Save any binaries we use by installworld, so that we won't use the
binaries we just installed. This allows a future upgrade target to
install a new system without intermediate reboots and also
prevents conflicts for parallel make runs where we might exec a
binary that's being installed at the same time.
2000-07-19 04:41:59 +00:00
Andrey A. Chernov
7d66a72a06 Move mtree to bootstrap-tools and add PATH=${TMPPATH} to IMAKEENV to pick it 2000-07-18 01:49:05 +00:00
Andrey A. Chernov
199b3e8349 Add mtree to cross-tools to make it updated for new -L option
It must solve make world breakage
2000-07-18 00:21:05 +00:00
Mark Murray
58804eace2 Perl's version number needs to change. 2000-07-02 16:15:03 +00:00