summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README203
1 files changed, 58 insertions, 145 deletions
diff --git a/README b/README
index 1074874..d7a17cf 100644
--- a/README
+++ b/README
@@ -1,160 +1,73 @@
-@(#) README 1.6 93/06/18 22:29:34
+This is a development environment for ELKS-86 and standalone 8086 code.
-unproto - Compile ANSI C with traditional UNIX C compiler
+The only hand configuration is to choose one of libc/syscall/syscall.dat.*
+to be used as libc/syscall/syscall.dat The '*.chad' one matches the *.50
+elks kernel but you're best to pickup the one in the kernel you're compiling
+for.
-Description:
-------------
+All you then need to do then is 'make' from the top directory and the main
+parts of the package will be made. These can be tested by use the 'ncc'
+program from the newly created bin subdirectory.
-This is a filter that sits in between the UNIX C preprocessor and the
-next UNIX C compiler stage, on the fly transforming ANSI C syntax to
-old C syntax. Line number information is preserved so that compiler
-diagnostics still make sense. It runs at roughly the same speed as
-/lib/cpp, so it has negligible impact on compilation time.
+Use 'make install' to install them.
+Use 'make Uninstall' to remove everything (Beware with this though!)
-Typically, the program is invoked by the native UNIX C compiler as an
-alternate preprocessor. The unprototyper in turn invokes the native C
-preprocessor and massages its output. Similar tricks can be used with
-the lint(1) command. Details are given below.
+Some other bits can be built by 'make other' and installed with
+'make install-other'.
-The filter rewrites ANSI-style function headings, function pointer
-types and type casts, function prototypes, and combinations thereof.
-Unlike some other unprototypers, this one is fully recursive and does
-not depend on source file layout (see the example.c file).
+The manual pages in the man subdirectory are a start as some pages matched
+to these programs, there are also some hints for using as86 well.
+The tests and bootblocks directories give some example code.
-Besides the rewriting of argument lists, the program does the following
-transformations: string concatenation, conversion of \a and \x escape
-sequences to their octal equivalents, translation of the __TIME__ and
-__DATE__ macros, optional mapping of `void *' to `char *', and optional
-mapping of plain `void' to `int'.
+The bcc command defaults to using /usr/bcc/include and /usr/bcc/lib the
+libraries _and_ include files are copied to these locations by install.
-The unprototyper provides hooks for compilers that require special
-tricks for variadic functions (fortunately, many don't). <stdarg.h>
-support is provided for sparc, mips, mc68k, 80x86, vax, and others.
+All the versions of the library are built by make; 'normal', 'fast', 'MSDOS',
+'standalone' and Linux-i386.
-The program has been tested with SunOS 4.1.1 (sparc), Ultrix 4.0 and
-4.2 (mips), and Microport System V Release 2 (80286). It should work
-with almost every PCC-based UNIX C compiler.
+You use the other libraries like this:
+ 'FAST' $ bcc -Mf prog.c -o prog
+ Caller saves $ bcc -Mc prog.c -o prog
+ MSDOS $ bcc -Md prog.c -o prog.com
+ Standalone $ bcc -Ms prog.c -o prog.sys
+ Linux-i386 $ bcc -Ml prog.c -o prog
-Restrictions:
--------------
+The Linux-i386 version generates static Linux a.out programs, they need
+neither elksemu nor a.out shared libries to run. If you want you can
+convert them to an odd ELF executable with:
+ $ bcc -Ml prog.c -o prog
+ $ objcopy -O elf32-i386 prog
-A description of restrictions and workarounds can be found in the
-unproto.1 manual page.
+If you want to install everything in one go just login as root an do:
+$ make install-all
-Problems fixed with this release:
----------------------------------
+The as86 and ld86 with this are _different_ from the ones needed for the
+linux-i386 kernel but can replace them, the kernel-i386 ones _will_ _not_
+work correctly here!
-Prototypes and definitions of functions returning pointer to function
-were not rewritten to old style.
+Unfortunatly, the DOSEMU folks have been using the '-r' option of ld86
+This version does accept '-r' (with -N) but it generates _LINUX_ a.out
+object files. I think they should really be using 'as86_encap' but in
+the short term DOSEMU is being changed to be able to use the new ld86.
-Operation:
+Neverthless this ld86 will call a program called /usr/bin/ld86r if it's
+given -r without -N, this can be the old ld86 renamed. For simplicity
+Dev86 doesn't yet overwrite /usr/bin/ld86 but stores the linker in
+/usr/bcc/lib.
+
+I _strongly_ suggest you install the kernel patch or load the module in
+the elksemu directory in your Linux-i386 kernel, it makes things _much_
+easier. (They both need the elksemu executable installed correctly)
+
+Copyrights
----------
+This software is for the most part under GPL style copyright, the libc and
+libbsd are covered by the 'weaker' library versions of this document.
+(See the COPYING files in this and the libc directories for details)
+
+The copyrights of other parts are documented in the relevent files. Some
+parts are explicitly PD others like the unproto code have copyrights that
+allow free distribution but are otherwise more vague.
-This package implements a non-default C preprocessor (the output from
-the default C preprocessor being piped through the unprototyper). How
-one tells the C compiler to use a non-default preprocessor program is
-somewhat compiler-dependent:
-
- SunOS 4.x: cc -Qpath directory_with_alternate_cpp ...
-
- Ultrix 4.x: cc -tp -hdirectory_with_alternate_cpp -B ...
-
- System V.2: cc -Bdirectory_with_alternate_cpp/ -tp ...
-
-Examples of these, and others, can be found in the acc.sh shell script
-that emulates an ANSI C compiler. Your C compiler manual page should
-provide the necessary information.
-
-A more portable, but less efficient, approach relies on the observation
-that almost every UNIX C compiler supports the -E (write preprocessor
-output to stdout) and -P options (preprocess file.c into file.i). Just
-add the following lines to your Makefiles:
-
- .c.o:
- $(CC) $(CFLAGS) -E $*.c | unproto >$*.i # simulate -P option
- $(CC) $(CFLAGS) -c $*.i
- rm -f $*.i
-
-On some systems the lint(1) command is just a shell script, and writing
-a version that uses the unprototyper should not be too hard. With SunOS
-4.x, /usr/bin/lint is not a shell script, but it does accept the same
-syntax as the cc(1) command for the specification of a non-default
-compiler pass.
-
-You may have to do some research on the lint command provided with your
-own machine.
-
-Configuration:
---------------
-
-Check the contents of the `stdarg.h' file provided with this package.
-This file serves a dual purpose: (1) on systems that do not provide a
-stdarg.h file, it should be included by C source files that implements
-ANSI-style variadic functions; (2) it is also used to configure the
-unprototyper so that it emits the proper magic when it sees `...'.
-
-The `stdarg.h' file has support for sparc, mips, and for compilers that
-pass arguments via the stack (typical for 80*86, mc68k and vax). It
-gives general hints for other compilers.
-
-The other sample header files (stddef.h and stdlib.h) are not required
-to build the unprototyper.
-
-The `varargs.c' file provided with this package can be used to verify
-that the `stdarg.h' file has been set up correctly.
-
-If your C compiler has no hooks for an alternate preprocessor (the
-unprototyper will be used as: `cc cflags -E file.c | unproto >file.i'),
-build the `unproto' executable without the `PIPE_THROUGH_CPP' feature.
-Details are given in the Makefile.
-
-Otherwise, the `cpp.sh' shell script can be used to set up the pipe
-between the native C preprocessor and the unprototyper command. The
-script assumes that the unprototyper binary is called `unproto', and
-that it was compiled without the `PIPE_THROUGH_CPP' feature. See the
-Makefile and the `cpp.sh' script for details and for a description of
-possible problems with this approach.
-
-The overhead and problems of shell-script interpretation can be avoided
-by letting the unprototyper itself pipe its standard input through the
-C preprocessor. For this mode of operation, the unprototyper binary
-should be called `cpp', and the `unproto.c' source file should be
-compiled with the `PIPE_THROUGH_CPP' macro defined as the absolute
-pathname of the native C preprocessor (usually `/lib/cpp'). See the
-Makefile for details.
-
-Installation:
--------------
-
-Install the `unproto.1' manual page in a suitable place. If your system
-does not provide a `stdarg.h' file, find a suitable place for the one
-provided with the unprototyper and install it there. The same goes for
-the sample stddef.h and stdlib.h files; make sure that the definitions
-in there apply to your environment. Most or all of the latter files are
-already part of Ultrix 4.x and SunOS 4.1.1.
-
-The ANSI float.h and limits.h files can be generated with the config
-program by Steve Pemberton (comp.sources.misc volume 10, issue 62,
-available from ftp.uu.net as comp.sources.misc/volume10/config42.Z).
-
-If you run the unprototyper with "cc -E" just install the `unproto'
-binary; the `cpp' and `acc' shell scripts will not be needed.
-
-If you use the `cpp' shell script to pipe the preprocessor output
-through the unprototyper program, install the `unproto' binary in a
-place where the `cpp' shell script can find it, and install the `cpp'
-shell script in a suitable place. Edit the `acc' shell script and
-install it in a suitable place. From now on, type `acc' instead of
-`cc'.
-
-If the unprototyper itself opens the pipe to the C preprocessor (i.e.
-the unprototyper was built with the `PIPE_THROUGH_CPP' macro defined),
-install the `cpp' unprototyper binary in a suitable place. Edit the
-`acc' shell script and install it in a suitable place. From now on,
-type `acc' instead of `cc'.
-
- Wietse Venema
- wietse@wzv.win.tue.nl
- Mathematics and Computing Science
- Eindhoven University of Technology
- The Netherlands
+--
+Rob. (Robert de Bath <robert@mayday.cix.co.uk>)