From 793ab9e072f6f9b63bc3ac4f324fdff5e4087739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= Date: Sat, 21 Sep 2024 21:09:26 +0200 Subject: [PATCH] doc: add doc on adding new target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc Poulhiès --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 265c046..04fe52e 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,35 @@ The repository is part of the [Compiler Explorer](https://godbolt.org/) project. It builds the docker images used to build the various GCC cross-compilers used on the site. +## How to add a new target + +- create a ct-ng config: + - can be based on a ct-ng sample + - can be a new config + - disable PROGRESS_BAR and any gdb features +- check it builds correctly: + `./ct-ng build` +- copy the config in this repository in `build/latest` following the naming convention. +- use `local_build.sh` to build it within the docker container + `./local_build.sh arm64 13.2.0` +- add ct-ng config and commit (and open a Pull Request) + +Later, when the config is added, trigger a build: + +``` sh +gh workflow run -R compiler-explorer/infra 'Custom compiler build' -f image=gcc-cross -f version="arm64 14.2.0" +``` + +Later, when the build is finished, add the needed config in `infra` repository. Test it with: + +``` sh + ./bin/ce_install install compilers/c++/cross/gcc/arm 14.2.0 +``` + +When the compiler is installed, then you can update the config files using the +instructions below. The script won't touch any config as it's a new target, but +it will provide most of the content, ready to be copy/pasted all around. + ## How to add a new version for some/all cross compilers The script [check_and_update_conf.py](./check_and_update_conf.py) can be used to automate some work: