├── .gitignore ├── .github └── workflows │ └── build-test.yml ├── README.md └── CHANGELOG.md /.gitignore: -------------------------------------------------------------------------------- 1 | # folders for build, install and sources 2 | buildNative/ 3 | buildWin32/ 4 | buildWin64/ 5 | installNative/ 6 | installWin32/ 7 | installWin64/ 8 | sources/ 9 | 10 | # generated toolchain during packaging 11 | arm-none-eabi-gcc-*-* 12 | 13 | # generated packages 14 | arm-none-eabi-gcc-*-*.tar.xz 15 | arm-none-eabi-gcc-*-*-win32.7z 16 | arm-none-eabi-gcc-*-*-win64.7z 17 | -------------------------------------------------------------------------------- /.github/workflows/build-test.yml: -------------------------------------------------------------------------------- 1 | # 2 | # file: build-test.yml 3 | # 4 | # author: Copyright (C) 2024 Freddie Chopin https://freddiechopin.info https://distortec.com 5 | # 6 | # This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not 7 | # distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. 8 | # 9 | 10 | name: Build Test 11 | 12 | on: push 13 | 14 | jobs: 15 | build-test: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Install dependencies 20 | run: | 21 | sudo apt update 22 | sudo apt install ninja-build texlive 23 | - name: Build 24 | shell: bash 25 | run: ./build-bleeding-edge-toolchain.sh 26 | - name: Print info about generated package 27 | run: ls -l arm-none-eabi-gcc-*.tar.xz 28 | - name: Print contents of generated info.txt 29 | run: cat installNative/info.txt 30 | - name: Print version info of compiled toolchain packages 31 | run: find ./installNative/bin -executable -type f -print -execdir {} --version \; 32 | - name: Add compiled toolchain to PATH environment variable 33 | run: echo "${GITHUB_WORKSPACE}/installNative/bin" >> ${GITHUB_PATH} 34 | - name: Test compilation of distortos 35 | run: | 36 | curl -L -O https://github.com/DISTORTEC/distortos/archive/master.tar.gz 37 | tar -xf master.tar.gz 38 | cd distortos-master 39 | ./scripts/buildAllConfigurations.sh configurations distortosTest 40 | - name: Upload package to FTP server 41 | if: ${{ github.ref_type == 'tag' }} 42 | shell: bash 43 | env: 44 | FTP_USERNAME: ${{ secrets.FTP_USERNAME }} 45 | FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} 46 | run: curl -T arm-none-eabi-gcc-*.tar.xz ftp://distortos.org --user "${FTP_USERNAME}":"${FTP_PASSWORD}" 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | bleeding-edge-toolchain 2 | ======================= 3 | 4 | All-in-one script to build bleeding-edge-toolchain for ARM microcontrollers. 5 | 6 | [![Build Test](https://github.com/FreddieChopin/bleeding-edge-toolchain/actions/workflows/build-test.yml/badge.svg)](https://github.com/FreddieChopin/bleeding-edge-toolchain/actions/workflows/build-test.yml)
7 | [bleeding-edge-toolchain - what it's all about?](https://freddiechopin.info/en/articles/35-arm/87-bleeding-edge-toolchain-o-co-chodzi) 8 | 9 | Toolchain for Linux 10 | ------------------- 11 | 12 | Due to the fact that building a binary on "Linux distribution A" that would work on "Linux distribution B" (where 13 | "Linux distribution B" may just be "Linux distribution A 6 months later after a few upgrades") is really hard 14 | (impossible?), there will be no binary packages for Linux. This script and some spare CPU time (~2 hours) is all you 15 | need. 16 | 17 | To build native toolchain for Linux just run the script with no arguments: 18 | 19 | `./build-bleeding-edge-toolchain.sh` 20 | 21 | Most of the tools required by the script should be already present in your system, but some may be missing. Generally 22 | the tools listed below should be enough to successfully execute this script: 23 | - obvious tools needed to compile anything - like `gcc`, `binutils`, `make` and `coreutils` 24 | - `m4`, which is required to execute `configure` scripts 25 | - `curl`, used to download the source tarballs of toolchain components 26 | - `tar`, used to extract source tarballs and to compress a compiled toolchain 27 | - `texinfo` and `texlive`, (optional) used to generate documentation 28 | - `python`, required by GDB, may be either version 2 or 3, but should contain headers and libraries, so you may need 29 | some kind of "development" and/or "library" package, depending on your system 30 | 31 | The exact set of required packages will be different on each system, but on a fresh Ubuntu installation you are going 32 | to need just these packages: `curl`, `m4`, `python2.7-dev` and optionally: `texinfo` and `texlive`. 33 | 34 | Toolchain for Windows 35 | --------------------- 36 | 37 | As Windows is at the opposite end of spectrum when it comes to binary compatibility, the packages for 32-bit and 64-bit 38 | Windows are available on [bleeding-edge-toolchain's website](https://github.com/FreddieChopin/bleeding-edge-toolchain) 39 | in Releases. If you choose the easy path, just download an archive, extract it with 7-zip and add `.../bin` folder to 40 | your system's `PATH` environment variable. 41 | 42 | If you want to _also_ build a toolchain for 32-bit and/or 64-bit Windows pass `--enable-win32` and/or `--enable-win64` 43 | as arguments for the script, like this: 44 | 45 | `./build-bleeding-edge-toolchain.sh --enable-win32 --enable-win64` 46 | 47 | Such compilation has more dependencies: 48 | - `Mingw-w64`, namely `i686-w64-mingw32-gcc` (for 32-bit version) and/or `x86_64-w64-mingw32-gcc` (for 64-bit version) 49 | with their own dependencies (binutils, headers, ...) 50 | - `libtermcap` and `libwinpthread` compiled for `Mingw-w64` 51 | - `p7zip`, used to compress the toolchain into an archive in `.7z` format 52 | 53 | Additional options 54 | ------------------ 55 | 56 | - `--keep-build-folders` will cause all build folders to be left intact after the build, by default - if this option is 57 | not provided - all build folders are removed as soon as they are not needed anymore 58 | - `--resume` will try to resume the last (interrupted) build instead of starting from scratch; be advised that this 59 | option is experimental and may not work reliably in all possible cases - if in doubt or in case of strange errors just 60 | don't use it to perform a clean build 61 | - `--skip-documentation` will skip building html/pdf documentation in the subprojects, by default - if this option is 62 | not provided - the documentation is built, requiring texlive/texinfo 63 | - `--skip-gdb` will skip building `gdb`, which may be unnecessary if your Linux distribution already has a multiarch 64 | `gdb` 65 | - `--skip-nano-libraries` will skip building of "nano" libraries, by default - if this option is not provided - "nano" 66 | libraries will be built, making the whole process take significantly longer 67 | - `--quiet` will make the build slightly less noisy 68 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | 4 | All notable changes to this project will be documented in this file. 5 | 6 | [241006](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/240616...241006) 7 | ------------------------------------------------------------------------------------------ 8 | 9 | ### Changed 10 | 11 | - Updated gcc to version 14.2.0. 12 | - Updated binutils to version 2.43. 13 | - Updated gdb to version 15.2. 14 | - Updated python to version 3.12.7. 15 | - Updated expat to version 2.6.3. 16 | - Updated isl to version 0.27. 17 | 18 | [240616](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/240530...240616) 19 | ------------------------------------------------------------------------------------------ 20 | 21 | ### Changed 22 | 23 | - Updated gcc to version 14.1.0. 24 | - Updated python to version 3.12.4. 25 | 26 | [240530](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/240410...240530) 27 | ------------------------------------------------------------------------------------------ 28 | 29 | ### Changed 30 | 31 | - Updated gcc to version 13.3.0. 32 | - Updated python to version 3.12.3. 33 | 34 | [240410](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/240409...240410) 35 | ------------------------------------------------------------------------------------------ 36 | 37 | ### Changed 38 | 39 | - Updated gcc to version 13.2.0. 40 | 41 | [240409](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/240408...240409) 42 | ------------------------------------------------------------------------------------------ 43 | 44 | ### Changed 45 | 46 | - Updated gcc to version 13.1.0. 47 | 48 | [240408](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/221119...240408) 49 | ------------------------------------------------------------------------------------------ 50 | 51 | ### Added 52 | 53 | - Added build test of complete toolchain (Linux only) using GitHub Actions. 54 | 55 | ### Changed 56 | 57 | - Updated gcc to version 12.3.0. 58 | - Updated newlib to version 4.4.0.20231231. 59 | - Updated binutils to version 2.42. 60 | - Updated gdb to version 14.2. 61 | - Updated expat to version 2.6.2. 62 | - Updated gmp to version 6.3.0. 63 | - Updated isl to version 0.26. 64 | - Updated mpc to version 1.3.1. 65 | - Updated mpfr to version 4.2.1. 66 | - Updated python to version 3.12.2. 67 | - Updated zlib to version 1.3.1. 68 | 69 | ### Fixed 70 | 71 | - Fixed documentation generation for newlib. 72 | - New versions of GDB finally use Python 3 for Windows, so fix the build by using packaged Python from NuGet. 73 | - Fixed build of GDB by using proper arguments for gmp and mpfr. 74 | - Fixed Windows build of GCC with recent MinGW toolchains 75 | ([upstream patch](https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609514.html)). 76 | 77 | [221119](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/221106...221119) 78 | ------------------------------------------------------------------------------------------ 79 | 80 | ### Changed 81 | 82 | - Updated gcc to version 12.2.0. 83 | - Updated expat to version 2.5.0. 84 | - Updated mpfr to version 4.1.1. 85 | - Updated zlib to version 1.2.13. 86 | 87 | [221106](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/221023...221106) 88 | ------------------------------------------------------------------------------------------ 89 | 90 | ### Changed 91 | 92 | - Updated gcc to version 12.1.0. 93 | 94 | [221023](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/221022...221023) 95 | ------------------------------------------------------------------------------------------ 96 | 97 | ### Changed 98 | 99 | - Updated gcc to version 11.3.0. 100 | 101 | [221022](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/221011...221022) 102 | ------------------------------------------------------------------------------------------ 103 | 104 | ### Changed 105 | 106 | - Updated gcc to version 11.2.0. 107 | 108 | [221011](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/221009...221011) 109 | ------------------------------------------------------------------------------------------ 110 | 111 | ### Changed 112 | 113 | - Updated gcc to version 11.1.0. 114 | 115 | [221009](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/210213...221009) 116 | ------------------------------------------------------------------------------------------ 117 | 118 | ### Changed 119 | 120 | - Updated gcc to version 10.3.0. 121 | - Updated newlib to version 4.2.0.20211231. 122 | - Updated binutils to version 2.39. 123 | - Updated gdb to version 12.1. 124 | - Updated expat to version 2.4.9. 125 | - Updated isl to version 0.25. 126 | - Updated libiconv to version 1.17. 127 | - Updated zlib to version 1.2.12. 128 | 129 | ### Fixed 130 | 131 | - Fixed download address of isl. 132 | - Fixed gdb build for Windows. 133 | 134 | [210213](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/200517...210213) 135 | ------------------------------------------------------------------------------------------ 136 | 137 | ### Added 138 | 139 | - `--skip-gdb` option, which skips building of GDB. This might come in handy if your Linux distribution already has a 140 | multiarch GDB. 141 | 142 | ### Changed 143 | 144 | - Updated gcc to version 10.2.0. 145 | - Updated newlib to version 4.1.0. 146 | - Updated binutils to version 2.36.1. 147 | - Updated gdb to version 10.1. 148 | - Updated expat to version 2.2.10. 149 | - Updated gmp to version 6.2.1. 150 | - Updated isl to version 0.23. 151 | - Updated mpc to version 1.2.1. 152 | - Updated mpfr to version 4.1.0. 153 | 154 | ### Fixed 155 | 156 | - Fix building of toolchain on a buildserver without a tty. 157 | - Don't hardcode paths to mingw's dll files. 158 | 159 | [200517](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/200323...200517) - 2020-05-17 160 | ------------------------------------------------------------------------------------------------------- 161 | 162 | ### Changed 163 | 164 | - Updated gcc to version 10.1.0. 165 | - Updated python to version 2.7.18. 166 | 167 | ### Fixed 168 | 169 | - Fixed build of GDB for Windows, which may fail when host's `pkg-config` provides host's libraries' paths to GDB's 170 | `configure`. 171 | 172 | [200323](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/190812...200323) - 2020-03-23 173 | ------------------------------------------------------------------------------------------------------- 174 | 175 | ### Changed 176 | 177 | - Updated gcc to version 9.3.0. 178 | - Updated newlib to version 3.3.0. 179 | - Updated binutils to version 2.34. 180 | - Updated gdb to version 9.1. 181 | - Updated expat to version 2.2.9. 182 | - Updated gmp to version 6.2.0. 183 | - Updated isl to version 0.22. 184 | - Updated python to version 2.7.17. 185 | 186 | ### Fixed 187 | 188 | - Fixed various portability-related issues of the script (by Oliver Galvin). 189 | - Fixed behaviour of `--resume` option for Windows builds. 190 | - Fixed Windows build for recent versions of mingw, which changed default settings for SSP. 191 | 192 | [190812](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/190503...190812) - 2019-08-12 193 | ------------------------------------------------------------------------------------------------------- 194 | 195 | ### Added 196 | 197 | - `--quiet` option, which will make the build quiet(er). 198 | - `--resume` option, which will try to resume the last build. 199 | 200 | ### Changed 201 | 202 | - Updated gcc to version 9.2.0. 203 | - Updated gdb to version 8.3.0. 204 | - Updated expat to version 2.2.7. 205 | 206 | ### Fixed 207 | 208 | - Allow building on macOS (darwin). 209 | 210 | [190503](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/190223...190503) - 2019-05-03 211 | ------------------------------------------------------------------------------------------------------- 212 | 213 | ### Changed 214 | 215 | - Updated gcc to version 9.1.0. 216 | - Updated isl to version 0.21. 217 | - Updated libiconv to version 1.16. 218 | - Updated python to version 2.7.16. 219 | 220 | [190223](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/180726...190223) - 2019-02-23 221 | ------------------------------------------------------------------------------------------------------- 222 | 223 | ### Changed 224 | 225 | - Updated gcc to version 8.3.0. 226 | - Updated binutils to version 2.32. 227 | - Updated newlib to version 3.1.0. 228 | - Updated gdb to version 8.2.1. 229 | - Updated expat to version 2.2.6. 230 | - Updated isl to version 0.20. 231 | - Updated mpfr to version 4.0.2. 232 | - Use [`--enable-newlib-global-stdio-streams`](https://sourceware.org/ml/newlib/2017/msg00516.html) option for both 233 | newlib and newlib-nano. 234 | - Download expat from github, as sourceforge is not reliable. 235 | - Download zlib from project's website, as sourceforge is not reliable. 236 | - Compress Linux package using single thread only - this is slower, but produces smaller file. The default can be 237 | overriden with `XZ_OPT` environment variable: `XZ_OPT="-9e -T 0 -v" ./build-bleeding-edge-toolchain.sh ...`. 238 | - Make all files in Linux package read-only. 239 | - Compress Linux package without timestamps. 240 | 241 | [180726](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/180502...180726) - 2018-07-26 242 | ------------------------------------------------------------------------------------------------------- 243 | 244 | ### Changed 245 | 246 | - Updated gcc to version 8.2.0. 247 | - Updated binutils to version 2.31.1. 248 | - Updated python to version 2.7.15. 249 | - Updated newlib to version 3.0.0.20180720. 250 | 251 | [180502](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/180127...180502) - 2018-05-02 252 | ------------------------------------------------------------------------------------------------------- 253 | 254 | ### Added 255 | 256 | - Support for building gcc snapshots (including release candidates). 257 | 258 | ### Changed 259 | 260 | - Updated gcc to version 8.1.0. 261 | - Updated binutils to version 2.30. 262 | - Updated gdb to version 8.1. 263 | - Updated newlib to version 3.0.0.20180226. 264 | - Updated isl to version 0.19. 265 | - Updated mpfr to version 4.0.1. 266 | 267 | [180127](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/170901...180127) - 2018-01-27 268 | ------------------------------------------------------------------------------------------------------- 269 | 270 | ### Added 271 | 272 | - `--skip-documentation` option, which will disable building html/pdf documentation in the subprojects. 273 | 274 | ### Changed 275 | 276 | - Use HTTP for all downloads, since FTP may cause problems in some network configurations. 277 | - Updated gcc to version 7.3.0. 278 | - Updated newlib to version 3.0.0 (+ patches). 279 | - Updated binutils to version 2.29.1. 280 | - Updated gdb to version 8.0.1. 281 | - Updated expat to version 2.2.5. 282 | - Updated mpc to version 1.1.0. 283 | - Updated mpfr to version 4.0.0. 284 | - Updated python to version 2.7.14. 285 | 286 | ### Fixed 287 | 288 | - Always try to resume downloads. This fixes the problem which occured when the file is downloaded only partially. 289 | - For native build, compile libraries (especially gmp) and other components for exactly the same host as detected by 290 | gcc's `config.guess`. 291 | 292 | [170901](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/170503...170901) - 2017-09-01 293 | ------------------------------------------------------------------------------------------------------- 294 | 295 | ### Changed 296 | 297 | - Updated gcc to version 7.2.0. 298 | - Updated newlib to version 2.5.0.20170818. 299 | - Updated binutils to version 2.29. 300 | - Updated gdb to version 8.0. 301 | - Updated expat to version 2.2.4. 302 | - Use *trusty* for Travis CI, as new gdb requires more recent version of gcc. 303 | 304 | [170503](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/170314...170503) - 2017-05-03 305 | ------------------------------------------------------------------------------------------------------- 306 | 307 | ### Changed 308 | 309 | - Updated gcc to version 7.1.0. 310 | - Updated newlib to version 2.5.0.20170421. 311 | - Updated isl to version 0.18. 312 | - Download isl from project's website, as gcc's ftp doesn't have the most recent version. 313 | - Explicitly disabled guile support in gdb, as recent versions of these projects are incompatible (see 314 | [bug 21104](https://sourceware.org/bugzilla/show_bug.cgi?id=21104)). 315 | 316 | ### Fixed 317 | 318 | - Fixed Windows builds of GCC snapshots, which failed because GCC's version (e.g. *7.0.1*) doesn't match snapshot 319 | version (e.g. *7-20170409*). 320 | 321 | ### Removed 322 | 323 | - Big-endian version of multilib for *ARMv7-R* targets, as now multilib configuration is part of the mainline GCC. 324 | 325 | [170314](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/170107...170314) - 2017-03-14 326 | ------------------------------------------------------------------------------------------------------- 327 | 328 | ### Added 329 | 330 | - `--keep-build-folders` option, which will disable removal of unneeded build folders. 331 | - `--skip-nano-libraries` option, which will skip building of "nano" libraries, making the build much shorter. 332 | 333 | ### Changed 334 | 335 | - Build folders are deleted as soon as they are not needed anymore. 336 | - Download isl from gcc's ftp, as it is more reliable. 337 | - Updated newlib to version 2.5.0.20170228. 338 | - Updated binutils to version 2.28. 339 | - Updated gdb to version 7.12.1. 340 | - Updated libiconv to version 1.15. 341 | - Updated zlib to version 1.2.11. 342 | - Allow overriding `XZ_OPT` when calling the script. 343 | - Both newlib and newlib-nano are built with the new `--enable-newlib-retargetable-locking` option. 344 | 345 | ### Fixed 346 | 347 | - Fixed missing `newlib.h` when using `nano.specs`. 348 | - Fixed download location for zlib. 349 | 350 | [170107](https://github.com/FreddieChopin/bleeding-edge-toolchain/compare/161029...170107) - 2017-01-07 351 | ------------------------------------------------------------------------------------------------------- 352 | 353 | ### Added 354 | 355 | - Support for "nano" variant of libraries. 356 | - Big-endian version of multilib for *ARMv7-R* targets (by Jiri Dobry). 357 | - Re-enabled PDF documentation for all components. 358 | 359 | ### Changed 360 | 361 | - More detailed info about requirements to build the toolchain in README.md. 362 | - Updated gcc to version 6.3.0. 363 | - Updated newlib to version 2.5.0. 364 | - Updated gmp to version 6.1.2. 365 | - Updated isl to version 0.16.1. 366 | - Updated python to version 2.7.13. 367 | - Updated zlib to version 1.2.10. 368 | - Download zlib from sourceforge, as zlib's official website seems to host only the most recent version. 369 | 370 | ### Fixed 371 | 372 | - Removed duplicate content in gcc multilib patch (by Jiri Dobry). 373 | - Fixed brackets in gcc multilib patch, which restores libraries for *ARMv7-R* targets (by Jiri Dobry). 374 | - Fixed missing libstdc++ "pretty printers" in Windows packages. 375 | 376 | 161029 - 2016-10-29 377 | ------------------- 378 | 379 | First release 380 | --------------------------------------------------------------------------------