gdb cross compilation record

1. Basic documents

gdb download point: http://ftp.gnu.org/gnu/gdb/

What I downloaded is: gdb-8.0.1.tar.gz version

Toolchain version: gcc version 4.8.4 (GCC)

2. Start compiling

Command destination placement:

./configure --target=arm-linux --host=arm-linux --prefix=/home/gdb-8.0.1/build , then make . I don't know why the --prefix didn't work after finishing .

A problem occurred during compilation:

Solution:

 First reference: https://blog.csdn.net/Chasing_Chasing/article/details/89399798

      The compiler did not find the function _obstack_free(), which belongs to the definition reference. Then I searched for the _obstack_free() function in the /usr/include/ directory and found that there is an obstack_free(), but not the _obstack_free() function.

Then I went to look up the obstack_free() function in the cross-compilation tool chain, and found that there is no obstack_free() but _obstack_free().

Based on this, I guessed it was a problem with the gdb version, and then I entered the gdb-7.12/include directory and changed all the _obstack_free() that appeared in the obstack.h header file to the obstack_free() function. Then recompile and compile successfully.

 

Guess you like

Origin blog.csdn.net/weixin_38293850/article/details/107953074