TIGCC Command Line Options


  
This page describes the options supported by gcc.exe, the driver program of the GNU Compiler Collection, whose C compiler and assembler are used here. This program is called either by tigcc.exe or by the IDE. tigcc.exe simulates some of these options itself, namely '-E', '-S', and '-c', and it also has some additional ones. In the IDE, there is an item in the project settings where you can set the options on this page, with some exceptions, including the switches mentioned above.

tigcc.exe normally does preprocessing, compilation, assembling, and linking all in one step. The "overall options" allow you to stop this process at an intermediate stage. For example, the '-c' option says not to run the linker. Then the output consists of object files output by the assembler. Note that instead of the default GNU Linker (ld), TIGCC uses a special linker, which produces .89z or .9xz files, since the GNU Linker does not support them (of course).

Other options are passed on to one stage of processing. Some options control the preprocessor and others the compiler itself. Yet other options control the assembler and linker; most of these are not documented here, since you rarely need to use any of them. In fact, only those options which may be more or less useful with TIGCC are mentioned here (although I didn't check whether all of them are really applicable with TIGCC). For more info about standard options that are recognized by the compiler, read the official manual.

It is suggested that you use the '-O2' switch in all your compilations; it increases speed and decreases the program size at the cost of compilation time.

tigcc.exe accepts options and file names as operands. Many options have multiletter names; therefore multiple single-letter options may not be grouped: '-dr' is very different from '-d -r'.

You can mix options and other arguments. For the most part, the order you use doesn't matter. Order does matter when you use several options of the same kind; for example, if you specify '-L' more than once, the directories are searched in the order specified.

Many options have long names starting with '-f' or with '-W' - for example, '-fforce-mem', '-fstrength-reduce', '-Wformat' and so on. Most of these have both positive and negative forms; the negative form of '-ffoo' would be '-fno-foo'. This manual documents only one of these two forms, whichever one is not the default.

Command-Line Options: Options that are available in the command-line compiler (tigcc.exe)
Overall Options: Options controlling the kind of output: executables, object files, assembler files, or preprocessed source.
C Dialect Options: Options controlling the variant of C language compiled.
Warning Options: How picky should the compiler be?
Debugging Options: Symbol tables, measurements, and debugging dumps.
Optimize Options: How much optimization?
Preprocessor Options: Options controlling header files and macro definitions. Also, getting dependency information for Make utility (which is not a part of TIGCC package).
Assembler Options: Passing options to the assembler.
Link Options: Passing options to the linker.
Directory Options: Where to find header files etc., and where to find the compiler executable files.
Spec Files: How to pass switches to sub-processes.
Target Options: Different options that are only present in TIGCC.
Code Gen Options: Specifying conventions for function calls, data layout and register usage.
Environment Variables:    Environment variables that affect GCC.

Options Available in the Command Line Compiler

These options apply only to the command line compiler. If you want to use the IDE instead, you do not need to worry about these topics.

tigcc.exe has an important difference to the standard program gcc.exe: tigcc.exe always overwrites assembly or object files. For example, if a file 'test.c' is compiled, the files 'test.s' and 'test.o' will be created and overwritten if necessary, but they will automatically be deleted again if neither '-c' nor '-S' are specified.

-bsr

Use bsr calls where possible. Bsr calls cannot be used when branching to internal subroutines, but the compiler can use it for user functions. This option can be be used to optimize the code a little, although it might be dangerous in a few cases.

-pack varname

Compress the file generated during compilation. This option only works if the program does not require a kernel. varname is the name of the on-calc packed variable. Although varname cannot have an extension, the variable on the calculator will always have the extension 'ppg'. varname cannot be the same as the on-calc name of the program itself. When you use this switch, two variables will be created; one with the extension '.89y' or '.9xy', and one '.89z' or '.9xz' variable.

This option comes from Thomas Nussbaumer's TIGCC Tools Suite, where this feature is called "ExePack Technology." You can read about it on the official TI-Chess Team site.

-q

Keep as quiet as possible while assembling and linking. This option is not needed by the compiler because it is always quiet, but the linker and especially the assembler output some information.

-v0

This switch is an addition to the '-v' switch. It tells TIGCC to output only the commands that are run directly. This was the default in some previous releases.

Options Controlling the Kind of Output

Compilation can involve up to four stages: preprocessing, compilation proper, assembly and linking, always in that order. The first three stages apply to an individual source file, and end by producing an object file; linking combines all the object files (those newly compiled, and those specified as input) into an executable file. Note that TIGCC does not use GNU C linker, because it can not produce TI-89 and TI-92+ executables (.89z and .9xz). Instead, it uses special linker, created by Xavier Vassor & Niklas Brunlid.

For any given input file, the file name suffix determines what kind of compilation is done:

file.c
C source code which must be preprocessed.

file.i
C source code which should not be preprocessed.

file.h
C header file (not to be compiled or linked).

file.s
Assembler code.

file.S
Assembler code which must be preprocessed.

other
An object file to be fed straight into linking. Any file name with no recognized suffix is treated this way.
You can specify the input language explicitly with the '-x' option:
-x language

Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next '-x' option. Principally, GNU C support the following values for language are: c, objective-c, c++, c-header, cpp-output, c++-cpp-output, assembler and assembler-with-cpp. As TIGCC does not support C++ and Objective-C, the only valid options with TIGCC are c, c-header, cpp-output, assembler and assembler-with-cpp.

-x none

Turn off any specification of a language, so that subsequent files are handled according to their file name suffixes (as they are if '-x' has not been used at all).

-pass-exit-codes

Normally the gcc compiler will exit with the code of 1 if any phase of the compiler returns a non-success return code. If you specify '-pass-exit-codes', the gcc program will instead return with numerically highest error produced by any phase that returned an error indication.
If you only want some of the stages of compilation, you can use '-x' (or filename suffixes) to tell gcc where to start, and one of the options '-c', '-S', or '-E' to say where gcc is to stop. Note that some combinations (for example, '-x cpp-output -E' instruct gcc to do nothing at all.
-c

Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an object file for each source file. By default, the object file name for a source file is made by replacing the suffix '.c', '.i', '.s', etc., with '.o'. Unrecognized input files, not requiring compilation or assembly, are ignored.

-S

Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non-assembler input file specified. By default, the assembler file name for a source file is made by replacing the suffix '.c', '.i', etc., with '.s'. Input files that don't require compilation are ignored.

-E

Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output. Input files which don't require preprocessing are ignored.

-o file

Place output in file file. This applies regardless to whatever sort of output is being produced, whether it be an executable file, an object file, an assembler file or preprocessed C code. Since only one output file can be specified, it does not make sense to use '-o' when compiling more than one input file, unless you are producing an executable file as output. If '-o' is not specified, the default is to put the object file for 'source.suffix' in 'source.o', its assembler file in 'source.s', and all preprocessed C source on standard output.

-v

Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper.

-pipe

Use pipes rather than temporary files for communication between the various stages of compilation (this fails to work on some systems where the assembler is unable to read from a pipe; but the GNU assembler has no trouble).

--help

Print (on the standard output) a description of the command line options understood by gcc. If the -v option is also specified then --help will also be passed on to the various processes invoked by gcc, so that they can display the command line options they accept. If the -W option is also specified then command line options which have no documentation associated with them will also be displayed.

Options Controlling C Dialect

The following options control the dialect of C that the compiler accepts:
-ansi

Support all ANSI standard C programs. This turns off certain features of GCC that are incompatible with ANSI C, such as the asm and typeof keywords, and some predefined macros that identify the type of system you are using. It also enables the undesirable and rarely used ANSI trigraph feature. It also disables recognition of C++ style '//' comments as well as the inline keyword. The alternate keywords __asm__, __extension__, __inline__ and __typeof__ continue to work despite '-ansi'. You would not want to use them in an ANSI C program, of course, but it is useful to put them in header files that might be included in compilations done with '-ansi'. Alternate predefined macros such as __unix__ are also available instead of unix, with or without '-ansi'.

The '-ansi' option does not cause non-ANSI programs to be rejected gratuitously. For that, '-pedantic' is required in addition to '-ansi'. See section Options to Request or Suppress Warnings.

The macro __STRICT_ANSI__ is predefined when the '-ansi' option is used. Some header files may notice this macro and refrain from declaring certain functions or defining certain macros that the ANSI standard doesn't call for; this is to avoid interfering with any programs that might use these names for other things.

Some functions like alloca are not builtin (open-coded) functions when '-ansi' is used.

NOTE: At the moment, the TIGCC library is dependent on the GNU C extensions, so for a while, never use the '-ansi' switch with TIGCC. Although this fact is not important for most TIGCC users, it will be corrected in the near future.

-fstd=value

Determine the language standard. A value for this option must be provided; possible values are

iso9899:1990Same as -ansi
iso9899:199409   ISO C as modified in amend. 1
iso9899:199xISO C 9x
c89same as -std=iso9899:1990
c9xsame as -std=iso9899:199x
gnu89default, iso9899:1990 + gnu extensions
gnu9xiso9899:199x + gnu extensions

Even when this option is not specified, you can still use some of the features of newer standards in so far as they do not conflict with previous C standards. For example, you may use __restrict__ even when -fstd=c9x is not specified.

-fno-asm

Do not recognize asm, inline or typeof as a keyword, so that code can use these words as identifiers. You can use the keywords __asm__, __inline__ and __typeof__ instead. '-ansi' implies '-fno-asm'.

-fno-builtin

Don't recognize builtin functions that do not begin with '__builtin_' as prefix. GCC normally generates special code to handle certain builtin functions more efficiently; for instance, calls to alloca may become single instructions that adjust the stack directly, and calls to memcpy may become inline copy loops. The resulting code is often both smaller and faster, but since the function calls no longer appear as such, you cannot set a breakpoint on those calls, nor can you change the behavior of the functions by linking with a different library. As TIGCC library redirects nearly all builtin functions to TIOS calls, this option is hardly usable with TIGCC. The only functions which really acts like GNU C builtins are abs, labs and alloca,

-fhosted

Assert that compilation takes place in a hosted environment. This implies '-fbuiltin'. A hosted environment is one in which the entire standard library is available, and in which main has a return type of int (TIGCC is such environment). Examples are nearly everything except a kernel. This is equivalent to '-fno-freestanding'.

-ffreestanding

Assert that compilation takes place in a freestanding environment. This implies '-fno-builtin'. A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at main. The most obvious example is an OS kernel. This is equivalent to '-fno-hosted'. This option is obviously useless with TIGCC.

-trigraphs

Support ANSI C trigraphs. You should not know anything about this brain-damage. The '-ansi' option implies '-trigraphs'.

-traditional

Attempt to support some aspects of traditional C compilers. Specifically:

You cannot use '-traditional' if you include any header files that rely on ANSI C features (e.g. if you use TIGCCLIB library). The '-traditional' option also enables '-traditional-cpp', which is described next.

-traditional-cpp

Attempt to support some aspects of traditional C preprocessors. Specifically:


-fcond-mismatch

Allow conditional expressions with mismatched types in the second and third arguments. The value of such an expression is void.

-funsigned-char

Let the type char be unsigned, like unsigned char. Note that on TIGCC default char type is signed char. Ideally, a portable program should always use signed char or unsigned char when it depends on the signedness of an object. But many programs have been written to use plain char and expect it to be signed, or expect it to be unsigned, depending on the machines they were written for. This option, and its inverse, let you make such a program work with the opposite default. The type char is always a distinct type from each of signed char or unsigned char, even though its behavior is always just like one of those two.

-fsigned-char

Let the type char be signed, like signed char. Note that this is equivalent to '-fno-unsigned-char', which is the negative form of '-funsigned-char'. Likewise, the option '-fno-signed-char' is equivalent to '-funsigned-char'.

-fsigned-bitfields
-funsigned-bitfields
-fno-signed-bitfields
-fno-unsigned-bitfields

These options control whether a bitfield is signed or unsigned, when the declaration does not use either signed or unsigned. By default, such a bitfield is signed, because this is consistent: the basic integer types such as int are signed types. However, when '-traditional' is used, bitfields are all unsigned no matter what.

-fwritable-strings

Store string constants in the writable data segment and don't uniquize them. This is for compatibility with old programs which assume they can write into string constants. The option '-traditional' also has this effect. Writing into string constants is a very bad idea; "constants" should be constant.

-fallow-single-precision

Do not promote single precision math operations to double precision, even when compiling with '-traditional'. As both float and double are the same in TIGCC, this option is meaningless.

-fshort-wchar

Override the underlying type for 'wchar_t' to be 'short unsigned int' instead of the default for the target.

Options to Request or Suppress Warnings

Warnings are diagnostic messages that report constructions which are not inherently erroneous but which are risky or suggest there may have been an error. You can request many specific warnings with options beginning '-W', for example '-Wimplicit' to request warnings on implicit declarations. Each of these specific warning options also has a negative form beginning '-Wno-' to turn off warnings; for example, '-Wno-implicit'. This manual lists only one of the two forms, whichever is not the default.

These options control the amount and kinds of warnings produced by GCC:
-fsyntax-only

Check the code for syntax errors, but don't do anything beyond that.

-pedantic

Issue all the warnings demanded by strict ANSI C; reject all programs that use forbidden extensions. Valid ANSI C programs should compile properly with or without this option (though a rare few will require '-ansi'). However, without this option, certain GNU extensions and traditional C features are supported as well. With this option, they are rejected.

'-pedantic' does not cause warning messages for use of the alternate keywords whose names begin and end with '__'. Pedantic warnings are also disabled in the expression that follows __extension__. However, only system header files should use these escape routes; application programs should avoid them. See section Alternate Keywords.

This option is not intended to be useful; it exists only to satisfy pedants who would otherwise claim that GCC fails to support the ANSI standard. Some users try to use '-pedantic' to check programs for strict ANSI C conformance. They soon find that it does not do quite what they want. It finds some non-ANSI practices, but not all: only those for which ANSI C requires a diagnostic.

A feature to report any failure to conform to ANSI C might be useful in some instances, but would require considerable additional work and would be quite different from '-pedantic'. GNU team don't have plans to support such a feature in the near future.

-pedantic-errors

Like '-pedantic', except that errors are produced rather than warnings.

-w

Inhibit all warning messages.

-Wno-import

Inhibit warning messages about the use of '#import'.

-Wchar-subscripts

Warn if an array subscript has type char. This is a common cause of error, as programmers often forget that this type is signed on some machines (including TI).

-Wcomment

Warn whenever a comment-start sequence '/*' appears in a '/*' comment, or whenever a Backslash-Newline appears in a '//' comment.

-Wformat

Check calls to printf etc. to make sure that the arguments supplied have types appropriate to the format string specified (I am not sure that it works with TIGCCLIB, because these functions are implemented as smart macros).

-Wimplicit-int

Warn when a declaration does not specify a type.

-Wimplicit-function-declaration
-Werror-implicit-function-declaration

Give a warning (or error) whenever a function is used before being declared.

-Wimplicit

Same as '-Wimplicit-int' and '-Wimplicit-function-declaration'.

-Wmain

Warn if the type of 'main' is suspicious. 'main' should be a function with external linkage, returning int, taking either zero arguments, two, or three arguments of appropriate types. Anyway, 'main' is meaningless under TIGCC: its main entry point is '_main' instead, and it should be a void function, taking zero arguments.

-Wmultichar

Warn if a multicharacter constant (like 'FOOF') is used. Usually they indicate a typo in the user's code, as they have implementation-defined values, and should not be used in portable code.

-Wparentheses

Warn if parentheses are omitted in certain contexts, such as when there is an assignment in a context where a truth value is expected, or when operators are nested whose precedence people often get confused about. Also warn about constructions where there may be confusion to which if statement an else branch belongs. Here is an example of such a case:
{
  if (a)
    if (b)
      foo ();
  else
    bar ();
}
In C, every else branch belongs to the innermost possible if statement, which in this example is if (b). This is often not what the programmer expected, as illustrated in the above example by indentation the programmer chose. When there is the potential for this confusion, GNU C will issue a warning when this flag is specified. To eliminate the warning, add explicit braces around the innermost if statement so there is no way the else could belong to the enclosing if. The resulting code would look like this:
{
  if (a)
    {
      if (b)
        foo ();
      else
        bar ();
    }
}
Misunderstanding of if-else matching is quite common error in C programming.

-Wreturn-type

Warn whenever a function is defined with a return-type that defaults to int. Also warn about any return statement with no return-value in a function whose return-type is not void.

-Wswitch

Warn whenever a switch statement has an index of enumeral type and lacks a case for one or more of the named codes of that enumeration (the presence of a default label prevents this warning). case labels outside the enumeration range also provoke warnings when this option is used.

-Wtrigraphs

Warn if any trigraphs are encountered (assuming they are enabled).

-Wunused

Warn whenever a variable is unused aside from its declaration, whenever a function is declared static but never defined, whenever a label is declared but not used, and whenever a statement computes a result that is explicitly not used. In order to get a warning about an unused function parameter, you must specify both '-W' and '-Wunused'.

To suppress this warning for an expression, simply cast it to void. For unused variables, parameters and labels, use the 'unused' attribute (see section Specifying Attributes of Variables).

-Wuninitialized

Warn if an automatic variable is used without first being initialized or if a variable may be clobbered by a setjmp call (I am not sure whether setjmp problems may be detected with TIGCC). These warnings are possible only in optimizing compilation, because they require data flow information that is computed only when optimizing. If you don't specify '-O', you simply won't get these warnings.

These warnings occur only for variables that are candidates for register allocation. Therefore, they do not occur for a variable that is declared volatile, or whose address is taken, or whose size is other than 1, 2, 4 or 8 bytes. Also, they do not occur for structures, unions or arrays, even when they are in registers. Note that there may be no warning about a variable that is used only to compute a value that itself is never used, because such computations may be deleted by data flow analysis before the warnings are printed.

These warnings are made optional because GCC is not smart enough to see all the reasons why the code might be correct despite appearing to have an error. Here is one example of how this can happen:
{
  int x;
  switch (y)
    {
    case 1: x = 1;
      break;
    case 2: x = 4;
      break;
    case 3: x = 5;
    }
  foo (x);
}
If the value of y is always 1, 2 or 3, then x is always initialized, but GCC doesn't know this. Here is another common case:
{
  int save_y;
  if (change_y) save_y = y, y = new_y;
  ...
  if (change_y) y = save_y;
}
This has no bug because save_y is used only if it is set.

This option also warns when a nonvolatile automatic variable might be changed by a call to longjmp. These warnings as well are possible only in optimizing compilation (although I am not sure that they can be catched at all with TIGCC). The compiler sees only the calls to setjmp. It cannot know where longjmp will be called; in fact, an interrupt handler could call it at any point in the code. As a result, you may get a warning even when there is in fact no problem because longjmp cannot in fact be called at the place which would cause a problem.

Some spurious warnings can be avoided if you declare all the functions you use that never return as noreturn. See section Declaring Attributes of Functions.

-Wunknown-pragmas

Warn when a #pragma directive is encountered which is not understood by GCC. If this command line option is used, warnings will even be issued for unknown pragmas in system header files. This is not the case if the warnings were only enabled by the '-Wall' command line option.

-Wall

All of the above '-W' options combined. This enables all the warnings about constructions that some users consider questionable, and that are easy to avoid (or modify to prevent the warning), even in conjunction with macros.
The following '-W...' options are not implied by '-Wall'. Some of them warn about constructions that users generally do not consider questionable, but which occasionally you might wish to check for; others warn about constructions that are necessary or hard to avoid in some cases, and there is no simple way to modify the code to suppress the warning.
-W

Print extra warning messages for these events:


-Wfloat-equal

Warn if floating point values are used in equality comparisons.

-Wtraditional

Warn about certain constructs that behave differently in traditional and ANSI C.

-Wundef

Warn if an undefined identifier is evaluated in an '#if' directive.

-Wshadow

Warn whenever a local variable shadows another local variable.

-Wid-clash-len

Warn whenever two distinct identifiers match in the first len characters. This may help you prepare a program that will compile with certain obsolete, brain-damaged compilers.

-Wlarger-than-len

Warn whenever an object of larger than len bytes is defined.

-Wpointer-arith

Warn about anything that depends on the "size of" a function type or of void. GNU C assigns these types a size of 1, for convenience in calculations with 'void *' pointers and pointers to functions.

-Wbad-function-cast

Warn whenever a function call is cast to a non-matching type. For example, warn if 'int malloc()' is cast to 'anything *'.

-Wcast-qual

Warn whenever a pointer is cast so as to remove a type qualifier from the target type. For example, warn if a 'const char *' is cast to an ordinary 'char *'.

-Wcast-align

Warn whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a 'char *' is cast to an 'int *' on machines where integers can only be accessed at two- or four-byte boundaries (which is the case with TI models).

-Wwrite-strings

Give string constants the type 'const char[length]' so that copying the address of one into a non-constant 'char *' pointer will get a warning. These warnings will help you find at compile time code that can try to write into a string constant, but only if you have been very careful about using const in declarations and prototypes. Otherwise, it will just be a nuisance; this is why we did not make '-Wall' request these warnings.

-Wconversion

Warn if a prototype causes a type conversion that is different from what would happen to the same argument in the absence of a prototype. This includes conversions of fixed point to floating and vice versa, and conversions changing the width or signedness of a fixed point argument except when the same as the default promotion. Also, warn if a negative integer constant expression is implicitly converted to an unsigned type. For example, warn about the assignment 'x = -1' if 'x' is unsigned. But do not warn about explicit casts like '(unsigned) -1'.

-Wsign-compare

Warn when a comparison between signed and unsigned values could produce an incorrect result when the signed value is converted to unsigned. This warning is also enabled by '-W'; to get the other warnings of '-W' without this warning, use '-W -Wno-sign-compare'.

-Waggregate-return

Warn if any functions that return structures or unions are defined or called.

-Wstrict-prototypes

Warn if a function is declared or defined without specifying the argument types (an old-style function definition is permitted without a warning if preceded by a declaration which specifies the argument types).

-Wmissing-prototypes

Warn if a global function is defined without a previous prototype declaration. This warning is issued even if the definition itself provides a prototype. The aim is to detect global functions that fail to be declared in header files.

-Wmissing-declarations

Warn if a global function is defined without a previous declaration. Do so even if the definition itself provides a prototype. Use this option to detect global functions that are not declared in header files.

-Wmissing-noreturn

Warn about functions which might be candidates for attribute noreturn. Note these are only possible candidates, not absolute ones. Care should be taken to manually verify functions actually do not ever return before adding the noreturn attribute, otherwise subtle code generation bugs could be introduced.

-Wpacked

Warn if a structure is given the packed attribute, but the packed attribute has no effect on the layout or size of the structure. Such structures may be mis-aligned for little benefit. For instance, in this code, the variable 'f.x' in 'struct bar' will be misaligned even though 'struct bar' does not itself have the packed attribute:
struct foo
  {
    int x;
    char a, b, c, d;
  } __attribute__((packed));

struct bar
  {
    char z;
    struct foo f;
  };
However, such cases are not very likely.

-Wpadded

Warn if padding is included in a structure, either to align an element of the structure or to align the whole structure. Sometimes when this happens it is possible to rearrange the fields of the structure to reduce the padding and so make the structure smaller.

-Wredundant-decls

Warn if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing.

-Wnested-externs

Warn if an extern declaration is encountered within a function.

-Wunreachable-code

Warn if the compiler detects that code will never be executed. This option is intended to warn when the compiler detects that at least a whole line of source code will never be executed, because some condition is never satisfied or because it is after a procedure that never returns.

It is possible for this option to produce a warning even though there are circumstances under which part of the affected line can be executed, so care should be taken when removing apparently-unreachable code. For instance, when a function is inlined, a warning may mean that the line is unreachable in only one inlined copy of the function.

This option is not made part of '-Wall' because in a debugging version of a program there is often substantial code which checks correct functioning of the program and is, hopefully, unreachable because the program does work. Another common use of unreachable code is to provide behaviour which is selectable at compile-time.

-Winline

Warn if a function can not be inlined and it was declared as inline.

-Wlong-long

Warn if 'long long' type is used. This is default. To inhibit the warning messages, use '-Wno-long-long'. Flags '-Wlong-long' and '-Wno-long-long' are taken into account only when '-pedantic' flag is used.

-Werror

Make all warnings into errors.

Options for Debugging Your Program or GCC

GCC has a lot of special options that are used for debugging either your program or GCC itself. For example, '-g' Produce debugging information in the operating system's native format. Unfortunately, as the TIGCC linker doesn't understand debugging information yet, and as there is still no TIGCC debugger, a lot of these options are useless with TIGCC. This will probably be corrected in the future. Some debugging options like '-p', '-a' and '-ax' (which are used for generating the code for writing profile information and for profiling basic blocks) will not be rejected by the TIGCC linker, but they require special library support which is not implemented yet. At the moment, only debugging options which have any sense with the TIGCC are the following ones:

-Q

Makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes.

-dletters

Says to make debugging dumps during compilation at times specified by letters. The file names for most of the dumps are made by appending a pass number and a word to the source file name (e.g. 'foo.c.00.rtl' or 'foo.c.01.jump'). The purpose of this option is for debugging the compiler itself, but maybe you can find some other applications for them. Here are the possible letters for use in letters, and their meanings (note that you need to know something about the compiler theory to understand some of these options):

'A' Annotate the assembler output with miscellaneous debugging information.
'b' Dump after computing branch probabilities, to 'file.07.bp'.
'c' Dump after instruction combination, to the file 'file.09.combine'.
'd' Dump after delayed branch scheduling, to 'file.19.dbr'.
'D' Dump all macro definitions, at the end of preprocessing, in addition to normal output.
'F' Dump after purging ADDRESSOF, to 'file.03.addressof'.
'f' Dump after flow analysis, to 'file.08.flow'.
'g' Dump after global register allocation, to 'file.13.greg'.
'G' Dump after GCSE, to 'file.04.gcse'.
'j' Dump after first jump optimization, to 'file.01.jump'.
'J' Dump after last jump optimization, to 'file.17.jump2'.
'k' Dump after conversion from registers to stack, to 'file.20.stack'.
'l' Dump after local register allocation, to 'file.12.lreg'.
'L' Dump after loop optimization, to 'file.05.loop'.
'M' Dump after performing the machine dependent reorganisation pass, to 'file.18.mach'.
'N' Dump after the register move pass, to 'file.10.regmove'.
'r' Dump after RTL generation, to 'file.00.rtl'.
'R' Dump after the second instruction scheduling pass, to 'file.16.sched2'.
's' Dump after CSE (including the jump optimization that sometimes follows CSE), to 'file.02.cse'.
'S' Dump after the first instruction scheduling pass, to 'file.11.sched'.
't' Dump after the second CSE pass (including the jump optimization that sometimes follows CSE), to 'file.06.cse2'.
'a' Produce all the dumps listed above.
'm' Print statistics on memory usage, at the end of the run, to standard error.
'p' Annotate the assembler output with a comment indicating which innstruction pattern and alternative was used. The length of each instruction is also printed.
'v' For each of the other indicated dump files (except for 'file.00.rtl'), dump a representation of the control flow graph suitible for viewing with VCG to 'file.pass.vcg'.
'w' Dump after the second flow pass to 'file.14.flow2'.
'x' Just generate RTL for a function instead of compiling it. Usually used with 'r'.
'y' Dump debugging information during parsing, to standard error.
'z' Dump after the peephole2 pass to 'file.15.peephole2'.


-fdump-unnumbered

When doing debugging dumps (see '-d' option above), suppress instruction numbers and line number note output. This makes it more feasible to use diff on debugging dumps for compiler invokations with different options, in particular with and without '-g'.

-save-temps

Store the usual "temporary" intermediate files permanently; place them in the current directory and name them based on the source file. Thus, compiling 'foo.c' with '-c -save-temps' would produce files 'foo.i' and 'foo.s', as well as 'foo.o'.

-time

Report the CPU time taken by each subprocess in the compilation sequence. For C source files, this is the preprocessor, compiler proper, and assembler. The output looks like this:
# cpp 0.04 0.04
# cc1 0.12 0.01
# as 0.00 0.01
The first number on each line is the "user time," that is time spent executing the program itself. The second number is "system time," time spent executing operating system routines on behalf of the program. Both numbers are in seconds.

-print-prog-name=program

Print the full absolute name of the invoked program program (as 'cpp' etc.) if it was called successfully, and don't do anything else. With this purely diagnostic option, GCC does not compile or link anything; it just prints the file name.

-print-search-dirs

Print the name of the configured installation directory and a list of program and library directories GCC will search, and don't do anything else. This is useful when GCC prints the error message
installation problem, cannot exec cpp: No such file or directory
To resolve this you either need to put 'cpp' and the other compiler components where gcc expects to find them, or you can set the environment variable GCC_EXEC_PREFIX to the directory where you installed them. Don't forget the trailing '/'. See section Environment Variables Affecting GCC. Anyway, it is not likely that you will ever use this option with TIGCC.

Options That Control Optimization

These options control various sorts of optimizations:
-O
-O1

Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function.

Without '-O', the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results. Statements are independent: if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the function and get exactly the results you would expect from the source code (this statement is currently meaningless with the TIGCC package, because there is no integrated debugger yet). Without '-O', the compiler only allocates variables declared register in registers.

With '-O', the compiler tries to reduce code size and execution time.

When you specify '-O', the compiler turns on '-fthread-jumps' and '-fdefer-pop'. The compiler turns on '-fdelayed-branch' on machines that have delay slots, and '-fomit-frame-pointer' on machines that can support debugging even without a frame pointer (this is not the case with the Motorola 68000, i.e. with TIGCC).

-O2

Optimize even more. GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff. The compiler does not perform loop unrolling or function inlining when you specify '-O2'. As compared to '-O', this option increases both compilation time and the performance of the generated code.

'-O2' turns on all optional optimizations except for loop unrolling and function inlining. It also turns on the '-fforce-mem' option on all machines and frame pointer elimination on machines where doing so does not interfere with debugging.

-O3

Optimize yet more. '-O3' turns on all optimizations specified by '-O2' and also turns on the 'inline-functions' option.

-O0

Do not optimize.

-Os

Optimize for size. '-Os' enables all '-O2' optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.

If you use multiple '-O' options, with or without level numbers, the last such option is the one that is effective.
Options of the form '-fflag' specify machine-independent flags. Most flags have both positive and negative forms; the negative form of '-ffoo' would be '-fno-foo'. In the table below, only one of the forms is listed: the one which is not the default. You can figure out the other form by either removing 'no-' or adding it.
-ffloat-store

Do not store floating point variables in registers, and inhibit other options that might change whether a floating point value is taken from a register or memory. As TI calculators does not have a math coprocessor, this option is meaningless with TIGCC.

-fno-defer-pop

Always pop the arguments to each function call as soon as that function returns. For machines which must pop arguments after a function call (like Motorola 68000), the compiler normally lets arguments accumulate on the stack for several function calls and pops them all at once.

-fforce-mem

Force memory operands to be copied into registers before doing arithmetic on them. This produces better code by making all memory references potential common subexpressions. When they are not common subexpressions, instruction combination should eliminate the separate register-load. The '-O2' option turns on this option.

-fforce-addr

Force memory address constants to be copied into registers before doing arithmetic on them. This may produce better code just as '-fforce-mem' may.

-fomit-frame-pointer

Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions. Note however that you must not use this option if you use floating point operators: TIOS routines for floating point arithmetic assume that the frame pointer is always present!

-fno-inline

Don't pay attention to the inline keyword. Normally this option is used to keep the compiler from expanding any functions inline. Note that if you are not optimizing, no functions can be expanded inline.

-finline-functions

Integrate all simple functions into their callers. The compiler heuristically decides which functions are simple enough to be worth integrating in this way.

If all calls to a given function are integrated, and the function is declared static, then the function is normally not output as assembler code in its own right.

-finline-limit=n

By default, GCC limits the size of functions that can be inlined. This flag allows the control of this limit for functions that are explicitly marked as inline (ie marked with the inline keyword). n is the size of functions that can be inlined in number of pseudo instructions (not counting parameter handling). The default value of n is 10000 (be aware that this default is too big for usage on TI calculators). Increasing this value can result in more inlined code at the cost of compilation time and memory consumption. Decreasing usually makes the compilation faster and less code will be inlined (which presumably means slower programs).

NOTE: pseudo instruction represents, in this particular context, an abstract measurement of function's size. In no way, it represents a count of assembly instructions and as such its exact meaning might change from one release to an another.

-fkeep-inline-functions

Even if all calls to a given function are integrated, and the function is declared static, nevertheless output a separate run-time callable version of the function. This switch does not affect extern inline functions.

-fkeep-static-consts

Emit variables declared static const when optimization isn't turned on, even if the variables aren't referenced.

GCC enables this option by default. If you want to force the compiler to check if the variable was referenced, regardless of whether or not optimization is turned on, use the '-fno-keep-static-consts' option.

-fno-function-cse

Do not put function addresses in registers; make each instruction that calls a constant function contain the function's address explicitly.

This option results in less efficient code, but some strange hacks that alter the assembler output may be confused by the optimizations performed when this option is not used.

-ffast-math

This option allows GCC to violate some ANSI or IEEE rules and/or specifications in the interest of optimizing code for speed. For example, it allows the compiler to assume arguments to the sqrt function are non-negative numbers and that no floating-point values are NaNs (although, this option is useless with TIGCC, because it uses non-IEEE floating point format). This option should never be turned on by any '-O' option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ANSI rules/specifications for math functions.

-fno-math-errno

Do not set ERRNO after calling math functions that are executed with a single instruction, e.g. sqrt. A program that relies on IEEE exceptions for math error handling may want to use this flag for speed while maintaining IEEE arithmetic compatibility (useless with TIGCC, because it uses non-IEEE floating point format). The default is '-fmath-errno'. The '-ffast-math' option sets '-fno-math-errno'.
The following options control specific optimizations. The '-O2' option turns on all of these optimizations except '-funroll-loops' and '-funroll-all-loops'. On most machines, the '-O' option turns on the '-fthread-jumps' and '-fdelayed-branch' options, but specific machines may handle it differently.

You can use the following flags in the rare cases when "fine-tuning" of optimizations to be performed is desired.
-fstrength-reduce

Perform the optimizations of loop strength reduction and elimination of iteration variables.

-fthread-jumps

Perform optimizations where we check to see if a jump branches to a location where another comparison subsumed by the first is found. If so, the first branch is redirected to either the destination of the second branch or a point immediately following it, depending on whether the condition is known to be true or false.

-fcse-follow-jumps

In common subexpression elimination (CSE), scan through jump instructions when the target of the jump is not reached by any other path. For example, when CSE encounters an if statement with an else clause, CSE will follow the jump when the condition tested is false.

-fcse-skip-blocks

This is similar to '-fcse-follow-jumps', but causes CSE to follow jumps which conditionally skip over blocks. When CSE encounters a simple if statement with no else clause, '-fcse-skip-blocks' causes CSE to follow the jump around the body of the if.

-frerun-cse-after-loop

Re-run common subexpression elimination after loop optimizations has been performed.

-frerun-loop-opt

Run the loop optimizer twice.

-fgcse

Perform a global common subexpression elimination pass. This pass also performs global constant and copy propagation.

-fdelete-null-pointer-checks

Use global dataflow analysis to identify and eliminate useless null pointer checks. Programs which rely on NULL pointer dereferences not halting the program may not work properly with this option. Use '-fno-delete-null-pointer-checks' to disable this optimizing for programs which depend on that behavior.

-fexpensive-optimizations

Perform a number of minor optimizations that are relatively expensive.

-foptimize-register-moves
-fregmove

Attempt to reassign register numbers in move instructions and as operands of other simple instructions in order to maximize the amount of register tying. This is especially helpful on machines with two-operand instructions. GCC enables this optimization by default with '-O2' or higher.

Note that '-fregmove' and '-foptimize-register-moves' are the same optimization.

-fdelayed-branch

Attempt to reorder instructions to exploit instruction slots available after delayed branch instructions.

-fschedule-insns

Attempt to reorder instructions to eliminate execution stalls due to required data being unavailable.

-fschedule-insns2

Similar to '-fschedule-insns', but requests an additional pass of instruction scheduling after register allocation has been done.

-ffunction-sections
-fdata-sections

Place each function or data item into its own section in the output file if the target supports arbitrary sections (I don't believe that it is possible with TIGCC). The name of the function or the name of the data item determines the section's name in the output file. Only use these options when there are significant benefits from doing so (i.e. ignore it).

-fcaller-saves

Enable values to be allocated in registers that will be clobbered by function calls, by emitting extra instructions to save and restore the registers around such calls. Such allocation is done only when it seems to result in better code than would otherwise be produced. Optimization level 2 and higher enables this flag by default.

-funroll-loops

Perform the optimization of loop unrolling. This is only done for loops whose number of iterations can be determined at compile time or run time. '-funroll-loops' implies both '-fstrength-reduce' and '-frerun-cse-after-loop'.

-funroll-all-loops

Perform the optimization of loop unrolling. This is done for all loops and usually makes programs run more slowly. '-funroll-all-loops' implies '-fstrength-reduce' as well as '-frerun-cse-after-loop'.

-fmove-all-movables

Forces all invariant computations in loops to be moved outside the loop.

-freduce-all-givs

Forces all general-induction variables in loops to be strength-reduced.

NOTE: These "loop" options may generate better or worse code; results are highly dependent on the structure of loops within the source code. These two options are intended to be removed someday, once they have helped determine the efficacy of various approaches to improving loop optimizations. Please let GNU team (gcc@gcc.gnu.org) know how use of these options affects the performance of your production code. They are very interested in code that runs slower when these options are enabled.

-fno-peephole

Disable any machine-specific peephole optimizations.

-fbranch-probabilities

After running a program compiled with '-fprofile-arcs' (see section Options for Debugging Your Program or GCC), you can compile it a second time using '-fbranch-probabilities', to improve optimizations based on guessing the path a branch might take.

With '-fbranch-probabilities', GCC puts a 'REG_EXEC_COUNT' note on the first instruction of each basic block, and a 'REG_BR_PROB' note on each 'JUMP_INSN' and 'CALL_INSN'. These can be used to improve optimization.

-fstrict-aliasing

Activates optimizations based on the type of expressions. In particular, an object of one type is assumed never to reside at the same address as an object of a different type, unless the types are almost the same. For example, an 'unsigned int' can alias an 'int', but not a 'void *' or a 'float'. A character type may alias any other type. Pay special attention to code like this:
union a_union
  {
    int i;
    float f;
  };

int foo()
{
  a_union t;
  t.f = 3.0;
  return t.i;
}
The practice of reading from a different union member than the one most recently written to (called "type-punning") is common. Even with '-fstrict-aliasing', type-punning is allowed, provided the memory is accessed through the union type. So, the code above will work as expected. However, this code might not:
int foo()
{
  a_union t;
  int *ip;
  t.f = 3.0;
  ip = &t.i;
  return *ip;
}
You can see from the above example what we are talking about.

-falign-functions
-falign-functions=n

Align the start of functions to the next power-of-two greater than n, skipping up to n bytes. For instance, '-falign-functions=32' aligns functions to the next 32-byte boundary, but '-falign-functions=24' would align to the next 32-byte boundary only if this can be done by skipping 23 bytes or less.

'-fno-align-functions' and '-falign-functions=1' are equivalent and mean that functions will not be aligned. If n is not specified, use a machine-dependent default.

-falign-labels
-falign-labels=n

Align all branch targets to a power-of-two boundary, skipping up to n bytes like '-falign-functions'. This option can easily make code slower, because it must insert dummy operations for when the branch target is reached in the usual flow of the code.

If '-falign-loops' or '-falign-jumps' are applicable and are greater than this value, then their values are used instead. If n is not specified, use a machine-dependent default which is very likely to be '1', meaning no alignment.

-falign-loops
-falign-loops=n

Align loops to a power-of-two boundary, skipping up to n bytes like '-falign-functions'. The hope is that the loop will be executed many times, which will make up for any execution of the dummy operations.

If n is not specified, use a machine-dependent default.

-falign-jumps
-falign-jumps=n

Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like '-falign-functions'. In this case, no dummy operations need be executed.

If n is not specified, use a machine-dependent default.

Options Controlling the Preprocessor

These options control the C preprocessor, which is run on each C source file before actual compilation.

If you use the '-E' option, nothing is done except preprocessing. Some of these options make sense only together with '-E' because they cause the preprocessor output to be unsuitable for actual compilation.
-include file

Process file as input before processing the regular input file. In effect, the contents of file are compiled first. Any '-D' and '-U' options on the command line are always processed before '-include file', regardless of the order in which they are written. All the '-include' and '-imacros' options are processed in the order in which they are written.

-imacros file

Process file as input, discarding the resulting output, before processing the regular input file. Because the output generated from file is discarded, the only effect of '-imacros file' is to make the macros defined in file available for use in the main input. Any '-D' and '-U' options on the command line are always processed before '-imacros file', regardless of the order in which they are written. All the '-include' and '-imacros' options are processed in the order in which they are written.

-idirafter dir

Add the directory dir to the second include path. The directories on the second include path are searched when a header file is not found in any of the directories in the main include path (the one that '-I' adds to).

-iprefix prefix

Specify prefix as the prefix for subsequent '-iwithprefix' options.

-iwithprefix dir

Add a directory to the second include path. The directory's name is made by concatenating prefix and dir, where prefix was specified previously with '-iprefix'. If you have not specified a prefix yet, the directory containing the installed passes of the compiler is used as the default.

-iwithprefixbefore dir

Add a directory to the main include path. The directory's name is made by concatenating prefix and dir, as in the case of '-iwithprefix'.

-isystem dir

Add a directory to the beginning of the second include path, marking it as a system directory, so that it gets the same special treatment as is applied to the standard system directories.

-nostdinc

Do not search the standard system directories for header files. Only the directories you have specified with '-I' options (and the current directory, if appropriate) are searched. See section Options for Directory Search, for information on '-I'. By using both '-nostdinc' and '-I-', you can limit the include-file search path to only those directories you specify explicitly.

-undef

Do not predefine any nonstandard macros (including architecture flags).

-E

Run only the C preprocessor. Preprocess all the C source files specified and output the results to standard output or to the specified output file.

-C

Tell the preprocessor not to discard comments. Used with the '-E' option.

-P

Tell the preprocessor not to generate '#line' directives. Used with the '-E' option.

-M

Tell the preprocessor to output a rule suitable for make describing the dependencies of each object file. For each source file, the preprocessor outputs one make-rule whose target is the object file name for that source file and whose dependencies are all the #include header files it uses. This rule may be a single line or may be continued with backslash-newline if it is long. The list of rules is printed on standard output instead of the preprocessed C program. Note that '-M' implies '-E' too. Another way to specify output of a make rule is by setting the environment variable DEPENDENCIES_OUTPUT (see section Environment Variables Affecting GCC). Anyway, this option is hardly usable with TIGCC.

-MM

Like '-M' but the output mentions only the user header files included with '#include "file"'. System header files included with '#include <file>' are omitted.

-MD

Like '-M' but the dependency information is written to a file made by replacing ".c" with ".d" at the end of the input file names. This is in addition to compiling the file as specified: '-MD' does not inhibit ordinary compilation the way '-M' does.

-MMD

Like '-MD' except mention only user header files, not system header files.

-MG

Treat missing header files as generated files and assume they live in the same directory as the source file. If you specify '-MG', you must also specify either '-M' or '-MM'. '-MG' is not supported with '-MD' or '-MMD'.

-H

Print the name of each header file used, in addition to other normal activities.

-Aquestion(answer)

Assert the answer answer for question, in case it is tested with a preprocessing conditional such as '#if #question(answer)'. '-A-' disables the standard assertions that normally describe the target machine.

-Dmacro

Define macro macro with the string '1' as its definition.

-Dmacro=defn

Define macro macro as defn. All instances of '-D' on the command line are processed before any '-U' options.

-Umacro

Undefine macro macro. '-U' options are evaluated after all '-D' options, but before any '-include' and '-imacros' options.

-dM

Tell the preprocessor to output only a list of the macro definitions that are in effect at the end of preprocessing. Used with the '-E' option.

-dD

Tell the preprocessing to pass all macro definitions into the output, in their proper sequence in the rest of the output.

-dN

Like '-dD' except that the macro arguments and contents are omitted. Only '#define name' is included in the output.

-trigraphs

Support ANSI C trigraphs. The '-ansi' option also has this effect.

-Wp,option

Pass option as an option to the preprocessor. If option contains commas, it is split into multiple options at the commas.

Passing Options to the Assembler

You can pass options to the GNU assembler.
-Wa,option

Pass option as an option to the assembler. If option contains commas, it is split into multiple options at the commas.

Options for Linking

These options come into play when the compiler links object files into an executable output file. They are meaningless for usage with TIGCC, because the compiler is not doing a link step using default GNU C linker, but a special linker (made by Xavier Vassor & Niklas Brunlid) which produces .89z or .9xz executables, and it does not accept any special options so far. That's why these options will not be described in this document.

Options for Directory Search

These options specify directories to search for header files, for libraries and for parts of the compiler:
-Idir

Add the directory dir to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched before the system header file directories. If you use more than one '-I' option, the directories are scanned in left-to-right order; the standard system directories come after.

-I-

Any directories you specify with '-I' options before the '-I-' option are searched only for the case of '#include "file"'; they are not searched for '#include <file>'.

If additional directories are specified with '-I' options after the '-I-', these directories are searched for all '#include' directives (ordinarily all '-I' directories are used this way). In addition, the '-I-' option inhibits the use of the current directory (where the current input file came from) as the first search directory for '#include "file"'. There is no way to override this effect of '-I-'. With '-I.' you can specify searching the directory which was current when the compiler was invoked. That is not exactly the same as what the preprocessor does by default, but it is often satisfactory.

'-I-' does not inhibit the use of the standard system directories for header files. Thus, '-I-' and '-nostdinc' are independent.

-Ldir

Add directory dir to the list of directories to be searched for '-l'.

-Bprefix

This option specifies where to find the executables, libraries, include files, and data files of the compiler itself.

The compiler driver program runs one or more of the subprograms 'cpp', 'cc1', 'as' and 'ld' (a special linker is used instead of 'ld' with TIGCC). It tries prefix as a prefix for each program it tries to run, both with and without 'machine/version/' (see section Specifying Target Machine and Compiler Version).

For each subprogram to be run, the compiler driver first tries the '-B' prefix, if any. If that name is not found, or if '-B' was not specified, the driver tries two standard prefixes, which are '/usr/lib/gcc/' and '/usr/local/lib/gcc-lib/'. If neither of those results in a file name that is found, the unmodified program name is searched for using the directories specified in your 'PATH' environment variable.

'-B' prefixes that effectively specify directory names also apply to includes files in the preprocessor, because the compiler translates these options into '-isystem' options for the preprocessor. In this case, the compiler appends 'include' to the prefix.

Another way to specify a prefix much like the '-B' prefix is to use the environment variable GCC_EXEC_PREFIX. See section Environment Variables Affecting GCC.

-specs=file

Process file after the compiler reads in the standard 'specs' file, in order to override the defaults that the 'gcc' driver program uses when determining what switches to pass to 'cc1', 'as', etc. More than one '-specs='file can be specified on the command line, and they are processed in order, from left to right.

Specifying subprocesses and the switches to pass to them

GCC is a driver program. It performs its job by invoking a sequence of other programs to do the work of compiling, assembling and linking. GCC interprets its command-line parameters and uses these to deduce which programs it should invoke, and which command-line options it ought to place on their command lines. This behaviour is controlled by spec strings. In most cases there is one spec string for each program that GCC can invoke, but a few programs have multiple spec strings to control their behaviour. The spec strings built into GCC can be overridden by using the '-specs=' command-line switch to specify a spec file.

Spec files are plaintext files that are used to construct spec strings. They consist of a sequence of directives separated by blank lines. The type of directive is determined by the first non-whitespace character on the line and it can be one of the following:
%command

Issues a command to the spec file processor. The commands that can appear here are:

%include <file>

Search for file and insert its text at the current point in the specs file.

%include_noerr <file>

Just like '%include', but do not generate an error message if the include file cannot be found.

%rename old_name new_name

Rename the spec string old_name to new_name.

*[spec_name]:

This tells the compiler to create, override or delete the named spec string. All lines after this directive up to the next directive or blank line are considered to be the text for the spec string. If this results in an empty string then the spec will be deleted (or, if the spec did not exist, then nothing will happened). Otherwise, if the spec does not currently exist a new spec will be created. If the spec does exist then its contents will be overridden by the text of this directive, unless the first character of that text is the '+' character, in which case the text will be appended to the spec.

[suffix]:

Creates a new '[suffix] spec' pair. All lines after this directive and up to the next directive or blank line are considered to make up the spec string for the indicated suffix. When the compiler encounters an input file with the named suffix, it will processes the spec string in order to work out how to compile that file. For example:
.ZZ:
z-compile -input %i
This says that any input file whose name ends in '.ZZ' should be passed to the program 'z-compile', which should be invoked with the command-line switch '-input' and with the result of performing the '%i' substitution (see below).

As an alternative to providing a spec string, the text that follows a suffix directive can be one of the following:

@language

This says that the suffix is an alias for a known language. This is similar to using the '-x' command-line switch to GCC to specify a language explicitly. For example:
.ZZ:
@c++
Says that '.ZZ' files are, in fact, C++ source files.

#name

This causes an error messages saying:
name compiler not installed on this system.
It allows recognizing of extensions which are not yet supported.

GCC already has an extensive list of suffixes built into it. This directive will add an entry to the end of the list of suffixes, but since the list is searched from the end backwards, it is effectively possible to override earlier entries using this technique.
GCC has the following spec strings built into it (note that not all of them are applicable with the TIGCC). Spec files can override these strings or create their own.

asmOptions to pass to the assembler
asm_finalOptions to pass to the assembler post-processor
cppOptions to pass to the C preprocessor
cc1Options to pass to the C compiler
cc1plusOptions to pass to the C++ compiler (not valid with TIGCC)
endfileObject files to include at the end of the link
linkOptions to pass to the linker (not valid with TIGCC)
libLibraries to include on the command line to the linker (not valid with TIGCC)
libgccDecides which GCC support library to pass to the linker (not valid with TIGCC)
linkerSets the name of the linker
predefinesDefines to be passed to the C preprocessor
signed_charDefines to pass to CPP to say whether char is signed by default
startfileObject files to include at the start of the link (not valid with TIGCC)

Here is a small example of a spec file:
%rename lib                 old_lib

*lib:
--start-group -lgcc -lc -leval1 --end-group %(old_lib)
This example renames the spec called 'lib' to 'old_lib' and then overrides the previous definition of 'lib' with a new one. The new definition adds in some extra command-line options before including the text of the old definition.

Spec strings are a list of command-line options to be passed to their corresponding program. In addition, the spec strings can contain '%'-prefixed sequences to substitute variable text or to conditionally insert text into the command line. Using these constructs it is possible to generate quite complex command lines.

Here is a list of all defined '%'-sequences for spec strings. Note that spaces are not generated automatically around the results of expanding these sequences. Therefore you can concatenate them together or combine them with constant text in a single argument.
%%

Substitute one '%' into the program name or argument.

%i

Substitute the name of the input file being processed.

%b

Substitute the basename of the input file being processed. This is the substring up to (and not including) the last period and not including the directory.

%d

Marks the argument containing or following the '%d' as a temporary file name, so that that file will be deleted if GCC exits successfully. Unlike '%g', this contributes no text to the argument.

%gsuffix

Substitute a file name that has suffix suffix and is chosen once per compilation, and mark the argument in the same way as '%d'. To reduce exposure to denial-of-service attacks, the file name is now chosen in a way that is hard to predict even when previously chosen file names are known. For example, '%g.s ... %g.o ... %g.s' might turn into 'ccUVUUAU.s ccXYAXZ12.o ccUVUUAU.s'. suffix matches the regular expression '[.A-Za-z]*' or the special string '%O', which is treated exactly as if '%O' had been preprocessed. Previously, '%g' was simply substituted with a file name chosen once per compilation, without regard to any appended suffix (which was therefore treated just like ordinary text), making such attacks more likely to succeed.

%usuffix

Like '%g', but generates a new temporary file name even if '%usuffix' was already seen.

%Usuffix

Substitutes the last file name generated with '%usuffix', generating a new one if there is no such last file name. In the absence of any '%usuffix', this is just like '%gsuffix', except they don't share the same suffix space, so '%g.s ... %U.s ... %g.s ... %U.s' would involve the generation of two distinct file names, one for each '%g.s' and another for each '%U.s'. Previously, '%U' was simply substituted with a file name chosen for the previous '%u', without regard to any appended suffix.

%w

Marks the argument containing or following the '%w' as the designated output file of this compilation. This puts the argument into the sequence of arguments that '%o' will substitute later.

%o

Substitutes the names of all the output files, with spaces automatically placed around them. You should write spaces around the '%o' as well or the results are undefined. '%o' is for use in the specs for running the linker. Input files whose names have no recognized suffix are not compiled at all, but they are included among the output files, so they will be linked.

%O

Substitutes the suffix for object files. Note that this is handled specially when it immediately follows '%g', '%u', or '%U', because of the need for those to form complete file names. The handling is such that '%O' is treated exactly as if it had already been substituted, except that '%g', '%u', and '%U' do not currently support additional suffix characters following '%O' as they would following, for example, '.o'.

%p

Substitutes the standard macro predefinitions for the current target machine. Use this when running cpp.

%P

Like '%p', but puts '__' before and after the name of each predefined macro, except for macros that start with '__' or with '_L', where L is an uppercase letter. This is for ANSI C.

%I

Substitute a '-iprefix' option made from GCC_EXEC_PREFIX.

%s

Current argument is the name of a library or startup file of some sort. Search for that file in a standard list of directories and substitute the full name found.

%estr

Print str as an error message. str is terminated by a newline. Use this when inconsistent options are detected.

%|

Output '-' if the input for the current command is coming from a pipe.

%(name)

Substitute the contents of spec string name at this point.

%[name]

Like '%(...)' but put '__' around '-D' arguments.

%x{option}

Accumulate an option for '%X'.

%X

Output the accumulated linker options specified by '-Wl' or a '%x' spec string.

%Y

Output the accumulated assembler options specified by '-Wa'.

%Z

Output the accumulated preprocessor options specified by '-Wp'.

%v1

Substitute the major version number of GCC (for version 2.9.5, this is 2).

%v2

Substitute the minor version number of GCC (for version 2.9.5, this is 9).

%a

Process the asm spec. This is used to compute the switches to be passed to the assembler.

%A

Process the asm_final spec. This is a spec string for passing switches to an assembler post-processor, if such a program is needed.

%l

Process the link spec. This is the spec for computing the command line passed to the linker. Typically it will make use of the '%L', '%G', '%S', '%D' and '%E' sequences.

%D

Dump out a '-L' option for each directory that GCC believes might contain startup files. If the target supports multilibs then the current multilib directory will be prepended to each of these paths.

%L

Process the lib spec. This is a spec string for deciding which libraries should be included on the command line to the linker.

%G

Process the libgcc spec. This is a spec string for deciding which GCC support library should be included on the command line to the linker.

%S

Process the startfile spec. This is a spec for deciding which object files should be the first ones passed to the linker.

%E

Process the endfile spec. This is a spec string that specifies the last object files that will be passed to the linker.

%C

Process the cpp spec. This is used to construct the arguments to be passed to the C preprocessor.

%c

Process the signed_char spec. This is intended to be used to tell cpp whether a char is signed. It typically has the definition:
%{funsigned-char:-D__CHAR_UNSIGNED__}
So, when '-funsigned-char' option is given, __CHAR_UNSIGNED__ macro will be defined.

%1

Process the cc1 spec. This is used to construct the options to be passed to the actual C compiler ('cc1').

%2

Process the cc1plus spec. This is used to construct the options to be passed to the actual C++ compiler ('cc1plus').

%*

Substitute the variable part of a matched option. See below. Note that each comma in the substituted string is replaced by a single space.

%{S}

Substitutes the '-S' switch, if that switch was given to GCC. If that switch was not specified, this substitutes nothing. Note that the leading dash is omitted when specifying this option, and it is automatically inserted if the substitution is performed. Thus the spec string '%{foo}' would match the command-line option '-foo' and would output the command line option '-foo'.

%W{S}

Like '%{S}' but mark last argument supplied within as a file to be deleted on failure.

%{S*}

Substitutes all the switches specified to GCC whose names start with '-S', but which also take an argument. This is used for switches like '-o', '-D', '-I', etc. GCC considers '-o foo' as being one switch whose names starts with 'o'. '%{o*}' would substitute this text, including the space. Thus two arguments would be generated.

%{^S*}

Like '%{S*}', but don't put a blank between a switch and its argument. Thus '%{^o*}' would only generate one argument, not two.

%{S*:X}

Substitutes 'X' if one or more switches whose names start with '-S' are specified to GCC. Note that the tail part of the '-S' option (i.e. the part matched by the '*') will be substituted for each occurrence of '%*' within 'X'.

%{S:X}

Substitutes 'X', but only if the '-S' switch was given to GCC.

%{!S:X}

Substitutes 'X', but only if the '-S' switch was not given to GCC.

%{|S:X}

Like '%{S:X}', but if no 'S' switch, substitute '-'.

%{|!S:X}

Like '%{!S:X}', but if there is an 'S' switch, substitute '-'.

%{.S:X}

Substitutes 'X', but only if processing a file with suffix 'S'.

%{!.S:X}

Substitutes 'X', but only if not processing a file with suffix 'S'.

%{S|P:X}

Substitutes 'X' if either '-S' or '-P' was given to GCC. This may be combined with '!' and '.' sequences as well, although they have a stronger binding than the '|'. For example a spec string like this:
%{.c:-foo} %{!.c:-bar} %{.c|d:-baz} %{!.c|d:-boggle}
will output the following command-line options from the following input command-line options:
fred.c        -foo -baz
jim.d         -bar -boggle
-d fred.c     -foo -baz -boggle
-d jim.d      -bar -baz -boggle
The conditional text 'X' in a '%{S:X}' or '%{!S:X}' construct may contain other nested '%' constructs or spaces, or even newlines. They are processed as usual, as described above.

The '-O', '-f', '-m', and '-W' switches are handled specifically in these constructs. If another value of '-O' or the negated form of a '-f', '-m', or '-W' switch is found later in the command line, the earlier switch value is ignored, except with '{S*}' where 'S' is just one letter, which passes all matching options.

The character '|' at the beginning of the predicate text is used to indicate that a command should be piped to the following command, but only if '-pipe' is specified.

It is built into GCC which switches take arguments and which do not. You might think it would be useful to generalize this to allow each compiler's spec to say which switches take arguments. But this cannot be done in a consistent fashion. GCC cannot even decide which input files have been specified without knowing which switches take arguments, and it must know which input files to compile in order to tell which compilers to run.

GCC also knows implicitly that arguments starting in '-l' are to be treated as compiler output files, and passed to the linker in their proper position among the other output files.

Target Options

The TIGCC compiler is configured for just one target machine: The Motorola M68k family. In the TI-89 and TI-92+ calculators, an MC68000 processor is used, therefore TIGCC creates code for such a processor by default. However, switches specifying the processor model, such as '-m68020', still exist, although they are not useful. However, there are also options that control the code that is generated specificly for the TI calculators; they also start with '-m':
-mlong

Use long (32-bit) integers for type int. The '-mshort' option is enabled by default in TIGCC; the negative is actually '-mnoshort', but '-mno-short' and '-mlong' have been added as aliases. Constants such as INT_MAX are set to the appropriate values, and __INT_SHORT__ will be defined if short integers are used (i.e. if this switch is not used). This options may be useful if you need to port code from a system which uses long integers.

-mno-tios

Again, this is the negative form of a switch called -mtios, which changes the convention for returning pointers from functions, and which also implies -fcall-used-d2. This is necessary to make GCC work with the TIOS calling conventions, therefore -mno-tios may only be used if no TIOS functions are used at all. Since library calls also use the TIOS calling convention, they cannot be used either; you have to be careful here not to perform any long integer multiplication or division, array initializing, floating point arithmetic, etc. Only use this option if you know exactly what you are doing.

-mmlink

The TIGCC linker has a bug that occurs every time an uninitialized global variable is used in 'nostub' mode, and (even worse) every time an unitialized local static variable is used. By default, TIGCC works around this bug by initializing these variables (except global ones if they start with an underscore). This can be turned off with this switch; do this if you use the linker 'mlink'.

-mpcrel

Use the pc-relative addressing mode of the 68000 directly, instead of using a global offset table. At present, this option implies '-fpic', allowing at most a 16-bit offset for pc-relative addressing. '-fPIC' is not supported with '-mpcrel'.

NOTE: This option does not always work correctly in all cases. A common cause of errors is the use of long integers. Even code that compiles correctly sometimes causes "illegal instruction" errors. Any information is welcome.

-mstrict-align
-mno-strict-align

Do or do not assume that unaligned memory references will be handled by the system.

Options for Code Generation Conventions

These machine-independent options control the interface conventions used in code generation.

Most of them have both positive and negative forms; the negative form of '-ffoo' would be '-fno-foo'. In the table below, only one of the forms is listed: the one which is not the default. You can figure out the other form by either removing 'no-' or adding it.
-fexceptions

Enable exception handling. Generates extra code needed to propagate exceptions. This implies GNU C will generate frame unwind information for all functions, which can produce significant data size overhead, although it does not affect execution. Principally, you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in C++. For the moment, it is very unlikely that this option may be useful with TIGCC.

-funwind-tables

Similar to '-fexceptions', except that it will just generate any needed static data, but will not affect the generated code in any other way.

-fpcc-struct-return

Return "short" struct and union values in memory like longer ones, rather than in registers. This convention is less efficient, but it has the advantage of allowing intercallability between GCC-compiled files and files compiled with other compilers.

Short structures and unions are those whose size and alignment match that of some integer type.

-freg-struct-return

Use the convention that struct and union values are returned in registers when possible. This is more efficient for small structures than '-fpcc-struct-return'. This is just contrary to '-fpcc-struct-return'.

-fshort-enums

Allocate to an enum type only as many bytes as it needs for the declared range of possible values. Specifically, the enum type will be equivalent to the smallest integer type which has enough room.

-fshort-double

Use the same size for double as for float. This is always true in TIGCC, regardless of this switch.

-fshared-data

Requests that the data and non-constant variables of this compilation be shared data rather than private data. The distinction don't make any sense with TI calculators anyway.

-fno-common

Allocate even uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern) in two different compilations, you will get an error when you link them.

-fno-ident

Ignore the '#ident' directive.

-fno-gnu-linker

Do not output global initializations (such as constructors and destructors) in the form used by the GNU linker. Useless with TIGCC, because constructors and destructors are not implemented yet.

-finhibit-size-directive

Don't output a '.size' assembler directive, or anything else that would cause trouble if the function is split in the middle, and the two halves are placed at locations far apart in memory. It is not likely that you will ever use this option.

-fverbose-asm

Put extra commentary information in the generated assembly code to make it more readable. This option is generally only of use to those who actually need to read the generated assembly code. '-fno-verbose-asm', the default, causes the extra information to be omitted and is useful when comparing two assembler files.

-fvolatile

Consider all memory references through pointers to be volatile.

-fvolatile-global

Consider all memory references to extern and global data items to be volatile. GCC does not consider static data items to be volatile because of this switch.

-fvolatile-static

Consider all memory references to static data to be volatile.

-fpic

Generate position-independent code (PIC) suitable for use in a shared library. Such code accesses all constant addresses through a global offset table (GOT). But, it requires special support of the operating system (like dynamic loaders, etc.). So, forget it with TIOS: maybe some future ASM shells will support this. At the moment, forget this nice option...

-fPIC

If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. Not currently implemented for Motorola 68000; maybe it will be implemented in the future versions of the compiler.

-ffixed-reg

Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role). reg must be the name of a register. This flag does not have a negative form, because it specifies a three-way choice.

-fcall-used-reg

Treat the register named reg as an allocable register that is clobbered by function calls. It may be allocated for temporaries or variables that do not live across a call. Functions compiled this way will not save and restore the register reg.

It is an error to used this flag with the frame pointer or stack pointer. Use of this flag for other registers that have fixed pervasive roles in the machine's execution model will produce disastrous results. This flag does not have a negative form, because it specifies a three-way choice.

-fcall-saved-reg

Treat the register named reg as an allocable register saved by functions. It may be allocated even for temporaries or variables that live across a call. Functions compiled this way will save and restore the register reg if they use it.

It is an error to used this flag with the frame pointer or stack pointer. Use of this flag for other registers that have fixed pervasive roles in the machine's execution model will produce disastrous results. A different sort of disaster will result from the use of this flag for a register in which function values may be returned. This flag does not have a negative form, because it specifies a three-way choice.

-fpack-struct

Pack all structure members together without holes. Usually you would not want to use this option, since it makes the code suboptimal, and the offsets of structure members won't agree with system libraries.

-fcheck-memory-usage

Generate extra code to check each memory access. GCC will generate code that is suitable for a detector of bad memory accesses such as 'Checker'. This option is currently not applicable with TIGCC, because it requires some support of special library functions which are not implemented yet.

Normally, you should compile all, or none, of your code with this option. If you do mix code compiled with and without this option, you must ensure that all code that has side effects and that is called by code compiled with this option is, itself, compiled with this option. If you do not, you might get erroneous messages from the detector.

If you use functions from a library that have side-effects, you might not be able to recompile the library and specify this option. In that case, you can enable the '-fprefix-function-name' option, which requests GCC to encapsulate your code and make other functions look as if they were compiled with '-fcheck-memory-usage'. This is done by calling "stubs", which are provided by the detector. If you cannot find or build stubs for every function you call, you might have to specify '-fcheck-memory-usage' without '-fprefix-function-name'.
If you specify this option, you can not use the asm or __asm__ keywords in functions with memory checking enabled. GNU C cannot understand what the asm statement may do, and therefore cannot generate the appropriate code, so it will reject it. However, if you specify the function attribute no_check_memory_usage (see see section Declaring Attributes of Functions, GNU C will disable memory checking within a function; you may use asm statements inside such functions. You may have an inline expansion of a non-checked function within a checked function; in that case GNU CC will not generate checks for the inlined function's memory accesses.

If you move your asm statements to non-checked inline functions and they do access memory, you can add calls to the support code in your inline function, to indicate any reads, writes, or copies being done. These calls would be similar to those done in the stubs described above.

-fprefix-function-name

Request GCC to add a prefix to the symbols generated for function names. GCC adds a prefix to the names of functions defined as well as functions called. Code compiled with this option and code compiled without the option can't be linked together, unless stubs are used.

If you compile the following code with '-fprefix-function-name'
extern void bar (int);
void foo (int a)
{
  return bar (a + 5);
}
GCC will compile the code as if it was written:
extern void prefix_bar (int);
void prefix_foo (int a)
{
  return prefix_bar (a + 5);
}
This option is designed to be used with '-fcheck-memory-usage'.

-finstrument-functions

Generate instrumentation calls for entry and exit to functions. Just after function entry and just before function exit, the following profiling functions will be called with the address of the current function and its call site:
void __cyg_profile_func_enter (void *this_fn, void *call_site);
void __cyg_profile_func_exit (void *this_fn, void *call_site);
The first argument is the address of the start of the current function, which may be looked up exactly in the symbol table.

This instrumentation is also done for functions expanded inline in other functions. The profiling calls will indicate where, conceptually, the inline function is entered and exited. This means that addressable versions of such functions must be available. If all your uses of a function are expanded inline, this may mean an additional expansion of code size. If you use 'extern inline' in your C code, an addressable version of such functions must be provided (this is normally the case anyways, but if you get lucky and the optimizer always expands the functions inline, you might have gotten away without providing static copies).

A function may be given the attribute no_instrument_function, in which case this instrumentation will not be done. This can be used, for example, for the profiling functions listed above, high-priority interrupt routines, and any functions from which the profiling functions cannot safely be called (perhaps signal handlers, if the profiling routines generate output or allocate memory).

NOTE: I didn't succeed to use this option with TIGCC: it rejects this option, I don't know why.

-fstack-check

Generate code to verify that you do not go beyond the boundary of the stack. You rarely need to specify it since stack overflow is automatically detected on nearly all systems if there is only one stack. Note that this switch does not actually cause checking to be done; the operating system must do that. The switch causes generation of code to ensure that the operating system sees the stack being extended.

-fargument-alias
-fargument-noalias

-fargument-noalias-global

Specify the possible relationships among parameters and between parameters and global data.
'-fargument-alias' specifies that arguments (parameters) may alias each other and may alias global storage. '-fargument-noalias' specifies that arguments do not alias each other, but may alias global storage. '-fargument-noalias-global' specifies that arguments do not alias each other and do not alias global storage.

-fleading-underscore

This option and its counterpart, '-fno-leading-underscore', forcibly change the way C symbols are represented in the object file. One use is to help link with legacy assembly code. Be warned that you should know what you are doing when invoking this option.

Environment Variables Affecting GCC

This section describes several environment variables that affect how GCC operates. Some of them work by specifying directories or prefixes to use when searching for various kinds of files. Some are used to specify other aspects of the compilation environment.

Note that you can also specify places to search using options such as '-B', '-I' and '-L' (see section Options for Directory Search). These take precedence over places specified using environment variables, which in turn take precedence over those specified by the configuration of GCC.

LANG
LC_CTYPE
LC_MESSAGES
LC_ALL

These environment variables control the way that GCC uses localization information that allow GCC to work with different national conventions. GCC inspects the locale categories LC_CTYPE and LC_MESSAGES if it has been configured to do so. These locale categories can be set to any value supported by your installation. A typical value is 'en_UK' for English in the United Kingdom.

The LC_CTYPE environment variable specifies character classification. GCC uses it to determine the character boundaries in a string; this is needed for some multibyte encodings that contain quote and escape characters that would otherwise be interpreted as a string end or escape.

The LC_MESSAGES environment variable specifies the language to use in diagnostic messages.

If the LC_ALL environment variable is set, it overrides the value of LC_CTYPE and LC_MESSAGES; otherwise, LC_CTYPE and LC_MESSAGES default to the value of the LANG environment variable. If none of these variables are set, GCC defaults to traditional C English behavior.

TMPDIR

If TMPDIR is set, it specifies the directory to use for temporary files. GCC uses temporary files to hold the output of one stage of compilation which is to be used as input to the next stage: for example, the output of the preprocessor, which is the input to the compiler proper.

GCC_EXEC_PREFIX

If GCC_EXEC_PREFIX is set, it specifies a prefix to use in the names of the subprograms executed by the compiler. No slash is added when this prefix is combined with the name of a subprogram, but you can specify a prefix that ends with a slash if you wish.

If GCC_EXEC_PREFIX is not set, GNU C will attempt to figure out an appropriate prefix to use based on the pathname it was invoked with. If GCC cannot find the subprogram using the specified prefix, it tries looking in the usual places for the subprogram.

Other prefixes specified with '-B' take precedence over this prefix.

In addition, the prefix is used in an unusual way in finding the directories to search for header files. For each of the standard directories whose name normally begins with '/usr/local/lib/gcc-lib' (more precisely, with the value of GCC_INCLUDE_DIR), GCC tries replacing that beginning with the specified prefix to produce an alternate directory name. Thus, with '-Bfoo/', GCC will search 'foo/bar' where it would normally search '/usr/local/lib/bar'. These alternate directories are searched first; the standard directories come next.

COMPILER_PATH

The value of COMPILER_PATH is a colon-separated list of directories, much like PATH. GCC tries the directories thus specified when searching for subprograms, if it can't find the subprograms using GCC_EXEC_PREFIX.

LIBRARY_PATH

The value of LIBRARY_PATH is a colon-separated list of directories, much like PATH. GCC tries the directories thus specified when searching for special linker files, if it can't find them using GCC_EXEC_PREFIX. Linking using GCC also uses these directories when searching for ordinary libraries for the '-l' option (but directories specified with '-L' come first).

C_INCLUDE_PATH

This environment variable is a colon-separated list of directories, much like PATH. When GCC searches for header files, it tries the directories listed in the variable, after the directories specified with '-I' but before the standard header file directories.

DEPENDENCIES_OUTPUT

If this variable is set, its value specifies how to output dependencies for Make based on the header files processed by the compiler. This output looks much like the output from the '-M' option (see section Options Controlling the Preprocessor), but it goes to a separate file, and is in addition to the usual results of compilation.

The value of DEPENDENCIES_OUTPUT can be just a file name, in which case the Make rules are written to that file, guessing the target name from the source file name. Or the value can have the form 'file target', in which case the rules are written to file file using target as the target name.

LANG

This variable is used to pass locale information to the compiler. One way in which this information is used is to determine the character set to be used when character literals, string literals and comments are parsed when the compiler is configured to allow multibyte characters (this is not the case with TIGCC).

Return to the main index