5.4.1 Location and Naming Convention

By default, the compiler uses the directory <install-directory>/lib/gcc/ to store the specific libraries and the directory <install-directory>/pic32mx/lib to store the target-specific libraries, based on the target device family.

The target libraries that are distributed with the compiler are built for the corresponding command-line options:
  • Size vs. speed (-Os vs. -O3)
  • MIPS16 vs. MIPS32 vs. microMIPS ISA mode (-mips16 vs. -mno-mips16 vs. -mmicromips)
  • Software floating-point vs no floating-point support (-msoft-float vs. -mno-float)

The following examples provide details on which of the library subdirectories are searched.

If no optimization option has been specified or an optimization of level 2 or lower has been specified, for example, xc32-gcc -O1 foo.c, then the libraries in the top-level of the library subdirectories are used.

If -Os level optimizations have been chosen, for example, xc32-g++ -Os foo.cpp, then the libraries in the size directories of the library subdirectories are used.

If -Os level optimizations and the MIPS16 instruction set option have both been chosen, for example, xc32-gcc -Os -mips16 foo.c, then the libraries in the size/mips16 directories of the library subdirectories are searched.