const gcc_version_sources = Dict{VersionNumber,Vector}(
    v"4.8.5" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2",
                        "22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-2.4.2.tar.xz",
                        "d7271bbfbc9ddf387d3919df8318cd7192c67b232919bfa1cb3202d07843da1b"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz",
                        "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-4.3.2.tar.bz2",
                        "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"),
    ],
    v"5.2.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2",
                        "5f835b04b5f7dd4f4d2dc96190ec1621b8d89f2dc6f638f9f8bc1b1014ba8cad"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-2.4.2.tar.xz",
                        "d7271bbfbc9ddf387d3919df8318cd7192c67b232919bfa1cb3202d07843da1b"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz",
                        "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-4.3.2.tar.bz2",
                        "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.14.tar.bz2",
                        "7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36"),
    ],
    v"6.1.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2",
                        "09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-2.4.2.tar.xz",
                        "d7271bbfbc9ddf387d3919df8318cd7192c67b232919bfa1cb3202d07843da1b"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz",
                        "e664603757251fd8a352848276497a4c79b7f8b21fd8aedd5cc0598a38fee3e4"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-4.3.2.tar.bz2",
                        "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.15.tar.bz2",
                        "8ceebbf4d9a81afa2b4449113cee4b7cb14a687d7a549a963deb5e2a41458b6b"),
    ],
    v"7.1.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.bz2",
                        "8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-3.1.4.tar.xz",
                        "761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.0.3.tar.gz",
                        "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2",
                        "412538bb65c799ac98e17e8cfcdacbb257a57362acfaaff254b0fcae970126d2"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.1.0.tar.xz",
                        "68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989"),
    ],
    v"8.1.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-8.1.0/gcc-8.1.0.tar.xz",
                        "1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.0.1.tar.xz",
                        "67874a60826303ee2fb6affc6dc0ddd3e749e9bfcb4c8655e3953d0458a6e16e"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.1.0.tar.gz",
                        "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2",
                        "6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.1.2.tar.xz",
                        "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912"),
    ],
    v"9.1.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-9.1.0/gcc-9.1.0.tar.xz",
                        "79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.0.2.tar.xz",
                        "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.1.0.tar.gz",
                        "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2",
                        "6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.1.2.tar.xz",
                        "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912"),
    ],
    v"10.2.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz",
                        "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.0.2.tar.xz",
                        "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.1.0.tar.gz",
                        "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2",
                        "6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.1.2.tar.xz",
                        "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912"),
    ],
    v"11.1.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-11.1.0/gcc-11.1.0.tar.xz",
                        "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.0.2.tar.xz",
                        "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.1.0.tar.gz",
                        "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2",
                        "6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.1.2.tar.xz",
                        "87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912"),
    ],
    v"12.1.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-12.1.0/gcc-12.1.0.tar.xz",
                        "62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz",
                        "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.1.0.tar.xz",
                        "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.2.1.tar.gz",
                        "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2",
                        "fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0"),
    ],
    v"13.2.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz",
                        "e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz",
                        "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.1.0.tar.xz",
                        "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.2.1.tar.gz",
                        "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2",
                        "fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0"),
    ],
    v"14.3.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-14.3.0/gcc-14.3.0.tar.xz",
                      "e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz",
                      "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.1.0.tar.xz",
                      "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.2.1.tar.gz",
                      "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2",
                      "fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0"),
    ],
    v"15.2.0" => [
        ArchiveSource("https://mirrors.kernel.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz",
                      "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e"),
        ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz", # 6.3.0?
                      "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.1.0.tar.xz", # 4.2.2?
                      "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f"),
        ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.2.1.tar.gz", # 1.3.2?
                      "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"),
        ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2",
                      "fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0"),
    ],
)

