Commit Graph

87058 Commits

Author SHA1 Message Date
jmc 100b449518 Add back logic which forces DESTDIR=/ for the distrib-dirs rule if it's not set
or it's blank. The new toolchain rules set it to blank which can run into
the sanity checks in etc/Makefile
2001-10-31 19:41:54 +00:00
tv a75f4fb35e Don't actually delete the default tooldir on "cleandir"; else we'll nuke
the nbmake that is probably currently running.

Just leave the "cleantools" manual target as a shortcut for the user.
2001-10-31 19:38:02 +00:00
jdolecek 1295376b01 Couple changes, mainly to address stuff raised recently on port-i386
('Does i386 support NTFS5 now?'):

add a note both NTFS4 and NTFS5 are supported
reformat the Limitations a bit
assert the write support is not really useful, and should not be used
add a BUGS section, note missing stuff for the write support to be useful,
and the disk label thing spotted by Christos Zoulas
2001-10-31 19:16:36 +00:00
skrll 04b6a0a047 You can build libraries with more than just cc(1) now you know. 2001-10-31 18:44:11 +00:00
jdolecek 76dc75c365 svr4 compat LKMs work on i386 2001-10-31 18:30:18 +00:00
jdolecek 2b5db1a8bb add the compat_util.c goo
XXX should prolly share this with lkm/compat, which has the same thing
2001-10-31 18:28:50 +00:00
jdolecek 060f8eead1 Add the COMPAT_UTIL_OVERRIDE stuff, and (commented out) COMPAT_43 stuff 2001-10-31 18:27:31 +00:00
skrll 0a9eeb6303 Add a man page for ld.elf_so. 2001-10-31 18:26:23 +00:00
jdolecek af8a31dd42 For i386, set gate for fasttraps appropriately when loaded (and
unset on unload), similarily to what i386/machdep.c does #ifdef
COMPAT_SVR4. This makes the svr4 LKM actually work on i386.
XXX kind of ugly, but doing this more generic way would be overkill
2001-10-31 18:25:53 +00:00
jmc a6ddeb5145 Add a sanity check. Don't rm -rf / if TOOLDIR or DESTDIR got set to / and -r
was an option
2001-10-31 18:23:55 +00:00
jdolecek 6cb3157ebe Add defines for the rest of fasttraps as defined on Solaris8/i386. For
documentation purposes only (though CLOCK_SETTIME a.k.a T_GETHRESTIME
shouldn't be too hard to implement).
2001-10-31 18:20:13 +00:00
jdolecek f3bfeee0d6 Fix one more place where we need to restore %fs/%gs explicitly. 2001-10-31 18:17:56 +00:00
jdolecek 01d4649f9f Make local INTRENTRY, INTRFASTEXIT match those in locore.s, i.e. store &
restore %fs/%gs appropriately.
Fixes kern/14275 - compat svr4 works on i386 again :)

Thanks to MOCHIDA Shuji for initial investigation on the issue, that helped
to find the bug a lot.
2001-10-31 18:16:02 +00:00
thorpej d42a6dc5c2 Rather than using a NetBSD-specific header file <machine/int_types.h>
and non-standard inttype-like types, pull in <sys/types.h> if
_KERNEL or _STANDALONE and <inttypes.h> otherwise, and use standard
inttype types.

Discussed with and OK'd by Christos.
2001-10-31 18:05:35 +00:00
bjh21 54edd2d848 Define BOOT_ELF32. Don't define ELFSIZE. 2001-10-31 17:59:38 +00:00
bjh21 82b2265851 Add loadfile_machdep.h, which has been missing since I committed boot26. 2001-10-31 17:58:54 +00:00
tv 61be23b431 * Create a variable HOST_OSTYPE that represents the host build environment,
using `uname -s`-`uname -r`-`uname -p || uname -m`.  This can be overridden
  in mk.conf or the environment, and is used by host tools to ensure that
  build hosts do not clobber each other.

* Now that there's an objdir in src/tools, make a default TOOLDIR by creating
  "tools.${HOST_OSTYPE}" in the objdir (if it exists) of src/tools.  This
  means that TOOLDIR is no longer required to be set in a build, though it
  still may be set manually if desired.

