Commit Graph

91 Commits

Author SHA1 Message Date
bde
be904e56d5 Moved nonstandard compiler profiling options out of config. Just print
the profiling level in config and decide what to do in makefiles.

Makefile.i386:
Align functions to 16-byte boundaries if profiling is enabled.  This
will allow a fourfold reduction in the size of the profiling buffers.
1996-12-13 12:46:28 +00:00
bde
c7570f90a3 Compile genassym without -static (undo rev.1.20). The default can be
depended on now, and linux_genassym has depended on it for a long time.
1996-11-06 14:56:11 +00:00
bde
fa51fcfcdd Centralized the definition of CWARNFLAGS into bsd.kern.mk. 1996-10-08 22:09:03 +00:00
bde
091c6db883 Added -I- to ${INCLUDES}. This makes 4.4Lite's (mis?)use of "foo.h"
for headers in the compile directory work unsurprisingly.  Without
-I-, the search for "foo.h" begins in the directory of the file
that includes it, and the compile directory is only searched because
`-I.' is in ${INCLUDES}.

Removed -I$S/sys from ${INCLUDES}.  It was once necessary to find
things like "param.h" in $S/sys.  Now <sys/param.h> is found in $S.
1996-09-27 16:34:16 +00:00
bde
7d4c1814f6 Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
ache
8f267c926d Add /usr/sbin to sysctl because /usr/sbin not in standard path 1996-08-21 16:31:34 +00:00
gpalmer
defc0f2e29 Add -Wunused to try and catch any future offenders
Reviewed by:	bde
1996-06-12 05:54:46 +00:00
jkh
91826e819a Bring back the `config file in the kernel' feature from the 1.x days. This
is conditionalized by the INCLUDE_CONFIG_FILE option in your kernel config
file and is not turned on by default.

Submitted-By: Bill Pechter <pechter@shell.monmouth.com>
1996-06-08 23:27:16 +00:00
peter
dbd9016f48 Instead of: cpp blah file.s | as -o file.o, use instead:
cc -c -x assembler-with-cpp -o file.o file.s.

This means that any cpp fatal errors will now be detected, as well as
running *.s files through an ansi cpp instead of a traditional cpp.

(fixes to allow *.s to compile under both ansi and traditional to follow)
1996-05-31 01:01:24 +00:00
wosch
9f795376b3 `mv'' -> `mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
1996-05-07 23:19:49 +00:00
joerg
48edb94942 Replace the dependency of install' from kernel' by a test for the
existance fo `kernel'.

Submitted by:	peter
1996-05-02 21:40:50 +00:00
phk
5a6fb3a7da removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
joerg
9c10d8e8d1 Make install' depend on kernel'. Some idiot tried to install a
non-built kernel and complained in Usenet... :-)
1996-04-27 07:30:49 +00:00
peter
cd652cf1fa When doing a 'make depend', dont blow away the existing .depend until
the generation of a new one is complete.
1996-03-30 14:57:02 +00:00
bde
338e708cf9 Added necessary quotes (${CPP} might have spaces in it). Removed
unnecessary quotes.
1996-03-29 14:08:30 +00:00
peter
8465726bda Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff.  The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*.  Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself.  The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code.  All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first.  Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality().  The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls..  eg:  mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed.  i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS).  This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only.  This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code.  It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area.  This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
peter
9e7424b785 Also move /var/db/kvm_kernel.db to /var/db/kvm_kernel.old.db IF we change
sysctl kern.bootfile - since libkvm expects it there.
1996-01-08 03:55:36 +00:00
phk
ff1d9d2c0c Only change the sysctl variable if it presently points to /kernel. 1996-01-07 22:31:27 +00:00
wollman
1693c596cf Delete a couple of unnecessary dependencies on Makefile. 1996-01-05 18:30:10 +00:00
bde
49ed6a09d1 Removed almost all traces of libkern.a. The objects that were in
libkern.a are now specified by listing their source files in
files.${MACHINE}.  The list is machine-dependent to save space.
All the necessary object for each machine must be linked into the
kernel in case an lkm wants one.
1995-12-26 13:58:31 +00:00
bde
a98acddd04 Added `-Wstrict-prototypes -Wmissing-prototypes' to CWARNFLAGS so that
prototypes don't go missing again.  Also added -Winline so that some
doubtful (non-)inlines get fixed.

