Skip to content

Commit e70ba04

Browse files
committed
docs: add information about building with docker
1 parent 8e32342 commit e70ba04

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,53 @@
22

33
The statically compiled gdb / gdbserver binaries are avaliable to download under github releases!
44

5+
# Compiling gdb using docker
6+
7+
This repository contains a dockerfile and build scripts to compile gdb and gdbserver statically for multiple architectures.
8+
Currently, the supported architectures are:
9+
- x86_64
10+
- arm
11+
- aarch64
12+
- powerpc (32bit)
13+
You can easily expand it to support more architectures by adding the appropriate cross compilers to the dockerfile, and other build scripts.
14+
15+
NOTE: You don't need to interact with the dockerfile directly, as the Makefile will take care of everything for you.
16+
17+
## Building for a specific architecture
18+
19+
To build for a specific architecture, you can use the following command:
20+
```bash
21+
make build-<ARCH>
22+
```
23+
24+
For example, to build for arm:
25+
```bash
26+
make build-arm
27+
```
28+
29+
The resulting binaries will be placed under the `build/artifacts/` directory.
30+
Each architecture will have its own directory under `build/artifacts/`. For example, the arm architecture will have the following directory structure:
31+
```
32+
build/
33+
artifacts/
34+
arm/
35+
...
36+
```
37+
38+
## Building for all architectures
39+
40+
To build for all architectures, you can use the following command:
41+
```bash
42+
make build
43+
```
44+
45+
## Cleaning the build
46+
47+
To clean the build, you can use the following command:
48+
```bash
49+
make clean
50+
```
51+
552
# Notes about this file - read before proceeding!
653

754
While i already provided the gdb/gdbserver-15 statically compiled binaries handed out to you, some people might want to compile it to a different architecture, or compile a newer version of gdb in the future :). This rest of the file contains my compilation documentation so that you could save yourself some time and do it yourself, if you wish.

0 commit comments

Comments
 (0)