Skip to content

Commit

Permalink
gcc@13: fix build on Sequoia and Linux arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Nov 6, 2024
1 parent 046a59a commit dbd4c93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Formula/g/gcc@13.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 58 in Formula/g/gcc@13.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew install --verbose --formula --build-bottle gcc@13` failed on macOS Sonoma (14) on Apple Silicon!

/private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/xgcc -B/private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/bin/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/lib/ -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/include -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/sys-include -fno-checking -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o cas_1_1.o -MT cas_1_1.o -MD -MP -MF cas_1_1.dep -DL_cas -DSIZE=1 -DMODEL=1 -c ../../../libgcc/config/aarch64/lse.S ranlib libheapt_w.a /private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/xgcc -B/private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/bin/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/lib/ -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/include -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/sys-include -fno-checking -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o cas_2_1.o -MT cas_2_1.o -MD -MP -MF cas_2_1.dep -DL_cas -DSIZE=2 -DMODEL=1 -c ../../../libgcc/config/aarch64/lse.S /private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/xgcc -B/private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/bin/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/lib/ -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/include -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/sys-include -fno-checking -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o cas_4_1.o -MT cas_4_1.o -MD -MP -MF cas_4_1.dep -DL_cas -DSIZE=4 -DMODEL=1 -c ../../../libgcc/config/aarch64/lse.S /private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/xgcc -B/private/tmp/gccA13-20241106-5836-5llmxr/gcc-13.3.0/build/./gcc/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/bin/ -B/opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/lib/ -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/include -isystem /opt/homebrew/opt/gcc@13/aarch64-apple-darwin23/sys-include -fno-checking -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=11 -mmacosx-version-min=11.0 -fno-common -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc
# GCC will suffer build errors if forced to use a particular linker.
ENV.delete "LD"
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit dbd4c93

Please sign in to comment.