【问题标题】:Cross Compiling Binutils on Ubuntu在 Ubuntu 上交叉编译 Binutils
【发布时间】:2014-07-02 05:15:28
【问题描述】:

我正在尝试将 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

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

【问题讨论】:

    标签: ubuntu compilation makefile cross-compiling binutils


    【解决方案1】:

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

    它已编译,现在我希望它可以正常工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-05
      • 1970-01-01
      • 2016-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多