aarch64-linux-gnu-cpp: error: unrecognized command line option ‘-mthumb’

编译amlogic s905x,Khadas VIM1 android8.0的uboot时,碰到这样的问题
aarch64-linux-gnu-cpp: error: unrecognized command line option ‘-mthumb’

aarch64-linux-gnu-cpp: error: unrecognized command line option ‘-mno-sched-prolog’
make[2]: *** [/media/saleh/NEWVOLUME/UBOOT/openlinux/uboot-2016-08-18-edd7f116ab/build/scp_task/user_task.lds] Error 1
make[1]: *** [bl301.bin] Error 2
make: *** [sub-make] Error 2

解决方法:
	在vim_tv_amlogic\uboot\arch\arm\cpu\armv8\gxl\firmware\scp_task\Makefile中,将如下代码
	CROSS_COMPILE=arm-none-eabi-
	ASM=$(CROSS_COMPILE)as
	CC=$(CROSS_COMPILE)gcc
	CPP=$(CROSS_COMPILE)cpp
	LD=$(CROSS_COMPILE)ld
	OBJCOPY=$(CROSS_COMPILE)objcopy
	OBJDUMP=$(CROSS_COMPILE)objdump

改成如下代码:

CROSS_COMPILE_BL301=arm-none-eabi-
		ASM=$(CROSS_COMPILE_BL301)as
		CC=$(CROSS_COMPILE_BL301)gcc
		CPP=$(CROSS_COMPILE_BL301)cpp
		LD=$(CROSS_COMPILE_BL301)ld
		OBJCOPY=$(CROSS_COMPILE_BL301)objcopy
		OBJDUMP=$(CROSS_COMPILE_BL301)objdump

你可能感兴趣的:(amlogic)