Commit Graph

90220 Commits

Author SHA1 Message Date
mrg
73824b4903 link /sbin/disklabel, and copy dhclient-script in as well (dhclient was already included, just not available) 2002-01-01 08:01:58 +00:00
mrg
4ea659d3c8 add a checkflist-x11 target 2002-01-01 07:59:32 +00:00
mrg
efaa45dd2e add clcd device support, plus document magma support. 2002-01-01 07:55:26 +00:00
thorpej
b1b955b60f Simply rid ourselves of the evil cpp tricks being done here. The
fact that one version couldn't be made to work on two different versions
of the cpp says something about how portable the code was.
2002-01-01 06:31:49 +00:00
thorpej
2135cbaadd Oops, this is NOT a C++ program. 2002-01-01 05:16:18 +00:00
thorpej
d2453f69b1 Remove the call to abort(). We don't pull in a prototype for it,
and there's no sane way to do so.
2002-01-01 01:58:01 +00:00
thorpej
4c0be6ef79 If HAVE_GCC3 is set, force MKLINT to "no", since GCC 3.x's C pre-processor
does not yet support our lint(1).
2002-01-01 01:44:29 +00:00
thorpej
d68ee9d8e3 Per a suggestion from matthew green, PROG_CXX takes the place of
PROG for C++ programs.
2002-01-01 01:38:25 +00:00
thorpej
d605da06f0 %progbits, not @progbits (@ is a comment character in ARM assembly). 2002-01-01 01:36:21 +00:00
thorpej
7050ac9aa9 Multi-line string literals are not supported by ANSI C. 2002-01-01 01:31:06 +00:00
thorpej
c32d4e9692 Don't set NOPROFILE for x86-64. 2002-01-01 01:17:32 +00:00
thorpej
5ced70565e Set ELFSIZE=64. 2002-01-01 01:14:22 +00:00
thorpej
48a03ed537 Document PROG_CXX and HAVE_GCC3. 2002-01-01 00:34:26 +00:00
thorpej
a156b86123 Set PROG_CXX since these are C++ programs. 2002-01-01 00:27:33 +00:00
thorpej
04520355fe * If PROG_CXX is set by the program's Makefile, use ${CXX} to link
the program rather than ${CC}.
* If HAVE_GCC3 is defined, pull in "-lstdc++ -lm" as additional C++
  support libraries for DESTDIR builds.
2002-01-01 00:27:06 +00:00
thorpej
3b7fb63d99 Document MKBFD, MKGDB, MKGCC. 2001-12-31 23:11:05 +00:00
thorpej
1c95f6c025 * Remove -Wno-format -fno-builtin from CFLAGS in the x86-64 case.
* Default MKBFD, MKGDB, and MKGCC to "yes".  Set them to "no" for
  x86-64.
2001-12-31 23:06:34 +00:00
thorpej
89b1a9ca73 Introduce 3 new MK* variables that have effect in the USE_NEW_TOOLCHAIN
case:

	MKBFD	If set to "no", disables building of libbfd, libiberty,
		and all things that depend on them (binutils/gas/ld, gdb,
		dbsym, mdsetimage).

	MKGDB	If set to "no", disables bulding of gdb.

	MKGCC	If set to "no", disables building of gcc and the
		gcc-related libraries (libg2c, libgcc, libobjc, libstdc++).

These are useful for building platforms for which either of the following
situations are true:

	(1) You have no userland from which to run toolchain2netbsd
	    in order to build the appropriate toolchain build framework.

	(2) The platform which you are building requires a newer set
	    of tools than are currently in the tree (e.g. x86-64, ia64).
2001-12-31 23:04:11 +00:00
thorpej
88371dafeb We can't currently build a toolchain for x86-64 here, so don't
attempt to do so.
2001-12-31 22:35:41 +00:00
chs
43973be0c5 introduce a new UVM fault type, VM_FAULT_WIREMAX. this is different
from VM_FAULT_WIRE in that when the pages being wired are faulted in,
the simulated fault is at the maximum protection allowed for the mapping
instead of the current protection.  use this in uvm_map_pageable{,_all}()
to fix the problem where writing via ptrace() to shared libraries that
are also mapped with wired mappings in another process causes a
diagnostic panic when the wired mapping is removed.

this is a really obscure problem so it deserves some more explanation.
ptrace() writing to another process ends up down in uvm_map_extract(),
which for MAP_PRIVATE mappings (such as shared libraries) will cause
the amap to be copied or created.  then the amap is made shared
(ie. the AMAP_SHARED flag is set) between the kernel and the ptrace()d
process so that the kernel can modify pages in the amap and have the
ptrace()d process see the changes.  then when the page being modified
is actually faulted on, the object pages (from the shared library vnode)
is copied to a new anon page and inserted into the shared amap.
to make all the processes sharing the amap actually see the new anon
page instead of the vnode page that was there before, we need to
invalidate all the pmap-level mappings of the vnode page in the pmaps
of the processes sharing the amap, but we don't have a good way of
doing this.  the amap doesn't keep track of the vm_maps which map it.
so all we can do at this point is to remove all the mappings of the
page with pmap_page_protect(), but this has the unfortunate side-effect
of removing wired mappings as well.  removing wired mappings with
pmap_page_protect() is a legitimate operation, it can happen when a file
with a wired mapping is truncated.  so the pmap has no way of knowing
whether a request to remove a wired mapping is normal or when it's due to
this weird situation.  so the pmap has to remove the weird mapping.
the process being ptrace()d goes away and life continues.  then,
much later when we go to unwire or remove the wired vm_map mapping,
we discover that the pmap mapping has been removed when it should
still be there, and we panic.

so where did we go wrong?  the problem is that we don't have any way
to update just the pmap mappings that need to be updated in this
scenario.  we could invent a mechanism to do this, but that is much
more complicated than this change and it doesn't seem like the right
way to go in the long run either.

the real underlying problem here is that wired pmap mappings just
aren't a good concept.  one of the original properties of the pmap
design was supposed to be that all the information in the pmap could
be thrown away at any time and the VM system could regenerate it all
through fault processing, but wired pmap mappings don't allow that.
a better design for UVM would not require wired pmap mappings,
and Chuck C. and I are talking about this, but it won't be done
anytime soon, so this change will do for now.

this change has the effect of causing MAP_PRIVATE mappings to be
copied to anonymous memory when they are mlock()d, so that uvm_fault()
doesn't need to copy these pages later when called from ptrace(), thus
avoiding the call to pmap_page_protect() and the panic that results
from this when the mlock()d region is unlocked or freed.  note that
this change doesn't help the case where the wired mapping is MAP_SHARED.

