cc1: error: unrecognized command line option "-m64"报错,需要加入ARCH=arm

[root@localhost pwm2]# make
make -C  /work/cs/YL-9G45/linux-2.6.30  M=/work/rootfs/test/pwm2 modules
make[1]: Entering directory `/work/cs/YL-9G45/linux-2.6.30'
  CC [M]  /work/rootfs/test/pwm2/pwm.o
cc1: error: unrecognized command line option "-m64"
cc1: error: unrecognized command line option "-mno-red-zone"
cc1: error: unrecognized command line option "-mcmodel=kernel"
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
make[2]: *** [/work/rootfs/test/pwm2/pwm.o] 错误 1
make[1]: *** [_module_/work/rootfs/test/pwm2] 错误 2
make[1]: Leaving directory `/work/cs/YL-9G45/linux-2.6.30'
make: *** [all] 错误 2
[root@localhost pwm2]# export ARCH=arm
[root@localhost pwm2]# make
make -C  /work/cs/YL-9G45/linux-2.6.30  M=/work/rootfs/test/pwm2 modules
make[1]: Entering directory `/work/cs/YL-9G45/linux-2.6.30'
  CC [M]  /work/rootfs/test/pwm2/pwm.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /work/rootfs/test/pwm2/pwm.mod.o
  LD [M]  /work/rootfs/test/pwm2/pwm.ko
make[1]: Leaving directory `/work/cs/YL-9G45/linux-2.6.30'
[root@localhost pwm2]# 

你可能感兴趣的:(cc1: error: unrecognized command line option "-m64"报错,需要加入ARCH=arm)