2.1 Comparison of compiler command-line options in ARM Compiler 6 and ARM Compiler 5

ARM® Compiler 6 provides many command-line options, including most Clang command-line options as well as several ARM-specific options.

Note

This topic includes descriptions of [COMMUNITY] features. See Support level definitions.
The following table describes the most common ARM Compiler 5 command-line options, and shows the equivalent options for ARM Compiler 6.
Additional information about command-line options is available:
  • The armclang Reference Guide provides more detail about a number of command-line options.
  • For a full list of Clang command-line options, consult the Clang and LLVM documentation.

Table 2-1 Comparison of compiler command-line options in ARM Compiler 6 and ARM Compiler 5

ARM Compiler 5 option ARM Compiler 6 option Description
--allow_fpreg_for_nonfpdata, --no_allow_fpreg_for_nonfpdata
[COMMUNITY] -mimplicit-float, -mno-implicit-float
Enables or disables the use of VFP and SIMD registers and data transfer instructions for non-VFP and non-SIMD data.
--apcs=/nointerwork No equivalent. Disables interworking between A32 and T32 code. Interworking is always enabled in ARM Compiler 6.
--apcs=/ropi
-fropi
Enables or disables the generation of Read-Only Position-Independent (ROPI) code.
--apcs=/rwpi
-frwpi
Enables or disables the generation of Read/Write Position-Independent (RWPI) code.
--arm -marm Targets the ARM instruction set. The compiler is permitted to generate both ARM and Thumb code, but recognizes that ARM code is preferred.
--asm -save-temps Instructs the compiler to generate intermediate assembly files as well as object files.    
-c -c Performs the compilation step, but not the link step.
--c90 -xc -std=c90
Enables the compilation of C90 source code.
-xc is a positional argument and only affects subsequent input files on the command line. It is also only required if the input files do not have the appropriate file extension.
--c99 -xc -std=c99
Enables the compilation of C99 source code.
-xc is a positional argument and only affects subsequent input files on the command line. It is also only required if the input files do not have the appropriate file extension.
--cpp -xc++ -std=c++03
Enables the compilation of C++03 source code.
-xc++ is a positional argument and only affects subsequent input files on the command line. It is also only required if the input files do not have the appropriate file extension.
The default C++ language standard is different between ARM Compiler 5 and ARM Compiler 6.
--cpp11 -xc++ -std=c++11
Enables the compilation of C++11 source code.
-xc++ is a positional argument and only affects subsequent input files on the command line.
The default C++ language standard is different between ARM Compiler 5 and ARM Compiler 6.
--cpp_compat No equivalent.
Compiles C++ code to maximize binary compatibility.
--cpu 8-A.32 --target=arm-arm-none-eabi -march=armv8-a
Targets ARMv8-A, AArch32 state.
--cpu 8-A.64 --target=aarch64-arm-none-eabi
Targets ARMv8-A AArch64 state. (Implies -march=armv8-a if -mcpu is not specified.)
--cpu 7-A --target=arm-arm-none-eabi -march=armv7-a
Targets the ARMv7-A architecture.
--cpu=Cortex-M4 --target=arm-arm-none-eabi -mcpu=cortex-m4 Targets the Cortex-M4 processor.
--cpu=Cortex-A15 --target=arm-arm-none-eabi -mcpu=cortex-a15 Targets the Cortex A15 processor.
-D -D Defines a preprocessing macro.
--depend -MF Specifies a filename for the makefile dependency rules.
--depend_dir No equivalent. Use -MF to specify each dependency file individually. Specifies the directory for dependency output files.
--depend_format=unix_escaped Dependency file entries use UNIX-style path separators and escapes spaces with \. This is the default in ARM Compiler 6.
--depend_target -MT Changes the target name for the makefile dependency rule.
--diag_error -Werror Turn warnings into errors.
--diag_suppress=foo -Wno-foo Suppress warning message foo. The error or warning codes might be different between ARM Compiler 5 and ARM Compiler 6.
-E -E Executes only the preprocessor step.
--enum_is_int -fno-short-enums, -fshort-enums Sets the minimum size of an enumeration type.
By default ARM Compiler 5 does not set a minimum size. By default ARM Compiler 6 uses -fno-short-enums to set the minimum size to 32-bit.
--forceline No equivalent. Forces aggressive inlining of functions. ARM Compiler 6 automatically decides whether to inline functions depending on the optimization level.
--fpmode=fast -ffast-math Performs aggressive floating-point optimizations at the cost of IEEE compliance.
--fpu -mfpu Specifies the target FPU architecture.

Note

