arm-linux-ld:u-boot.lds:1: ignoring invalid character `#' in expression

在裁剪uboot的时候出现下面错误:

  LDS     u-boot.lds
  LD      u-boot
arm-linux-ld:u-boot.lds:1: ignoring invalid character `#' in expression
arm-linux-ld:u-boot.lds:1: syntax error
Makefile:1018: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

我的裁剪就是在config文件里的,具体来说就是include/configs/smdk2440.h

后来发现是用//注释宏出的问题,改成#if 0 ... #endif就没有这个错误了。

特此记录下。

原文地址:https://www.cnblogs.com/kent-hu/p/8413753.html