From 4a4fb554a042fc3f37d5237cc34d60e56782752e Mon Sep 17 00:00:00 2001 From: PaperChalice Date: Sat, 18 May 2024 20:36:42 +0800 Subject: [PATCH] strap --- Formula/gcc/gcc-strap.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Formula/gcc/gcc-strap.rb b/Formula/gcc/gcc-strap.rb index db3785c4..cd1ca6dd 100644 --- a/Formula/gcc/gcc-strap.rb +++ b/Formula/gcc/gcc-strap.rb @@ -1,8 +1,8 @@ class GccStrap < Formula desc "GNU compiler collection" homepage "https://gcc.gnu.org/" - url "https://ftp.gnu.org/gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz" - sha256 "e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da" + url "https://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.xz" + sha256 "e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840" license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } bottle do @@ -17,6 +17,7 @@ class GccStrap < Formula depends_on "gettext" => :build depends_on "make" => :build depends_on "python" => :build + depends_on "rust" => :build depends_on "texinfo" => :build # The bottles are built on systems with the CLT installed, and do not work @@ -32,14 +33,15 @@ def install ENV.delete "CXX" ENV.delete "LD" - triple = "#{Hardware::CPU.arch}-apple-#{OS.kernel_name.downcase}" - languages = %w[ada c c++ d objc obj-c++ fortran jit lto m2] + inreplace "libgcc/config/t-darwin-min-5", "10.5", "11.7" + + triple = "#{Hardware::CPU.arch}-apple-darwin#{OS.kernel_version.major}" + languages = %w[ada c c++ d objc obj-c++ fortran jit lto m2 rust] sr = MacOS.sdk_path.to_str.tr "0-9", "" configure_args = %W[ --build=#{triple} --prefix=#{prefix} - --disable-bootstrap --disable-multilib --enable-checking=release --enable-libphobos @@ -48,6 +50,7 @@ def install --with-sysroot=#{sr} --with-arch=x86-64 --with-tune=generic + --without-zstd ] system "./contrib/download_prerequisites" @@ -64,8 +67,6 @@ def install end rm_rf man3/"stdheader.dSYM" [info, man1, man3, man7].each { |d| Utils::Gzip.compress(*Dir[d/"*"]) } - MachO::Tools.add_rpath "#{lib}/gcc/#{triple}/#{version.major}/adalib/#{shared_library "libgnarl"}", - "@loader_path" end test do