🦎
RISC-V向けのクロスのgdbのビルド
準備
ubuntu 22.04 aarch64 を使っています。
$ sudo apt build-dep gdb
$ wget https://ftp.jaist.ac.jp/pub/GNU/gdb/gdb-12.1.tar.xz
$ tar xf gdb-12.1.tar.xz
$ cd gdb-12.1/
ビルド
$ mkdir obj
$ cd obj
$ ../configure --target=riscv64-linux-musl
$ make -j4
インストール
$ sudo make install
$ which riscv64-linux-musl-gdb
/usr/local/bin/riscv64-linux-musl-gdb
$ riscv64-linux-musl-gdb -v
GNU gdb (GDB) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
関連
Discussion