Техническая Спецификация для Microchip Technology SW006023-1N
MPLAB
®
XC32 C/C++ Compiler User’s Guide
DS51686E-page 56
2012 Microchip Technology Inc.
By default the 32-bit language tools compile for -O0, -mno-mips16, and
-msoft-float
-msoft-float
. Therefore, the options that we are concerned with are -Os or -O3,
-mips16
, and -mno-float. Libraries built with the following command line options
are made available:
1.
Default command line options
2. -Os
3. -O3
4. -mips16
5. -mno-float
6. -mips16 -mno-float
7. -Os -mips16
8. -Os -mno-float
9. -Os -mips16 -mno-float
10.-O3 -mips16
11.-O3 -mno-float
12.-O3 -mips16 -mno-float
The following examples provide details on which of the multilibs subdirectories are
chosen.
chosen.
1. xc32-gcc foo.c
xc32-g++ foo.cpp
For this example, no command line options have been specified (i.e., the default
command line options are being used). In this case, the .subdirectories are
used.
command line options are being used). In this case, the .subdirectories are
used.
2. xc32-gcc -Os foo.c
xc32-g++ -Os foo.cpp
For this example, the command line option for optimizing for size has been
specified (i.e., -Os is being used). In this case, the ./size subdirectories are
used.
specified (i.e., -Os is being used). In this case, the ./size subdirectories are
used.
3. xc32-gcc -O2 foo.c
xc32-g++ -O2 foo.cpp
For this example, the command line option for optimizing has been specified;
however, this command line option optimizes for neither size nor space (i.e., -O2
is being used). In this case, the .subdirectories are used.
however, this command line option optimizes for neither size nor space (i.e., -O2
is being used). In this case, the .subdirectories are used.
4. xc32-gcc -Os -mips16 foo.c
xc32-g++ -Os -mips16 foo.cpp
For this example, the command line options for optimizing for size and for
MIPS16 code have been specified (i.e., -Os and -mips16 are being used). In
this case, the ./size/mips16 subdirectories are used.
MIPS16 code have been specified (i.e., -Os and -mips16 are being used). In
this case, the ./size/mips16 subdirectories are used.
3.5.1.1
STANDARD LIBRARIES
The C/C++ standard libraries contain a standardized collection of functions, such as
string, math and input/output routines. The range of these functions are described in
Chapter 13. “Library Routines”.
string, math and input/output routines. The range of these functions are described in
Chapter 13. “Library Routines”.
These libraries also contain C/C++ routines that are implicitly called by the output code
of the code generator. These are routines that perform tasks such as floating-point
operations and that may not directly correspond to a C/C++ function call in the source
code.
of the code generator. These are routines that perform tasks such as floating-point
operations and that may not directly correspond to a C/C++ function call in the source
code.