What is the purpose of the gcc ARM-option -mlibarch?

48 Views Asked by At

I took over a project started from a colleague of mine and now I'm trying to understand what he did so far.

Aim of the project is run a Profinet device on a NetX90 (2x Cortex M4). The IDE used so for is the netX studio 1.1010.1.5895 on Win10 machine.

While I was examining the CMakeOutput.log file I read the compiler options ... -mlibarch=armv4t -march=armv4t ....

And I wondered what -mlibarch is used for if -march is already set. With the source my colleague left the binary is build so I thing the option is recognized by the compiler but I don't find the documentation for that flag.

I search online for the flag in

  1. https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
  2. https://gcc.gnu.org/onlinedocs/gcc-7.5.0/gcc/ARM-Options.html
  3. https://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/Code-Gen-Options.html
  4. https://gcc.gnu.org/onlinedocs/gcc/gcc-command-options/options-for-linking.html#cmdoption-nostdlib
  5. https://gcc.gnu.org/onlinedocs/gcc/Option-Index.html#Option-Index_op_letter-O

I tried in the terminal the help of

  1. arm-none-eabi-cpp.exe,
  2. arm-none-eabi-gcc-11.2.1.exe and
  3. arm-none-eabi-ld.exe

(I know the last one is the linker but the name "mlibarch" sounds for me like linker stuff)

Does anybody know better? Maybe with a link to an explanation.

Thank in advance.

Regards,

Layer8

0

There are 0 best solutions below