From 710c738a089f855686e9d3ea9c74f32894a4b060 Mon Sep 17 00:00:00 2001 From: Ellie <64124388+ell1e@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:02:46 +0100 Subject: [PATCH] Update README.md Attempt to clarify the usage section to make it more clear how to get started for absolute beginners --- README.md | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 49ef375..74daf3c 100644 --- a/README.md +++ b/README.md @@ -10,27 +10,37 @@ It provides the following stuffs: --- -## GCC Toolchain +## Use Prebuilt Toolchain + +1. Go to [the release page](https://github.com/adonis0147/devel-env/releases) and fetch the `install_toolchain_x86_64.sh` (if you're on an x64 system) or `install_toolchain_aarch64.sh` (if you're on an ARM64 system). +2. Extract the toolchain, don't run this as root but simply as your regular user: + ``` + ./install_toolchain_x86_64.sh my-gcc-toolchain + ``` +3. Optionally, ajust the `$PATH` variable to easily access all the tools: + ``` + export PATH="`pwd`/my-gcc-toolchain/compiler/bin:${PATH}" + ``` +4. Now `gcc --help` should work! + +## Build GCC Toolchain Yourself (Advanced) + +1. Build the docker image. _**CAVEAT:**_ It may take **TOO TOO LONG** time to finish on **ARM64** platform (e.g. + macOS with Apple Silicon). It is recommended to download it from [the release page](https://github.com/adonis0147/devel-env/releases). + ```shell + cd toolchain + docker build --platform=linux/x86-64 -t toolchain . + ``` -### Generation -1. Build the docker image. _**CAVEAT:**_ It may take **TOO TOO LONG** time to finish on **ARM64** platform (e.g. macOS with Apple Silicon). It is recommended to download it from [the release page](https://github.com/adonis0147/devel-env/releases). -```shell -cd toolchain -docker build --platform=linux/x86-64 -t toolchain . -``` 2. Generate the toolchain. -```shell -mkdir output -docker run --platform=linux/x86-64 --rm --mount type=bind,source="$(pwd)/output",target=/output toolchain -``` -3. Usage -```shell -# Copy the output/install_toolchain.sh to the target server and run the following commands. -./install_toolchain.sh -export PATH="/compiler/bin:${PATH}" -``` + ```shell + mkdir output + docker run --platform=linux/x86-64 --rm --mount type=bind,source="$(pwd)/output",target=/output toolchain + ``` + +3. You can now use the `output/install_toolchain.sh` script [like above](#use-prebuilt-toolchain)! -## Toolset +## Use Optional Toolset ### Install the toolset ```shell cp output/install_toolchain.sh devel/scripts