0

I'm trying to build a cross compiling build server for some 32 bit arm devices, where the architecture is: (from uname -m) "armv5tejl" I have to specify the target for binutils, and gcc, which looking like: --target=aarch64-linux (for example) should I expect that the target flag for my use case is --target=armv5tejl-linux ? or how would I know the target flag to use?

I tried looking in $gcc --target-help| less for help, but I dont see anything of use.

1 Answer 1

1

The armv5tejl from uname represents the ARM v5TEJ architecture and specifically the ARM926EJ-S CPU.

To compile for this cpu use:

% /usr/bin/arm-linux-gnueabi-gcc -mcpu=arm926ej-s -o hello hello.c

You may run into library issues. Compiling the binary to be static (not use dynamic libraries) may be desired. Use this:

% /usr/bin/arm-linux-gnueabi-gcc -static -mcpu=arm926ej-s -o hello hello.c

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .