Linux 使用llvm/clang构建gdb

Linux 使用llvm/clang构建gdb,linux,gdb,clang,Linux,Gdb,Clang,我正试图从源代码构建gdb。我正在使用“GDB7.6标签” 我得到以下错误: opncls.c:263:5: error: expression result unused [-Werror,-Wunused-value] bfd_set_cacheable (nbfd, TRUE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bfd.h:529:67: note: expanded from: #define bfd_set_cacheable(abfd

我正试图从源代码构建gdb。我正在使用“GDB7.6标签”

我得到以下错误:

opncls.c:263:5: error: expression result unused [-Werror,-Wunused-value]
    bfd_set_cacheable (nbfd, TRUE);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./bfd.h:529:67: note: expanded from:
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
                                                                  ^
./bfd.h:134:14: note: expanded from:
#define TRUE 1

停止将警告视为错误。[删除
-Werror
]。这解决了我的问题:
arif@khost:~/src/gdb$ clang -v
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
opncls.c:263:5: error: expression result unused [-Werror,-Wunused-value]
    bfd_set_cacheable (nbfd, TRUE);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./bfd.h:529:67: note: expanded from:
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
                                                                  ^
./bfd.h:134:14: note: expanded from:
#define TRUE 1