* Set MKTOOLS to "yes" by default, since the default TOOLDIR is now located
  in a known mutable location.  This may still be set manually if desired.
2001-10-31 17:46:08 +00:00
thorpej 6d2e0bcbc2 Use <machine/elf_machdep.h> to override Elf64_Word and Elf64_Sword
on the Alpha (which uses a non-standard definitions for historical
reasons), rather than #ifdef __alpha__ (which is not cross-tool safe).
2001-10-31 17:44:42 +00:00
thorpej d973bb96f1 Include <machine/elf_machdep.h> earlier, at the beginning of the file,
after the inttypes header.
2001-10-31 17:35:06 +00:00
thorpej 6797e85570 Include support for elf64. 2001-10-31 17:21:47 +00:00
thorpej e727e3f180 Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly.  BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31 17:20:45 +00:00
tv ec5a9a312e Add REQUIRETOOLS to make version-specific new toolchain compiler libs fail
to build if USETOOLS is set to "no" by the builder.  (Sanity check; as an
override, USETOOLS may be set to "never", but see warnings in BUILDING.)
2001-10-31 16:27:31 +00:00
tv abb4800606 Make REQUIRETOOLS work properly -- don't error if USE_NEW_TOOLCHAIN is
not set.  Also, nuke redundant USE_NEW_TOOLCHAIN check with USETOOLS.
2001-10-31 16:25:21 +00:00
tv dd7ca02987 Make handling of USETOOLS uniform: Don't need to check whether it is
defined, as <bsd.own.mk> always sets it; also, compare only against "yes"
(not "no") for a yes/no check, as there are two negative states ("no" and
"never").
2001-10-31 16:15:00 +00:00
tv c0c91b1b74 Simplify a bunch of explicit ${.OBJDIR} references to make these more like
the rest of the tree.
2001-10-31 15:57:49 +00:00
kleink e8befb717e Inspired by Stevens' APUE and the implementation example in XSH:
* Don't return if wait()ing for the child is interrupted.
* Fix a race condition for the parent's SIG{INT,QUIT} disposition.
* While we're here, convert from using signal(3) to sigaction(2).
2001-10-31 13:31:26 +00:00
reinoud a7b1e2f4a6 Rollback 2001-10-31 13:12:35 +00:00
tv 053d51348d Overhaul the initialization and handling of .OBJDIR:
* Replace chdir_verify_path() with Main_SetObjdir(), which can be called
  externally, and can take a "const char *".  (There's a lot of non-const
  "char *" passing around in var.c of what should be const strings....)

* Rewrite the initial "find my .OBJDIR" code to make use of the new
  function.  This still functions as it had in the past, but the comment
  above this block was changed to reflect reality:  if MAKEOBJDIRPREFIX
  or MAKEOBJDIR are set in the environment, then *only that value* is
  tried; make does not fall back to obj.MACHINE, obj, and /usr/obj/`pwd`
  as it would without these env vars set.

* Add a new special target, .OBJDIR:, which when parsed will cause make to
  change to a new object directory and reset .OBJDIR, and PWD in the
  environment.  This will allow some makefiles (mainly, src/tools)
  to override the default objdir semantics in order to add custom logic.
2001-10-31 03:59:42 +00:00
jmc 7526979e21 Don't run rules unless DESTDIR is set *and* contains a value. Fixes PR 14410 2001-10-31 02:58:58 +00:00
reinoud 88ca038117 Change MACHINE_ARCH to arm making it ELF now. 2001-10-31 02:10:35 +00:00
tv 7636e93f41 * Fix brokenness created by the -n option additions ("eval" still kept
quoting, so the commands were thought to be one big word with embedded
  whitespace)

* New options:
  -O obj    Set root of an obj tree; sets MAKEOBJDIR to an appropriate
            substitution pattern.
  -o        Sets MKOBJDIRS=no (otherwise sets MKOBJDIRS=yes)
  -u        Sets UPDATE
