Use GNU mirrors

This commit is contained in:
2025-09-08 10:56:54 +02:00
parent 61a9584fb6
commit 3a577f7d6a

View File

@@ -105,7 +105,7 @@ def download_and_unarchive(url, target)
http.request request do |response|
case response
when Net::HTTPRedirection
download_and_unarchive URI.parse(response['location'])
download_and_unarchive URI.parse(response['location']), target
when Net::HTTPSuccess
Open3.popen2 'tar', '-C', target.to_path, archive_type, '-xv' do |stdin, stdout, wait_thread|
Thread.new do
@@ -137,7 +137,7 @@ end
# Build cross binutils.
def binutils(options)
source_directory = download_and_unarchive(
URI.parse("https://ftp.gnu.org/gnu/binutils/binutils-#{BINUTILS_VERSION}.tar.xz"),
URI.parse("https://ftpmirror.gnu.org/gnu/binutils/binutils-#{BINUTILS_VERSION}.tar.xz"),
options.tools)
cwd = source_directory.dirname + 'build-binutils'
@@ -209,7 +209,7 @@ end
# Copy glibc headers.
def headers(options)
source_directory = download_and_unarchive(
URI.parse("https://ftp.gnu.org/gnu/glibc/glibc-#{GLIBC_VERSION}.tar.xz"),
URI.parse("https://ftpmirror.gnu.org/gnu/glibc/glibc-#{GLIBC_VERSION}.tar.xz"),
options.tools)
include_directory = options.tools + 'include'