# HG changeset patch # User William Astle # Date 1378680959 21600 # Node ID c648fc4bd006f87089e6261a08461c38afaf87e9 # Parent b67a118dbdb702c841f8f464e50f062637d2dbf4 Updated lwcc README with info on the runtime support files Added description of -B and the runtime support files required for the lwcc program. diff -r b67a118dbdb7 -r c648fc4bd006 lwcc/README.txt --- a/lwcc/README.txt Sun Sep 08 16:55:21 2013 -0600 +++ b/lwcc/README.txt Sun Sep 08 16:55:59 2013 -0600 @@ -23,3 +23,57 @@ output. This is usually assembly routines to support complex operations not directly supported by the CPU instruction set. + +RUNTIME INFORMATION +=================== + +The compiler driver has a built in base directory where it searches for its +various components as needed. In the discussion below, BASEDIR stands for +that directory. + +BASEDIR may be specified by the -B option to the driver. Care must be taken +when doing so, however, because specifying an invalid -B will cause the +compiler to fail completely. It will completely override the built in search +paths for the compiler provided files and programs. + +Because BASEDIR is part of the actual compiler, it is not affected by +--sysroot or -isysroot options. + +If BASEDIR does not exist, compiler component programs will be searched for +in the standard execution paths. This may lead to incorrect results so it is +important to make certain that the specified BASEDIR exists. + +If -B is not specified, the default BASEDIR is +$(PREFIX)/lib/lwcc/$(VERSION)/ where PREFIX is the build prefix from the +Makefile and VERSION is the lwtools version. + +The contents of BASEDIR are as follows: + +BASEDIR/bin + +Various binaries for the parts of the compiler system. Notably, this +includes the preprocessor and compiler proper. The specific names and +contents of this directory cannot be relied upon and these programs should +not be called directly. Ever. Don't do it. + + +BASEDIR/lib + +This directory contains various libraries that provide support for any +portion of the compiler's output. The driver will arrange to pass the +appropriate arguments to the linker to include these as required. + +The most notable file in this directory is liblwcc.a wich contains the +support routines for the compiler's code generation. Depending on ABI and +code generation options supported, there may be multiple versions of +liblwcc.a. The driver will arrange for the correct one to be referenced. + + +BASEDIR/include + +This directory contains any C header files that the compiler provides. +Notably, this includes stdint.h, stdarg.h, and setjmp.h as these are +specific to the compiler. The driver will arrange for this directory to be +searched prior to the standard system directories so that these files will +override any present in those directories. +