简体   繁体   English

将错误显示为:无法识别的选项'-mcpu = arm1176jzf-s'

[英]make error as: unrecognized option '-mcpu=arm1176jzf-s'

I am trying to compile some C to run on a friendlyARM for days now without any luck, i think im close but getting this error: 我正在尝试编译一些C以便在几天后没有任何运气的情况下在friendlyARM上运行,我想即时关闭,但收到此错误:

kevin@kevin-VirtualBox:~/Desktop/makef$ make
arm-none-linux-gnueabi-gcc -c -o obj/main.o main.c -I./
as: unrecognized option '-mcpu=arm1176jzf-s'
make: *** [obj/main.o] Error 1

Does anyone know how to what this error means and how to fix it? 有谁知道该错误的含义以及如何解决?

steps i have tried: 我尝试过的步骤:

1 1个

touch *.*
make clean
make 
(error as: unrecognized option '-mcpu=arm1176jzf-s)

2 2

touch *.*
make clean
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-l
(error as: unrecognized option '-mcpu=arm1176jzf-s)

the Makefile : Makefile文件:

IDIR =./
CC=arm-none-linux-gnueabi-gcc
CFLAGS=-I$(IDIR)

ODIR=obj
LDIR =./

LIBS=-lgd -lrt

_DEPS = main.h Makefile
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))

_OBJ = main.o serial.o fb.o menu_main.o timer.o cmdin.o buzzer.o statemachine.o inout.o network.o text_file_input.o text_file_input_oven.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))

$(ODIR)/%.o: %.c $(DEPS)
    $(CC) -c -o $@ $< $(CFLAGS)

main: $(OBJ)
    $(CC) -o $@ $^ $(CFLAGS) $(LIBS)

.PHONY: clean

clean:
    rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ 

It means the version of gcc that you have installed does not understand the option -mcpu=arm1176jzf-s 这表示您已安装的gcc版本不了解选项-mcpu=arm1176jzf-s

Either you have an older version of gcc which does not accept that option, or you have a version of gcc that has cross compiling support turned off. 您有不接受该选项的较旧版本的gcc ,或者您有已关闭交叉编译支持的gcc版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为arm交叉编译opencv:C++:错误:无法识别的命令行选项&#39;-mthumb&#39;; 你的意思是“-mtbm”? - cross-compile opencv for arm : c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’? gcc:错误:无法识别的命令行选项“ -combine” - gcc: error: unrecognized command line option ‘-combine’ 无法制作项目,无法识别的命令行选项libc ++错误 - Can't make project, unrecognized command line option libc++ error MinGW:错误:无法识别的命令行选项“ -V” - MinGW: error: unrecognized command line option '-V' g ++:错误:无法识别的选项&#39;--as-needed&#39; - g++: error: unrecognized option ‘--as-needed’ g ++错误,无法识别的选项,--subsystem控制台”在ubuntu中的eclipse中 - g++ error, unrecognized option, --subsystem console" in eclipse in ubuntu gcc:错误:无法识别的命令行选项'-fforce-mem' - gcc: error: unrecognized command line option '-fforce-mem' g++:错误:无法识别的命令行选项“--cflags” g++:错误:无法识别的命令行选项“--libs” - g++: error: unrecognized command-line option '--cflags' g++: error: unrecognized command-line option '--libs`' C ++错误:无法识别的命令行选项“ -msse3” - c++ error:unrecognized command line option '-msse3' c++:错误:无法识别的命令行选项“-target” - c++: error: unrecognized command-line option ‘-target’
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM