在Ubuntu上交叉编译Binutils

时间:2014-07-02 05:15:28

标签: ubuntu compilation makefile cross-compiling binutils

我正在尝试将BINUTILS交叉编译为i386-elf,我收到以下错误。

在输出结束时......

        -c -o printcmd.o -MT printcmd.o -MMD -MP -MF .deps/printcmd.Tpo ../../binutils-2.24.51-4/gdb/printcmd.c
gcc -g -O2   -I. -I../../binutils-2.24.51-4/gdb -I../../binutils-2.24.51-4/gdb/common -I../../binutils-2.24.51-4/gdb/config -DLOCALEDIR="\"/home/bruno/opt/cross/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-2.24.51-4/gdb/../include/opcode -I../../binutils-2.24.51-4/gdb/../opcodes/.. -I../../binutils-2.24.51-4/gdb/../readline/.. -I../bfd -I../../binutils-2.24.51-4/gdb/../bfd -I../../binutils-2.24.51-4/gdb/../include -I../libdecnumber -I../../binutils-2.24.51-4/gdb/../libdecnumber  -I../../binutils-2.24.51-4/gdb/gnulib/import -Ibuild-gnulib/import    -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral  -c -o block.o -MT block.o -MMD -MP -MF .deps/block.Tpo ../../binutils-2.24.51-4/gdb/block.c
gcc -g -O2   -I. -I../../binutils-2.24.51-4/gdb -I../../binutils-2.24.51-4/gdb/common -I../../binutils-2.24.51-4/gdb/config -DLOCALEDIR="\"/home/bruno/opt/cross/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-2.24.51-4/gdb/../include/opcode -I../../binutils-2.24.51-4/gdb/../opcodes/.. -I../../binutils-2.24.51-4/gdb/../readline/.. -I../bfd -I../../binutils-2.24.51-4/gdb/../bfd -I../../binutils-2.24.51-4/gdb/../include -I../libdecnumber -I../../binutils-2.24.51-4/gdb/../libdecnumber  -I../../binutils-2.24.51-4/gdb/gnulib/import -Ibuild-gnulib/import    -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral  -c -o symtab.o -MT symtab.o -MMD -MP -MF .deps/symtab.Tpo ../../binutils-2.24.51-4/gdb/symtab.c
../../binutils-2.24.51-4/gdb/symtab.c: In function ‘symbol_find_demangled_name’:
../../binutils-2.24.51-4/gdb/symtab.c:667:7: error: ‘LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES’ undeclared (first use in this function)
   if (LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES)
       ^
../../binutils-2.24.51-4/gdb/symtab.c:667:7: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [symtab.o] Error 1
make[2]: se sale del directorio «/home/bruno/src/build-binutils/gdb»
make[1]: *** [all-gdb] Error 2
make[1]: se sale del directorio «/home/bruno/src/build-binutils»
make: *** [all] Error 2

有什么想法吗?非常感谢你!

1 个答案:

答案 0 :(得分:0)

我所做的,我希望我是对的,是在symtab.c中将LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES定义为(0)。我认为在CYGWING中运行它时会使用常量。

它编译了,现在我希望它能正常工作。