function gcc_sources(gcc_version::VersionNumber, compiler_target::Platform; kwargs...)
    # Since we can build a variety of GCC versions, track them and their hashes here.
    # We download GCC, MPFR, MPC, ISL and GMP.

    # Map from GCC version and platform -> binutils sources
    if Sys.isapple(compiler_target)
        # The WIP branch by Iain Sandoe, who is working his toolchain magic to give us aarch64-darwin compilers
        # Build this targeting aarch64-apple-darwin.  To add new versions, go to
        # https://github.com/iains/gcc-darwin-arm64/branches/all and find the most recent branch named
        # `master-wip-apple-si-on-ABCDEF` and use the tip of that branch, see
        # https://github.com/JuliaLang/julia/issues/44435#issuecomment-1059058949
        gcc_version_sources[v"11.0.0-iains"] = [
            GitSource("https://github.com/iains/gcc-darwin-arm64.git",
                      "ccc57f4ed3feed697f17d3230786389b1b410af9"),
            ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.0.1.tar.xz",
                          "67874a60826303ee2fb6affc6dc0ddd3e749e9bfcb4c8655e3953d0458a6e16e"),
            ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.1.0.tar.gz",
                          "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"),
            ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2",
                          "6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b"),
            ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.0.tar.xz",
                          "258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526"),
        ]
        gcc_version_sources[v"12.0.1-iains"] = [
            GitSource("https://github.com/iains/gcc-darwin-arm64.git",
                      "af646bebaceed617775b5465cf06cb5d270a16f4"),
            ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.0.2.tar.xz",
                          "1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a"),
            ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.1.0.tar.gz",
                          "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"),
            ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2",
                          "6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b"),
            ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.0.tar.xz",
                          "258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526"),
        ]
        # Iain Sandoe's GCC 15 Darwin/arm64 release branch (gcc-15-2-darwin-pre-0):
        # upstream GCC 15.2.0 + Darwin/arm64 patches, same base as Homebrew's `gcc`.
        # Deps match GCC 15.2's `contrib/download_prerequisites`.
        gcc_version_sources[v"15.2.0-iains"] = [
            GitSource("https://github.com/iains/gcc-15-branch.git",
                      "bf0bb1095eb8440457658fad903cca575dbde3e9"),
            ArchiveSource("https://mirrors.kernel.org/gnu/gmp/gmp-6.2.1.tar.xz",
                          "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2"),
            ArchiveSource("https://mirrors.kernel.org/gnu/mpfr/mpfr-4.1.0.tar.xz",
                          "0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f"),
            ArchiveSource("https://mirrors.kernel.org/gnu/mpc/mpc-1.2.1.tar.gz",
                          "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459"),
            ArchiveSource("https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2",
                          "fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0"),
        ]
        # MacOS doesn't actually use binutils, it uses cctools
        if gcc_version < v"14"
            binutils_sources = [
                GitSource("https://github.com/tpoechtrager/apple-libtapi.git",
                          "a66284251b46d591ee4a0cb4cf561b92a0c138d8"),
                GitSource("https://github.com/tpoechtrager/cctools-port.git",
                          "634a084377ee2e2932c66459b0396edf76da2e9f"),
            ]
        else
            # cctools-port pinned to conda-forge's cctools-and-ld64-feedstock commit
            # (cctools 1030.6.3 / ld64 956.6, branch `1030.6.3-ld64-956.6`) -- a widely
            # deployed cross-linker.  apple-libtapi 1500.0.12.3 (Xcode 15 era); when bumping
            # it, also update TAPI_REPOSITORY_STRING/TAPI_FULL_VERSION in gcc_common.jl.
            binutils_sources = [
                GitSource("https://github.com/tpoechtrager/apple-libtapi.git",
                          "fbe6e2ae9dab1768ffb22a0d64d525fb7bdf9be6"), # 1500.0.12.3
                GitSource("https://github.com/tpoechtrager/cctools-port.git",
                          "e5dfc5633cb9060a94d16b8d78a01eb0b3620021"), # 1030.6.3-ld64-956.6 (conda-forge pin)
            ]
        end
    else
        # Different versions of GCC should be paired with different versions of Binutils
        binutils_gcc_version_mapping = Dict(
            v"4.8.5" => v"2.24",
            v"5.2.0" => v"2.25.1",
            v"6.1.0" => v"2.26",
            v"7.1.0" => v"2.27",
            v"8.1.0" => v"2.31",
            v"9.1.0" => v"2.33.1",
            v"10.2.0" => v"2.34",
            v"11.1.0" => v"2.36",
            v"12.1.0" => v"2.38",
            v"13.2.0" => v"2.41",
            v"14.3.0" => v"2.43.1",
            v"15.2.0" => v"2.45.1",
        )

        # Everyone else uses GNU Binutils, but we have to version carefully.
        binutils_version_sources = Dict(
            v"2.24" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2",
                              "e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137"),
            ],
            v"2.25.1" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2",
                              "b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22"),
            ],
            v"2.26" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2",
                              "c2ace41809542f5237afc7e3b8f32bb92bc7bc53c6232a84463c423b0714ecd9"),
            ],
            v"2.27" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.bz2",
                              "369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88"),
            ],
            v"2.31" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.31.tar.bz2",
                              "2c49536b1ca6b8900531b9e34f211a81caf9bf85b1a71f82b81ae32fcd8ffe19"),
            ],
            v"2.33.1" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz",
                              "ab66fc2d1c3ec0359b8e08843c9f33b63e8707efdff5e4cc5c200eae24722cbf"),
            ],
            v"2.34" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.xz",
                              "f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952"),
            ],
            v"2.35.1" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.35.1.tar.xz",
                              "3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607"),
            ],
            v"2.36" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.xz",
                              "5788292cc5bbcca0848545af05986f6b17058b105be59e99ba7d0f9eb5336fb8"),
            ],
            v"2.38" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz",
                              "e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024"),
            ],
            v"2.41" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz",
                              "ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450"),
            ],
            v"2.43.1" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz",
                              "13f74202a3c4c51118b797a39ea4200d3f6cfbe224da6d1d95bb938480132dfd"),
            ],
            v"2.45.1" => [
                ArchiveSource("https://ftp.gnu.org/gnu/binutils/binutils-2.45.1.tar.xz",
                              "5fe101e6fe9d18fdec95962d81ed670fdee5f37e3f48f0bef87bddf862513aa5"),
            ],
        )
        binutils_version = binutils_gcc_version_mapping[gcc_version]
        binutils_sources = binutils_version_sources[binutils_version]
    end


    if Sys.islinux(compiler_target) && libc(compiler_target) == "glibc"
        # Depending on our architecture, we choose different versions of glibc
        if arch(compiler_target) in ["armv7l", "aarch64"]
            libc_sources = [
                ArchiveSource("https://mirrors.kernel.org/gnu/glibc/glibc-2.19.tar.xz",
                              "2d3997f588401ea095a0b27227b1d50cdfdd416236f6567b564549d3b46ea2a2"),
            ]
        elseif arch(compiler_target) in ["x86_64", "i686", "powerpc64le"]
            libc_sources = [
                ArchiveSource("https://mirrors.kernel.org/gnu/glibc/glibc-2.17.tar.xz",
                              "6914e337401e0e0ade23694e1b2c52a5f09e4eda3270c67e7c3ba93a89b5b23e"),
            ]
        elseif arch(compiler_target) in ["riscv64"]
            libc_sources = [
                ArchiveSource("https://mirrors.kernel.org/gnu/glibc/glibc-2.35.tar.xz",
                              "5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e"),
            ]
        else
            error("Unknown arch for glibc for compiler target $(compiler_target)")
        end
    elseif Sys.islinux(compiler_target) && libc(compiler_target) == "musl"
        if arch(compiler_target) in ["riscv64"]
            libc_sources = [
                ArchiveSource("https://www.musl-libc.org/releases/musl-1.2.0.tar.gz",
                              "c6de7b191139142d3f9a7b5b702c9cae1b5ee6e7f57e582da9328629408fd4e8"),
            ]
        else
            libc_sources = [
                ArchiveSource("https://www.musl-libc.org/releases/musl-1.1.19.tar.gz",
                              "db59a8578226b98373f5b27e61f0dd29ad2456f4aa9cec587ba8c24508e4c1d9"),
            ]
        end
    elseif Sys.isapple(compiler_target)
        if arch(compiler_target) == "aarch64"
            libc_sources = [
                ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/11.0-11.1/MacOSX11.1.sdk.tar.xz",
                              "9b86eab03176c56bb526de30daa50fa819937c54b280364784ce431885341bf6"),
            ]
        else
            libc_sources = [
                ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.12.sdk.tar.xz",
                              "6852728af94399193599a55d00ae9c4a900925b6431534a3816496b354926774"),
            ]
        end
    elseif Sys.isfreebsd(compiler_target)
        if arch(compiler_target) == "aarch64"
            libc_sources = [
                ArchiveSource("http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/arm64/14.1-RELEASE/base.txz",
                              "b25830252e0dce0161004a5b69a159cbbd92d5e92ae362b06158dbb3f2568d32"),
            ]
        else
            libc_sources = [
                ArchiveSource("http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/13.4-RELEASE/base.txz",
                              "8e13b0a93daba349b8d28ad246d7beb327659b2ef4fe44d89f447392daec5a7c"),
            ]
        end
    elseif Sys.iswindows(compiler_target)
        libc_sources = [
            ArchiveSource("https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v11.0.1.tar.bz2",
                          "3f66bce069ee8bed7439a1a13da7cb91a5e67ea6170f21317ac7f5794625ee10"),
        ]
    else
        error("Unknown libc mapping for platform $(compiler_target)")
    end

    # We bundle together GCC, Binutils and libc.
    return [
        gcc_version_sources[gcc_version]...,
        binutils_sources...,
        libc_sources...,
        DirectorySource("./bundled"; follow_symlinks=true),
    ]
end
