无法在macosx上构建binutils

时间:2017-03-01 03:22:26

标签: ld macos-sierra binutils mach-o dwarf

我需要在OSX 10.12.3(16D32)上从源代码构建ld。我从git://sourceware.org/git/binutils-gdb.git克隆了最后一个版本并尝试构建它:

./configure --prefix=/usr --disable-werror (there are a lot of warnings, so I disable them)

make

但我得到了

 In file included from dwarf2read.c:72:
 ./common/gdb_unlinker.h:35:35: error: '__nonnull__' attribute 
 is invalid for the implicit this argument
  unlinker (const char *filename) ATTRIBUTE_NONNULL (1)

有人看过它并知道如何解决它吗? 我只需要检查为什么显示

ld: warning: can't parse dwarf compilation unit info in 
OSX上的

,当Ubuntu工作正常并且objdump没有显示任何精灵符号时。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我试图构建错误的ld。 ld -v @(#)PROGRAM:ld PROJECT:ld64-274.2 表明我必须从苹果来源建立ld64。 谢谢bdash指出这一点。