Figure out the names.
You can use
config.guess script from GNU config scripts. The value will look like
<architecture>-<vendor>-<os>-<abi>. Those will be re-used.
<abi> is not exactly
gnu (for example arm has
gnueabihf) remember it.
We will need to find also the triplet used for multiarch. It is usually
<architecture>-<os>-<abi>. It is the same name as the libdir where all the libraries will be stored, that is something like
/usr/lib/<architecture>-<os>-<abi>. GCC will decide for this path. But Debian has definitions of what it should be, and it is a bit easier to read than Makefiles: https://wiki.debian.org/Multiarch/Tuples . Maybe this page gets old and disagrees with GCC, then GCC is always right.
We will also need to Go architecture name for Docker/OCI images. You will find the list of possible values in
Also flatpak will expect some name of architecture that might not be any of these names. This has to be found out as well.
Add the options
include/_private/options.yml, add to options
bootstrap_build_arch the new
include/_private/arch.yml, override the different values.
gcc_arch is for the arch for the multiarch directory.
include/_private/build-flags.yml we need to define the flags that work. I recommend to start with the same flags as in
target_x86_64_flags and remove that do not work for the new architecture.
Cross compile the bootstrap
On another machine that is already supported build the bootstrap:
make bootstrap ARCH=<architecture>
That creates a directory called
bootstrap/<architecture>. You need to transfer it to a builder of the target architecture.
The on that architecture:
This should build the Freedesktop SDK.
Setting up the CI
Once it can build locally, we need to add a builder to the CI.
- Install gitlab-runner on the builder.
- Configure with the proper key (ask maintainer)
- For a first time, add a bootstrap step in
.bootstrap_templateand another one using
IMPORT_BOOTSTRAP: 'true'. Also add a step using
IMPORT_BOOTSTRAP: 'true'. Do not forget to add dependency to the bootstrap step so that it can download the bootstrap artifact.
elements/bootstrap/build/base-sdk/image-<architecture>.bst and add it to
elements/bootstrap/build/base-sdk/filtered.bst. Track it.
Then remove the bootstrap step in
.gitlab-ci.yml. And remove definitions of
IMPORT_BOOTSTRAP from the flatpak build and publish steps.