交叉编译错误及解决方法

1、错误:strip: Unable to recognise the format of the input file

  原因:由于strip是宿主机的,所以不能 strip 目标机的文件

  解决:通过instll --help, 发现需要修改makefile,增加--strip-program定义,如下:

nstall: chat
    mkdir -p $(BINDIR) $(MANDIR)
    $(INSTALL) -s -c chat $(BINDIR) --strip-program=arm-linux-gnueabihf-strip     #增加--strip-program定义

 

posted @ 2020-07-08 10:44  shanyu20  阅读(2554)  评论(0)    收藏  举报