Use GNU mirrors
This commit is contained in:
@@ -105,7 +105,7 @@ def download_and_unarchive(url, target)
|
|||||||
http.request request do |response|
|
http.request request do |response|
|
||||||
case response
|
case response
|
||||||
when Net::HTTPRedirection
|
when Net::HTTPRedirection
|
||||||
download_and_unarchive URI.parse(response['location'])
|
download_and_unarchive URI.parse(response['location']), target
|
||||||
when Net::HTTPSuccess
|
when Net::HTTPSuccess
|
||||||
Open3.popen2 'tar', '-C', target.to_path, archive_type, '-xv' do |stdin, stdout, wait_thread|
|
Open3.popen2 'tar', '-C', target.to_path, archive_type, '-xv' do |stdin, stdout, wait_thread|
|
||||||
Thread.new do
|
Thread.new do
|
||||||
@@ -137,7 +137,7 @@ end
|
|||||||
# Build cross binutils.
|
# Build cross binutils.
|
||||||
def binutils(options)
|
def binutils(options)
|
||||||
source_directory = download_and_unarchive(
|
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)
|
options.tools)
|
||||||
|
|
||||||
cwd = source_directory.dirname + 'build-binutils'
|
cwd = source_directory.dirname + 'build-binutils'
|
||||||
@@ -209,7 +209,7 @@ end
|
|||||||
# Copy glibc headers.
|
# Copy glibc headers.
|
||||||
def headers(options)
|
def headers(options)
|
||||||
source_directory = download_and_unarchive(
|
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)
|
options.tools)
|
||||||
include_directory = options.tools + 'include'
|
include_directory = options.tools + 'include'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user