You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At this point the configure script has generated a makefile for us with our requested options, now we can do the usual series of commands:
@@ -88,7 +88,7 @@ That's it! Now all the binutils tools are installed in the `PREFIX` directory an
88
88
89
89
The process for building GCC is very similar to binutils. Note that we need to have a version of binutils for our target triplet before trying to build GCC. These binaries must also be in the path, which we did before. Let's create a new folder for the build files (`build_gcc`) and move into it.
@@ -99,6 +99,7 @@ For brevity we'll only explain the new flags:
99
99
-`--enable-languages=c,c++`: select which language frontends to enable, these two are the default. We can disable c++ but if we plan to cross compile more things than our kernel this can be nice to have.
100
100
-`--without-headers`: tells the compiler not to rely on any headers from the host and instead generate its own.
101
101
102
+
It will download the missing dependencies for us. Now is possible to re-run the `configure` command.
102
103
Once the script is finished we can run a few make targets to build the compiler and its support libraries. By default running `make`/`make all` is not recommended as this builds everything for a full userspace compiler. We don't need all that and it can take a lot of time. For a freestanding program like a kernel we only need the compiler and libgcc.
103
104
104
105
```bash
@@ -128,13 +129,15 @@ Of course we can use any emulator we want, but in our example we rely on qemu. T
128
129
129
130
* ninja-build
130
131
* python3-sphinx
132
+
* python3-pip
133
+
* python3-venv
131
134
* sphinx-rtd-theme
132
-
* If we want to use the gtk ui, we also need libgtk3-dev
135
+
* If we want to use the gtk ui, we also need libgtk-3-dev
133
136
134
137
As usual let's create a new folder called `build_qemu` and move into it. The configure command is:
@@ -154,7 +157,7 @@ Qemu is quite a large program, so it's recommended to make use of all cores when
154
157
155
158
## GDB
156
159
157
-
The steps for building GDB are similar to binutils and GCC. We'll create a temporary working directory and move into it. Gdb has a few extra dependencies we'll need (name can be different depending on the distribution used):
160
+
The steps for building GDB are similar to binutils and GCC. We'll create a temporary working directory and move into it. Gdb has a few extra dependencies we'll need (name can be different depending on the distribution used, the names below are for _Debian_ based distributions):
0 commit comments