From dbd4c93a0b91d3a7191c2b79661b904588381075 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 6 Nov 2024 18:51:07 -0500 Subject: [PATCH] gcc@13: fix build on Sequoia and Linux arm64 --- Formula/g/gcc@13.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/g/gcc@13.rb b/Formula/g/gcc@13.rb index bcc7e7c82500..2acb160b07b8 100644 --- a/Formula/g/gcc@13.rb +++ b/Formula/g/gcc@13.rb @@ -47,6 +47,14 @@ class GccAT13 < Formula sha256 "c5e9236430ef6edbdda7de9ac70bf79e21628077a48322cec7f3f064ccfc243d" end + # Apply commit to fix Sequoia build until above patch is updated (e.g. next version bump) + patch do + on_sequoia :or_newer do + url "https://github.com/iains/gcc-13-branch/commit/4fdcc027fcc235805c7cc4bede6948b9a00afe1e.patch?full_index=1" + sha256 "9bf20d0d7bf531932d9294cebd5ff5cc4fbc2f2b4d09e56af8d8e05f4b1a53fb" + end + end + def install # GCC will suffer build errors if forced to use a particular linker. ENV.delete "LD" @@ -102,6 +110,7 @@ def install # Change the default directory name for 64-bit libraries to `lib` # https://stackoverflow.com/a/54038769 inreplace "gcc/config/i386/t-linux64", "m64=../lib64", "m64=" + inreplace "gcc/config/aarch64/t-aarch64-linux", "lp64=../lib64", "lp64=" make_args = %W[ BOOT_CFLAGS=-I#{Formula["zlib"].opt_include}