0

I know that "target" is the machine which the binary will be on.

But because the arm has so many chip, there is a -march option in gcc.

Today, there is Aarch64 and Aarch64 tool chain. Gcc did not made a new option like -march=Aarch64

As I found this thread (https://gcc.gnu.org/ml/gcc-help/2014-10/msg00143.html), I got more confused.

What is the target definition and why did gcc did not make likfe arm-none-linux-eabi -march=Aarch64 but made Aarch64-none-linux-eabi?

artless noise
  • 21,212
  • 6
  • 68
  • 105
Young Hyun Yoo
  • 598
  • 10
  • 21
  • If you want a compiler which can target multiple different architectures at once, try Clang; GCC just doesn't work that way. `-march` is for selecting variants _within_ the target architecture. – Notlikethat May 12 '16 at 07:25

1 Answers1

1

The A64 instruction set used when a core is in AArch64 state is not an extension to the existing A32/T32 instruction sets, but a completely new instruction set. So while technically it may have been possible to stuff both AArch32 and AArch64 instruction sets into the same gcc compiler binary, this was not considered worthwhile by the gcc developers.

Possibly also see this answer for further details.

Community
  • 1
  • 1
unixsmurf
  • 5,852
  • 1
  • 33
  • 40