| |||
| Home > Compiler Command-line Options > --translate_gcc | |||
This option helps to emulate gcc by enabling
the translation of command lines from the GNU tools.
You can use this option to provide either of the following:
a full GCC emulation targeting ARM Linux
a subset of full GCC emulation in the form of translating individual GCC command-line arguments into their ARM compiler equivalents.
To provide a full GCC emulation, you must also use --arm_linux_config_file.
This combination of options selects the appropriate GNU header files
and libraries specified by the configuration file, and includes
changes to some default behaviors.
To translate individual GCC command-line arguments into their
ARM compiler equivalents without aiming for full GCC emulation,
use --translate_gcc to emulate gcc,
but do not use it with --arm_linux_config_file.
Because you are not aiming for full GCC emulation with this method,
the default behavior of the ARM compilation tools is retained, and
no defaults are set for targeting ARM Linux. The library paths and
option defaults for the ARM compilation tools remained unchanged.
To selectively specify options that are not to be translated,
use -Warmcc.
Specifying multiple GNU translation modes on the same command
line is ambiguous to the compiler. The first specified translation
mode is used, and the compiler generates a warning message. For
example, given armcc --translate_gcc --translate_gld,
the compiler uses --translate_gcc, ignores --translate_gld,
and generates a warning message.
If you specify an ARM Linux configuration file on the command
line and you use --translate_gcc, this alters
the default settings for:
--bss_threshold
--relaxed_ref_def, --no_relaxed_ref_def
--signed_bitfields, --unsigned_bitfields.
--arm_linux in the Linker Reference
--library=name in the Linker Reference
--search_dynamic_libraries, --no_search_dynamic_libraries in the Linker Reference
About building Linux applications with the ARM Compiler toolchain and GNU libraries in Building Linux Applications with the ARM® Compiler toolchain and GNU Libraries.