交叉编译错误及解决方法

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定义
原文地址:https://www.cnblogs.com/shanyu20/p/13265532.html