2001-10-31 01:56:10 +00:00
thorpej 4810d73020 Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
2001-10-31 01:51:42 +00:00
tv 7d2258875d Use __curdir throughout, so MAKEOBJDIR builds see resolved paths in the
"foo -> bar" messages written to stdout.
2001-10-31 01:46:42 +00:00
tv c9a6a2c359 * Always descend into "tools" regardless of USETOOLS setting. Instead,
just don't build the tools if USETOOLS!=yes.  This permits objdirs to
  be created even when USETOOLS=no.

* Clean up use of "-m" by specifying it to .MAKEFLAGS: if needed.
2001-10-31 01:20:09 +00:00
tv 41783071da Allow "-m" to be used in a .MAKEFLAGS: special target and get it to work.
(This splits out the "default system include paths" into its own Lst
variable, and uses it only if sysIncPath is empty.  This allows sysIncPath
to be filled in by the Makefile itself.)
2001-10-31 01:15:57 +00:00
reinoud 3d76fbc53f Acorn's MACHINE_ARFCH is now arm, not arm32 ... moving it effectively to
ELF (Yay!)
2001-10-31 00:08:03 +00:00
thorpej 91626c3515 Split the exec formats included by loadfile() into separate files.
Primary goal: explcitly select which ELF format (elf32 or elf64) to
support for a cross tool which uses loadfile().
2001-10-30 23:51:03 +00:00
thorpej 715b4d636e Use the standalone byteorder routines. 2001-10-30 23:39:08 +00:00
thorpej 74eebee33c Add standalone byte-swapping routines that don't require testing
the system's byte-order:
- host to {big,little}-endian {16,32}
- {big,little}-endian {16,32} to host

These are not intended to be used in libsa directly, but are rather
intended to be used by host tools which may use libsa routines (such
as loadfile()) which need to use explicit byte-ordering.
2001-10-30 23:35:33 +00:00
tv 732cb3a230 * Clean up a bit; always use [] for comparison tests.
* Don't require DESTDIR when -b is set.

* Add -n option, which prints the commands that would be run by build.sh,
  but doesn't run them (much like make's -n option).

* Auto-resolve relative paths for -D, -R, and -T (but not for the
  corresponding environment variables).

* Explicitly declare defaults of all shell variables used where feasible,
  rather than sprinkling ${varname-value} expansions.

* Prefix shell true/false variables with "do_" to indicate their use as
  actual values in shell expressions (like "$do_buildsystem && echo foo").
2001-10-30 22:33:00 +00:00
manu 40c8c13901 Made syscallargs.h lint-friendly, so that it can be included in libc sources
more easily.
2001-10-30 21:52:26 +00:00
jmc ac3e0f6b6c Add -b option. Bootstrap only. i.e. build and install nbmake and then exit 2001-10-30 21:04:05 +00:00
thorpej f67e15c839 uvm_map_protect(): Don't allow VM_PROT_EXECUTE to be set on entries
(either the current protection or the max protection) that reference
vnodes associated with a file system mounted with the NOEXEC option.

uvm_mmap(): Don't allow PROT_EXEC mappings to be established of vnodes
which are associated with a file system mounted with the NOEXEC option.
2001-10-30 19:05:26 +00:00
thorpej a2cd7623d4 Correct a comment. 2001-10-30 18:52:17 +00:00
tv 972dc83c9b Work around parallelism lossage, because .ORDER doesn't work yet
(noted in PR bin/14404).  This will be fixed back to using .ORDER later.
2001-10-30 17:59:10 +00:00
augustss a903cfcf86 Make -p select the right program. Fixes PR 14402, from itohy@netbsd.org. 2001-10-30 17:10:50 +00:00
wiz 44f309a116 Drop some unnecessary whitespace, sort sections as in man pages, and
fix an xref and a formatting nit.
2001-10-30 16:22:40 +00:00
thorpej e8ee04475d - Add a new vnode flag VEXECMAP, which indicates that a vnode has
executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.
2001-10-30 15:32:01 +00:00
wiz 59268f6553 Add support for INCSNAME and INCSNAME_<file> to bsd.inc.mk.
Same syntax as FILESNAME and FILESNAME_<file>, allows to install
includes under a different name.
Okay'd by christos.
2001-10-30 15:17:16 +00:00
tv 0bcfd3ca58 Fix quote characters (" does not work; nor does \*(Lq and \*(Rq in HTML). 2001-10-30 14:40:24 +00:00