--fpu=none checks the source code for floating-point operations, and if any are found it produces an error. -mfpu=none prevents the compiler from using hardware-based floating-point functions. If the compiler encounters floating-point types in the source code, it uses software-based floating-point library functions.
--fpu=fpv5_d16 -mfpu=fpv5-d16 Targets the FPv5-D16 floating-point extension.
-I -I Adds the specified directories to the list of places that are searched to find included files.
--ignore_missing_headers -MG Prints dependency lines for header files even if the header files are missing.
--inline Default at -O2 and -O3. There is no equivalent of the --inline option. ARM Compiler 6 automatically decides whether to inline functions at optimization levels -O2 and -O3.
-J -isystem Adds the specified directories to the list of places that are searched to find included system header files.
-L -Xlinker Specifies command-line options to pass to the linker when a link step is being performed after compilation.
--licretry No equivalent. There is no equivalent of the --licretry option. The ARM Compiler 6 tools automatically retry failed attempts to obtain a license.
--list_macros -E -dM List all the macros that are defined at the end of the translation unit, including the predefined macros.
--littleend -mlittle-endian Generates code for little-endian data.
--lower_ropi, --no_lower_ropi
-fropi-lowering, -fno-ropi-lowering
Enables or disables less restrictive C when generating Read-Only Position-Independent (ROPI) code.

Note

In ARM Compiler 5, when--acps=/ropi is specified, --lower_ropi is not switched on by default. In ARM Compiler 6, when -fropi is specified, -fropi-lowering is switched on by default.
--lower_rwpi, --no_lower_rwpi
-frwpi-lowering, -fno-rwpi-lowering
Enables or disables less restrictive C when generating Read-Write Position-Independent (RWPI) code.
-M -M Instructs the compiler to produce a list of makefile dependency lines suitable for use by a make utility.
--md -MD Creates makefile dependency files, including the system header files. In ARM Compiler 5, this is equivalent to --md --depend_system_headers.
--md --no_depend_system_headers -MMD Creates makefile dependency files, without the system header files.
--mm -MM Creates a single makefile dependency file, without the system header files. In ARM Compiler 5, this is equivalent to -M --no_depend_system_headers.
--no_exceptions -fno-exceptions Disables the generation of code needed to support C++ exceptions.
-o -o Specifies the name of the output file.
-Onum -Onum
Specifies the level of optimization to be used when compiling source files.
The default for ARM Compiler 5 is -O2. The default for ARM Compiler 6 is -O0.
-Ospace -Oz / -Os
Performs optimizations to reduce image size at the expense of a possible increase in execution time.
-Otime Default.
Performs optimizations to reduce execution time at the expense of a possible increase in image size.
There is no equivalent of the -Otime option. ARM Compiler 6 optimizes for execution time by default, unless you specify the -Os or -Oz options.
--phony_targets -MP Emits dummy makefile rules.
--preinclude -include Include the source code of a specified file at the beginning of the compilation.
--relaxed_ref_def -fcommon Places zero-initialized definitions in a common block.
-S -S
Outputs the disassembly of the machine code generated by the compiler.
The output from this option differs between releases. Older ARM Compiler versions produce output with armasm syntax while ARM Compiler 6 produces output with GNU syntax.
--show_cmdline -v Shows how the compiler processes the command line. The commands are shown normalized, and the contents of any via files are expanded.
--split_ldm -fno-ldm-stm
Disables the generation of LDM and STM instructions.
Note that while the armcc --split_ldm option limits the size of generated LDM/STM instructions, the armclang -fno-ldm-stm option disables the generation of LDM and STM instructions altogether.
--split_sections -ffunction-sections Generates one ELF section for each function in the source file.
--thumb -mthumb Targets the T32 instruction set.
--no_unaligned_access, --unaligned_access -mno-unaligned-access, -munaligned-access Enables or disables unaligned accesses to data on ARM processors.
--use_frame_pointer, --no_use_frame_pointer -fno-omit-frame-pointer, -fomit-frame-pointer Controls whether a register is used for storing stack frame pointers.
--vectorize -fvectorize Enables the generation of Advanced SIMD vector instructions directly from C or C++ code.
--via @file Reads an additional list of compiler options from a file.
--vla No equivalent. Support for variable length arrays. ARM Compiler 6 automatically supports variable length arrays in accordance to the language standard.
--vsn --version Displays version information and license details. In ARM Compiler 6 you can also use --vsn.
--wchar16, --wchar32 -fshort-wchar, -fno-short-wchar Sets the size of wchar_t type.
The default for ARM Compiler 5 is --wchar16. The default for ARM Compiler 6 is -fno-short-wchar.
Related information
ARM Compiler 6 Command-line Options
The LLVM Compiler Infrastructure Project
Non-ConfidentialPDF file icon PDF versionARM DUI0742F
Copyright © 2014-2016 ARM. All rights reserved.