Gcc 将newlib移植到交叉编译器中

Gcc 将newlib移植到交叉编译器中,gcc,ubuntu,binutils,newlib,Gcc,Ubuntu,Binutils,Newlib,我正在使用创建交叉编译器 我学习了gcc交叉编译器教程并进入了。在我试图通过发布 makeall安装 当我遇到以下错误时: WARNING: `makeinfo' is missing on your system. You should only need it if you modified a `.texi' or `.texinfo' file, or any other file indirectly affecting the aspect of

我正在使用创建交叉编译器

我学习了gcc交叉编译器教程并进入了。在我试图通过发布

makeall安装

当我遇到以下错误时:

WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
编译停止

我正在使用Ubuntu11.10

我试过:

  • 使用不同的gcc、binutils和newlib版本(大约5种不同的组合)

  • 安装Texinfo

  • 修正makeinfo路径


我的交叉编译器在没有newlib的情况下工作得非常好,只是它当然不能包含库。

即使您安装了makeinfo,它也可能无法识别较新的版本。下面的补丁可以工作。复制下面的内容并另存为“configure.patch”,将其保存在配置脚本所在的位置,然后键入“patch-p1
我试图安装6809 GDB,但出现了这个错误。我通过进入Makefile并更改

MAKEINFO = /opt/binutils-gdb/missing makeinfo

我也不得不这样做

BISON = bison
YACC = bison -y
FLEX = flex
LEX = flex
但是make被一些bison函数定义所困扰:

macroexp.o: In function `get_character_constant':
/opt/vectrex/binutils-gdb/gdb/macroexp.c:364: undefined reference to `c_parse_escape'
c-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x148): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x150): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x268): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x270): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x388): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x390): undefined reference to `c_error'
d-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
d-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
f-lang.o:(.data.rel.ro+0x28): undefined reference to `f_parse'
f-lang.o:(.data.rel.ro+0x30): undefined reference to `f_error'
objc-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
objc-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
go-lang.o:(.data.rel.ro+0x28): undefined reference to `go_parse'
go-lang.o:(.data.rel.ro+0x30): undefined reference to `go_error'
m2-lang.o:(.data.rel.ro+0x28): undefined reference to `m2_parse'
m2-lang.o:(.data.rel.ro+0x30): undefined reference to `m2_error'
opencl-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
opencl-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
p-lang.o:(.data.rel.ro+0x28): undefined reference to `pascal_parse'
p-lang.o:(.data.rel.ro+0x30): undefined reference to `pascal_error'
cp-support.o: In function `mangled_name_to_comp':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:644: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:629: undefined reference to `cp_new_demangle_parse_info'
cp-support.o: In function `cp_canonicalize_string_full':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:534: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:541: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:545: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `inspect_type':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:260: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:264: undefined reference to `cp_merge_demangle_parse_infos'
cp-support.o: In function `replace_typedefs':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:441: undefined reference to `cp_comp_to_string'
cp-support.o: In function `replace_typedefs_qualified_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:368: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:343: undefined reference to `cp_comp_to_string'
cp-support.o: In function `cp_canonicalize_string':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:582: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:587: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:588: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_class_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:743: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:738: undefined reference to `cp_comp_to_string'
cp-support.o: In function `method_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:826: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:830: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_func_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:847: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:855: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:857: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_remove_params':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:876: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:903: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:901: undefined reference to `cp_comp_to_string'
cp-support.o: In function `do_demangled_name_parse_free_cleanup':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:108: undefined reference to `cp_demangled_name_parse_free'
collect2: error: ld returned 1 exit status
Makefile:1174: recipe for target 'gdb' failed
make[2]: *** [gdb] Error 1
make[2]: Leaving directory '/opt/vectrex/binutils-gdb/gdb'
Makefile:8590: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/opt/vectrex/binutils-gdb'
Makefile:827: recipe for target 'all' failed
make: *** [all] Error 2

删除整个目录并重新下载后,makefile完全正确(没有丢失目录),make和make安装完全完成。因此,也许不需要对makefile进行修改,我只需要安装bison、flex和makeinfo

通过读取配置文件,检查此警告为何一直弹出。
BISON = bison
YACC = bison -y
FLEX = flex
LEX = flex
macroexp.o: In function `get_character_constant':
/opt/vectrex/binutils-gdb/gdb/macroexp.c:364: undefined reference to `c_parse_escape'
c-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x148): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x150): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x268): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x270): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x388): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x390): undefined reference to `c_error'
d-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
d-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
f-lang.o:(.data.rel.ro+0x28): undefined reference to `f_parse'
f-lang.o:(.data.rel.ro+0x30): undefined reference to `f_error'
objc-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
objc-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
go-lang.o:(.data.rel.ro+0x28): undefined reference to `go_parse'
go-lang.o:(.data.rel.ro+0x30): undefined reference to `go_error'
m2-lang.o:(.data.rel.ro+0x28): undefined reference to `m2_parse'
m2-lang.o:(.data.rel.ro+0x30): undefined reference to `m2_error'
opencl-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
opencl-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
p-lang.o:(.data.rel.ro+0x28): undefined reference to `pascal_parse'
p-lang.o:(.data.rel.ro+0x30): undefined reference to `pascal_error'
cp-support.o: In function `mangled_name_to_comp':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:644: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:629: undefined reference to `cp_new_demangle_parse_info'
cp-support.o: In function `cp_canonicalize_string_full':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:534: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:541: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:545: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `inspect_type':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:260: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:264: undefined reference to `cp_merge_demangle_parse_infos'
cp-support.o: In function `replace_typedefs':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:441: undefined reference to `cp_comp_to_string'
cp-support.o: In function `replace_typedefs_qualified_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:368: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:343: undefined reference to `cp_comp_to_string'
cp-support.o: In function `cp_canonicalize_string':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:582: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:587: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:588: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_class_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:743: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:738: undefined reference to `cp_comp_to_string'
cp-support.o: In function `method_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:826: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:830: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_func_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:847: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:855: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:857: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_remove_params':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:876: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:903: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:901: undefined reference to `cp_comp_to_string'
cp-support.o: In function `do_demangled_name_parse_free_cleanup':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:108: undefined reference to `cp_demangled_name_parse_free'
collect2: error: ld returned 1 exit status
Makefile:1174: recipe for target 'gdb' failed
make[2]: *** [gdb] Error 1
make[2]: Leaving directory '/opt/vectrex/binutils-gdb/gdb'
Makefile:8590: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/opt/vectrex/binutils-gdb'
Makefile:827: recipe for target 'all' failed
make: *** [all] Error 2