-#LyX 1.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 220
+#LyX 1.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 221
\textclass article
\language english
\inputencoding default
Installation
\layout Subsection
-Install paths
+Configure variables
\layout Standard
The install paths and default search paths are defined when running 'configure'.
\layout Standard
...
- TBA
+ TBD
\newline
\newline
\emph on
italics
\emph default
- to distinguish them from run time variables (see next section).
+ to distinguish them from run time environment variables (see section search
+ paths).
\newline
\newline
-The defaults are:
+Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds.
+ The SDCC team uses Mingw32 to build the official Windows binaries, because
+ it's
+\layout Enumerate
+
+open source,
+\layout Enumerate
+
+a gcc compiler and last but not least
+\layout Enumerate
+
+the binaries can be built by cross compiling on Sourceforge's compile farm.
+\layout Standard
+
+The other Win32 builds using Borland, VC or whatever don't use 'configure',
+ but they (hopefully) use the default Win32 paths.
+\newline
+
+\newline
+These defaults are:
\newline
\newline
\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="3">
+<lyxtabular version="3" rows="8" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\emph on
-DATADIR
+EXEC_PREFIX
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\emph on
$PREFIX
-\emph default
-/share/sdcc
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\emph on
-BIN_DIR_SUFFIX
+BINDIR
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\layout Standard
-bin
+
+\emph on
+$EXECPREFIX
+\emph default
+/bin
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\layout Standard
+
+\emph on
+$EXECPREFIX
+\emph default
+
+\backslash
bin
\end_inset
</cell>
\emph on
-SEARCH_SUFFIX
+DATADIR
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\layout Standard
-share/sdcc
+
+\emph on
+$PREFIX
+\emph default
+/share
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on
+$PREFIX
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on
+DOCDIR
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on
+$DATADIR
+\emph default
+/sdcc/doc
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\layout Standard
+
+\emph on
+$DATADIR
+\emph default
+
+\backslash
+doc
\end_inset
</cell>
</row>
\layout Standard
-include
+sdcc/include
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\layout Standard
-lib
+sdcc/lib
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\newline
\newline
-Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds.
- The SDCC team uses Mingw32 to build the official Windows binaries, because
- it's
-\layout Enumerate
-open source,
-\layout Enumerate
+\newline
+'configure' also computes relative paths.
+ This is needed for full relocatability of a binary package and to complete
+ search paths (see section search paths below):
+\newline
+
+\newline
-a gcc compiler and last but not least
-\layout Enumerate
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="3">
+<features>
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
-the binaries can be built by cross compiling on Sourceforge's compile farm.
\layout Standard
-The other Win32 builds using Borland, VC or whatever don't use 'configure',
- but they (hopefully) use the default Win32 paths.
-\newline
+Variable (computed)
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+*nix default
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Win32 default
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on
+BIN2DATA_DIR
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+../share
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+..
+\backslash
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on
+PREFIX2BIN_DIR
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bin
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bin
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on
+PREFIX2DATA_DIR
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+share/sdcc
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\layout Subsection
+
+Install paths
+\layout Standard
-\newline
1.
Binary files (preprocessor, assembler and linker)
\layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="2" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\emph on
-$PREFIX/$BIN_DIR_SUFFIX
+$EXEC_PREFIX
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Tabular
<lyxtabular version="3" rows="2" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="1.6in">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="1.6in">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_inset Tabular
<lyxtabular version="3" rows="2" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_inset Tabular
<lyxtabular version="3" rows="2" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\emph on
-$DATADIR/
-\emph default
-doc
+$DOCDIR
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
italics
\emph default
, see section above).
- Other search paths are determined by environment variables during runtime.
+ Further search paths are determined by environment variables during runtime.
\newline
The paths searched when running the compiler are as follows (the first catch
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
$SDCC_HOME/
\emph on
-$BIN_DIR_SUFFIX
+$PPREFIX2BIN_DIR
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="1.5in">
-<column alignment="left" valignment="top" leftline="true" width="1.5in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="1.5in">
+<column alignment="block" valignment="top" leftline="true" width="1.5in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\layout Standard
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\layout Standard
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
\end_inset
</cell>
</row>
\newline
\emph on
-$SEARCH_SUFFIX/
+$PREFIX2DATA_DIR/
\newline
$INCLUDE_DIR_SUFFIX
\end_inset
\layout Standard
-$SDCC_HOME/
+$SDCC_ HOME/
\newline
share/sdcc/
\newline
\layout Standard
-path(argv[0])/../
+path(argv[0])/
\newline
\emph on
-$SEARCH_SUFFIX/
+$BIN2DATADIR/
\emph default
\newline
\layout Standard
-(not on *nix)
+path(argv[0])/
+\newline
+../sdcc/include
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="3">
<features>
-<column alignment="left" valignment="top" leftline="true" width="1.7in">
-<column alignment="left" valignment="top" leftline="true" width="1.2in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="1.2in">
+<column alignment="block" valignment="top" leftline="true" width="1.7in">
+<column alignment="block" valignment="top" leftline="true" width="1.2in">
+<column alignment="block" valignment="top" leftline="true" rightline="true" width="1.2in">
<row topline="true" bottomline="true">
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
-$SDCC_LIB_PATH/
+$SDCC_LIB/
\newline
\emph on
\layout Standard
-$SDCC_LIB_PATH/
+$SDCC_LIB/
\newline
\emph on
\layout Standard
-$SDCC_LIB_PATH
+$SDCC_LIB
\backslash
\newline
\newline
\emph on
-$SEARCH_SUFFIX/
+$PREFIX2DATA_DIR/
\newline
$LIB_DIR_SUFFIX/<model>
\end_inset
\layout Standard
-path(argv[0]/../
+path(argv[0]/
\newline
\emph on
-$SEARCH_SUFFIX/
+$BIN2DATADIR/
+\emph default
+
\newline
+
+\emph on
$LIB_DIR_SUFFIX/<model>
\end_inset
</cell>
\layout Standard
-(not on *nix)
+path(argv[0])/
\newline
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-
+../sdcc/lib/
+\emph on
+<model>
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
path(argv[0]
\backslash
+
+\newline
..
\backslash
lib
\backslash
\emph on
-
-\newline
<model>
-\newline
-
-\emph default
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-
\end_inset
</cell>
</row>
\layout Comment
-Don't delete any of the stray spaces in the table line 5 without checking
+Don't delete any of the stray spaces in the table above without checking
the HTML output (last line)!
\layout Standard
\series default
This copies the binary executables, the include files, the libraries and
the documentation to the install directories.
+\layout Standard
+
+On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelease
+)) fails to compile SDCC.
+ Fortunately there's also gcc 2.9.x installed, which works fine.
+ This compiler can be selected by running 'configure' with:
+\layout LyX-Code
+
+./configure CC=gcc2 CXX=g++2
\layout Subsection
Windows
---i-code-in-asm
\series default
Include i-codes in the asm file.
- Looks like noise but is most helpfull for debugging the compiler itself.
+ Sounds like noise but is most helpfull for debugging the compiler itself.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+---less-pedantic
+\series default
+ Disable some of the more pedantic warnings (jwk burps: please be more specific
+ here, please!)
\layout Subsubsection
Intermediate Dump Options
\series bold
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_BIN_PATH)
-\series default
- Path, see
-\begin_inset Quotes sld
-\end_inset
-
-2.1 Install and search paths
-\begin_inset Quotes srd
-\end_inset
-
-.
-\layout List
-\labelwidthstring 00.00.0000
-
-
-\series bold
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_INCLUDE_PATH)
+SDCC_HOME
\series default
Path, see
\begin_inset Quotes sld
\end_inset
-2.1 Install and search paths
+2.3 Install and search paths
\begin_inset Quotes srd
\end_inset
\series bold
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_LIB_PATH)
+SDCC_INCLUDE
\series default
Path, see
\begin_inset Quotes sld
\end_inset
-2.1 Install and search paths
+2.3 Install and search paths
\begin_inset Quotes srd
\end_inset
\series bold
-SDCCDIR\SpecialChar ~
-(soon\SpecialChar ~
-replaced\SpecialChar ~
-by:\SpecialChar ~
-SDCCPATH)
+SDCC_LIB
\series default
Path, see
\begin_inset Quotes sld
\end_inset
-2.1 Install and search paths
+2.3 Install and search paths
\begin_inset Quotes srd
\end_inset
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="3">
<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
SDCC supports the following #pragma directives.
- This directives are applicable only at a function level.
\layout Itemize
SAVE - this will save all the current options.
\layout Itemize
RESTORE - will restore the saved options from the last save.
- Note that SAVES & RESTOREs cannot be nested.
+ Note that SAVEs & RESTOREs cannot be nested.
SDCC uses the same buffer to save the options each time a SAVE is called.
+ (jwk burps: either fix that or throw a warning)
\layout Itemize
NOGCSE - will stop global subexpression elimination.
of a function.
\layout Itemize
+LESS_PEDANTIC - the compiler will not warn you anymore for obvious mistakes,
+ you'r on your own now ;-(
+\layout Itemize
+
NOLOOPREVERSE - Will not do loop reversal optimization
\layout Itemize