discussed at great length with Chuck Cranor.
fixes PRs 10363, 12554, 12604, 13041, 13487, 14580 and 14853.
2001-12-31 22:34:39 +00:00
thorpej
6ca57419d1 Labels must be followed by statements. 2001-12-31 22:07:58 +00:00
thorpej
f9df4d877e Avoid an "unmamed fields" warning (gcc 3.1). 2001-12-31 22:06:47 +00:00
thorpej
17da611b51 Fix a "pointers are not permitted as case values" gcc 3.1 warning. 2001-12-31 21:55:46 +00:00
thorpej
fdb5b56e5f Do not compare an integer to NULL. 2001-12-31 21:37:22 +00:00
thorpej
aedf82267c Move the declaration of an enum to avoid an "unnamed field not allowed"
warning in gcc 3.1.
2001-12-31 21:30:01 +00:00
chs
23c75a9a98 in uvm_map_clean(), add PGO_CLEANIT to the flags passed to an object's pager.
we need to make sure that vnode pages are written to disk at least once,
otherwise processes could gain access to whatever data was previously stored
in disk blocks which are freshly allocated to a file.
2001-12-31 20:34:01 +00:00
thorpej
9e94d2a9fe When compiling for userland, need <stdlib.h> for abort() prototype
(noticed by gcc 3.1).
2001-12-31 20:20:28 +00:00
thorpej
57a44a3d17 Need <string.h> for memcpy() prototype (noticed by gcc 3.1). 2001-12-31 20:19:14 +00:00
thorpej
ed2b20a87a Need <stdlib.h> for exit() prototype (noticed by gcc 3.1). 2001-12-31 20:16:34 +00:00
thorpej
19a95cad9c Fix warnings generated by gcc 3.1. 2001-12-31 20:09:53 +00:00
thorpej
6b3e0a100a Remove -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/openssl
from CPPFLAGS.
2001-12-31 20:04:47 +00:00
thorpej
bf0e32f7fc Remove unneeded/unused TREE_ISEMPTY() (which also happens to clash
with the TREE_ISEMPTY() in menutree.h, which gcc 3.1 correctly warns
about).
2001-12-31 20:00:40 +00:00
thorpej
c31bd4704c Fix gcc 3.1 printf format warnings generated by extra arguments being
passed to varargs CPP macros.
2001-12-31 19:52:45 +00:00
thorpej
dbaa175ee7 Add comment delimiters around the token after an #endif 2001-12-31 19:46:57 +00:00
thorpej
1b1d20a895 Need <strings.h> for ffs() prototype (noticed by gcc 3.1). 2001-12-31 19:45:03 +00:00
thorpej
aa38e62655 Need <stdlib.h> for abort() prototype (noticed by gcc 3.1). 2001-12-31 19:44:27 +00:00
thorpej
82f66ec4a0 Add -I${.CUDRIR} to CPPFLAGS. 2001-12-31 19:41:37 +00:00
thorpej
429c29847e Statements must follow labels. 2001-12-31 19:33:58 +00:00
thorpej
d5b972580e Need <string.h> for strcmp() prototype (noticed by gcc 3.1). 2001-12-31 19:31:23 +00:00
thorpej
097956219f Remove -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/openssl
from CPPFLAGS.
2001-12-31 19:26:59 +00:00
thorpej
4d1b7fd158 Remove -I${DESTDIR}/usr/include and -I${DESTDIR}/usr/include/openssl from
CPPFLAGS.
2001-12-31 19:25:36 +00:00
thorpej
7532b272b3 Remove -I${DESTDIR}/usr/include/openssl from CPPFLAGS; it's unnecessary,
and having it causes the wrong <err.h> to be included.
2001-12-31 19:24:12 +00:00
chs
ef57a67ca1 fix locking for loaning. in general we should be looking at the page's
uobject and uanon pointers rather than at the PQ_ANON flag to determine
which lock to hold, since PQ_ANON can be clear even when the anon's lock
is the one which we should hold (if the page was loaned from an object
and then freed by the object).
2001-12-31 19:21:36 +00:00
thorpej
f8fdb0d1c9 Remove -I${DESTDIR}/usr/include from CPPFLAGS; it is unnecessary, and
it makes gcc 3.1 unhappy (because -isystem ${DESTDIR}/usr/include is
specified later).
2001-12-31 19:02:49 +00:00
thorpej
3d561f4807 Avoid an "operation on foo may be undefined" warning (gcc 3.1). 2001-12-31 18:53:32 +00:00
thorpej
2aa37f4ab3 Change some:
foo += sscanf(++foo, ...);

constructs to:

	++foo;
	foo += sscanf(foo, ...);

to avoid the following warning from gcc 3.1:

	warning: operation on `pos' may be undefined
2001-12-31 18:45:04 +00:00
thorpej
5d537fa0b9 Need <string.h> for memset() and strcmp() prototypes (noticed by
gcc 3.1).
2001-12-31 18:38:32 +00:00
dbj
0057f73f87 save and restore sprg[0-3] when calling openfirmware
this fixes calling OF_finddevice() with invalid devices,
and as a result fixes booting with -d.
Apparently openfirmware expects persistence of sprg2 and/or sprg3
I suspect this is used when handling exceptions
2001-12-31 18:35:26 +00:00
thorpej
ffe66c84f5 Need <string.h> for strcmp() prototype (noticed by gcc 3.1). 2001-12-31 18:34:52 +00:00
thorpej
6c46adefc6 Labels must be followed by statements. 2001-12-31 18:31:59 +00:00