How to make ARM cross compilation on Mac OS X (error: invalid listing option `r' - cross compiling error)

前端 未结 4 570
栀梦
栀梦 2020-12-18 07:18

I\'m trying to build a gcc cross compiler on Mac OS X, the target is arm-elf-eabi.

This is what I\'ve done so far:

Install gcc and environmenta

4条回答
  •  眼角桃花
    2020-12-18 08:02

    There's a pre-configured cross-compiler, its name is Linaro, and you can get it from the official site. If you need, here's a guide which shows you how to install it and compile with it. For example, for .c files:

    ${PREFIX}gcc -Wall -Wextra -Os -ffreestanding -mcpu=cortex-a8 -march=armv7-a -mfpu=neon -marm -c filename.c 
    

    where Prefix stands for the directory where you've installed the tool.

提交回复
热议问题