sunzhonghai666 发表于 2009-11-03 14:55

arm-linux-gcc编译问题

编译器 arm-cross-3.3.2
内核 2.6.16

Building common wlan modules
CROSS_COMPILE = /usr/local/arm/3.3.2/bin/arm-linux-
CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc
make -C /home/sunzh/kernel_src/linux-2.6.16/ M=/home/sunzh/802.11n/test2/wlan/build/linux modules
make: Entering directory `/home/sunzh/kernel_src/linux-2.6.16'
CC /home/sunzh/802.11n/test2/wlan/build/linux/../../adf/linux/host/nbuf/adf_nbuf.o
arm-linux-gcc: cannot specify -o with -c or -S and multiple compilations
make: *** 错误 1
make: *** 错误 2
make: Leaving directory `/home/sunzh/kernel_src/linux-2.6.16'
make: *** 错误 2

nian_cauc 发表于 2009-11-04 15:11

我遇到的问题更郁闷,arm-linux-gcc 3.4.1的,装是装好了,编译也成功了,可就是到板子上运行的时候出现Illegal Instruction的错误··· ···
这几天折腾的我不行:em12:

prolj 发表于 2009-11-04 19:36

Illegal Instruction
生成了什么不支持的指令啊?
ARM指令集也有版本啊,生成了错误的指令自然就错了。
我不用ARM,只用x86系列。
具体的,arm-gcc -S看看生成了什么不支持的指令,然后找找对应的编译选项。

buaadallas 发表于 2009-11-04 22:48

回复 #1 sunzhonghai666 的帖子

换一个交叉编译器吧。不同版本的内核一般会有与之对应的编译器的.

EricFisher 发表于 2009-11-06 10:12

回复 #1 sunzhonghai666 的帖子

> arm-linux-gcc: cannot specify -o with -c or -S and multiple compilations

如果gcc一次编译多个文件时,不能同时使用-o和-c(或者-S)

$ gcc a.c b.c -o c.a -c
gcc: cannot specify -o with -c or -S with multiple files
页: [1]
查看完整版本: arm-linux-gcc编译问题