bsd.kmod.mk:
Also added `-Wreturn-type -Wimplicit -Wnested-externs' to catch up
with the kernel.
1995-12-16 01:57:25 +00:00
dg
56868f5708 i386 is defined by the compiler, so don't define it here. LOAD_ADDRESS
is only used in the Makefile, so don't define it in CFLAGS.
1995-11-19 19:49:43 +00:00
peter
5bbf28a096 Add a DRIVER_S= definition that config wants to use for assembler
source.  This was copied from NORMAL_S..
1995-11-01 15:03:02 +00:00
guido
f624492c3f When moving kernel to kernel.old, also change kern.bootfile.to
kernel.old. This is a solution for only the first install
on a running system, but it's better than it is now.
1995-10-30 20:20:49 +00:00
dg
9bf544b7f3 Use the new config(8) %SFILES token to auto-generate the SFILES list.
Note: THIS REQUIRES THAT YOU REBUILD CONFIG(8)!!!
1995-10-29 11:10:53 +00:00
bde
6a4e982f27 Make everything except the unsupported network sources compile cleanly
with -Wnested-extern.
1995-08-16 16:11:48 +00:00
bde
b35c09c9b0 Fix clean rule to remove remove everything that isn't created by config
except .depend and `version'.
1995-07-22 23:55:41 +00:00
rgrimes
c86f0c7a71 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
wollman
5d4885ae93 Make `make links' work by leaving swapkernel.c off out of the links processing
(it is never generic).
1995-05-11 19:48:45 +00:00
nate
153c2880e3 Modify behavior of INCLUDES to never look in /usr/include unless we
can't find the src/include directory.

Reviewed by:	"Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
Submitted by:	Mike Pritchard <pritc003@maroon.tc.umn.edu>
1995-04-05 04:10:58 +00:00
nate
e4473f322d Added -I/usrinclude to the tail end of the INCLUDES line. This hack
will cause kernel compiles to work even if the src/includes directory
doesn't exist but still do the 'Right Thing' and pull files from the
source tree if it does exist.

Reviewed by:	Bruce Evans
1995-04-03 01:13:50 +00:00
bde
4071f984e3 CVS:
Enable -Wimplicit again.
bash: /src/z1: No such file or directory
1995-03-28 08:02:37 +00:00
bde
3936ee9f70 Reviewed by:
Submitted by:
Obtained from:

Disable previous change.  I missed a lot of implicit declarations.
1995-03-25 23:21:36 +00:00
bde
b25d3e7a0e Add -Wimplicit to ${CWARNFLAGS} so that implicitly declared functions
don't come back.  There are still a few for unsupported network protocols.
1995-03-25 17:50:19 +00:00
dg
e4e3f30221 Removed obsolete vtrace() remnants. 1995-03-04 03:24:45 +00:00
gibbs
221df4f65b Fix "dependency" spelling error. Implement "clean" entries for device
config entries.  Add clean rules to aic7xxx and aic7xxx_seq.h.

Submitted by: Pointed out by Bruce Evans <bde@zeta.org.au>
1995-03-01 10:08:07 +00:00
bde
a440c10bc1 Use relative include path and -nostdinc avoid getting anything from
/usr/include.
1995-02-26 05:05:53 +00:00
phk
e98885ccd1 Pass '-m' to symorder. Kernels without INET will fail otherwise. 1995-01-29 23:42:11 +00:00
bde
802677cea8 Load the kernel symbol table in the boot loader and not at compile time.
(Boot with the -D flag if you want symbols.)

Make it easier to extend `struct bootinfo' without losing either forwards
or backwards compatibility.

ddb_aout.c:
Get the symbol table from wherever the loader put it.
Nuke db_symtab[SYMTAB_SPACE].

boot.c:
Enable loading of symbols.  Align them on a page boundary.  Add printfs
about the symbol table sizes.
Pass the memory sizes to the kernel.
Fix initialization of `unit' (it got moved out of the loop).
Fix adding the bss size (it got moved inside an ifdef).
Initialize serial port when RB_SERIAL is toggled on.
Fix comments.
Clean up formatting of recently added code.

io.c:
Clean up formatting of recently added code.

netboot/main.c, machdep.c, wd.c:
Change names of bootinfo fields.

LINT:
Nuke SYMTAB_SPACE.
Fix comment about DODUMP.

Makefile.i386:
Nuke use of dbsym.
Exclude gcc symbols from kernel unless compiling with -g.
Remove unused macro.
Fix comments and formatting.

genassym.c:
Generate defines for some new bootinfo fields.  Change names of old ones.

locore.s:
Copy only the valid part of the `struct bootinfo' passed by the loader.
Reserve space for symbol table, if any.

machdep.c:
Check the memory sizes passed by the loader, if any.  Don't use them yet.

bootinfo.h:
Add a size field so that we can resolve some mismatches between the loader
bootinfo and the kernel boot info.  The version number is not so good for
this because of historical botches and because it's harder to maintain.
Add memory size and symbol table fields.  Change the names of everything.

Hacks to save a few bytes:

asm.S, boot.c, boot2.S:
Replace `ouraddr' by `(BOOTSEG << 4)'.

boot.c:
Don't statically initialize `loadflags' to 0.  Disable the "REDUNDANT"
code that skips the BIOS variables.  Eliminate `total'.  Combine some
more printfs.

boot.h, disk.c, io.c, table.c:
Move all statically initialzed data to table.c.

io.c:
Don't put the A20 gate bits in a variable.
1995-01-25 21:40:47 +00:00
gibbs
30804b7ea5 Handle the aic7770 driver's dependancies correctly.
YOU MUST REBUILD CONFIG.
1994-12-31 19:27:29 +00:00
dg
cf8ec251cc Go back to -O optimization...Bruce's arguments against -O2 are convincing
enough for me.
1994-11-27 14:26:16 +00:00
dg
72223a20db Changed optimization level to -O2. 1994-11-24 14:26:11 +00:00
bde
38ef2158dd Don't define KERNEL for compiling genassym. The prototype for the system
printf() is inconsistent with the prototype for the library printf() and
gets declared if DIAGNOSTIC is defined because <vm/vm_page.h> includes
<sys/systm.h>.
1994-11-15 14:43:45 +00:00
bde
10fb081e1d Never strip the kernel.
Recommend -Wimplicit in CWARNFLAGS next.  There are still a few hundred
potential arg mismatches because no function declaration is in scope.

Don't duplicate option `-I.'.

Remove null editing of the assembler source for all profiled objects.
The required magic has been done since prehistoric times by an
asm("mcount") declaration.

Simplify the clean rule.

Don't try to be clever about timestamps involving genassym.  genassym's
timestamp usually got ahead of assym.s's timestamp, so `make' almost
always had to run genassym and compare *assym.s to decide that nothing
needed to be done.  The cost is reassembling a few files whenever
genassym is rebuilt.  Assembling is almost as fast as comparing.

Always go through genassym.o to build genassym.  This would have avoided
numerous bugs involving mkdep -p.  Now it just stops genassym from
depending on the name of the temporary object file.

Use ${CFLAGS} for building genassym.  Mainly ${CWARNFLAGS} were missing.
1994-10-25 19:34:57 +00:00
wollman
96a439f22b LINT: vastly restructured so that it's actually useful for something
Makefile.i386: make definition of STRIP unconditional.
1994-10-21 01:10:54 +00:00
wollman
2802184c31 Conditionally define CC, CWARNOPTS, etc., so that `makeoptions' in
config files actually does something useful.
1994-10-18 19:45:46 +00:00
rgrimes
8e4232db57 Put genassym: back how it was originally, the real bug was in mkdep. 1994-10-03 23:03:38 +00:00
phk
cc7748361f dependency for genassym was wrong, there is never made a genassym.o file.
made i depend on the src.
1994-10-03 18:51:35 +00:00
rgrimes
ef83447cb7 genassym: depends on Makefile and genassym.o, genassym.o dependicies are
picked up from .depend.
1994-10-02 22:58:40 +00:00
phk
7dd02d2607 In case CWARNFLAGS and COPTFLAGS are already defined (from /etc/make.conf
for instance), don't nuke them.
1994-10-02 21:50:51 +00:00