Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class AvrGccAT11 < Formula
desc "GNU compiler collection for AVR 8-bit and 32-bit Microcontrollers"
homepage "https://gcc.gnu.org/"
Expand All @@ -7,17 +7,9 @@
sha256 "b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39"

license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" }
revision 2

head "https://gcc.gnu.org/git/gcc.git", branch: "releases/gcc-11"

bottle do
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/[email protected]_2"
sha256 arm64_sonoma: "33ac86d868a1cb875e94a9d33a51269a75f94c7e54c106c549e58571e4f1ccef"
sha256 ventura: "c368474e738577d7e0267d55b395ae0462cc2c09c5bea6438f4f63d7b0a774c2"
sha256 monterey: "40318710c03906b08c7d68965d05faf9bc82e896723cc815cdcb2e443429d479"
end

# The bottles are built on systems with the CLT installed, and do not work
# out of the box on Xcode-only systems due to an incorrect sysroot.
pour_bottle? only_if: :clt_installed
Expand All @@ -26,8 +18,6 @@
"This is useful if you want to have multiple version of avr-gcc\n" \
"installed on the same machine"

option "with-ATMega168pbSupport", "Add ATMega168pb Support to avr-gcc"

# automake & autoconf are needed to build from source
# with the ATMega168pbSupport option.
depends_on "autoconf" => :build
Expand All @@ -44,19 +34,9 @@
# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip

current_build = build

resource "avr-libc" do
url "https://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2"
mirror "https://download-mirror.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2"
sha256 "b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97"

if current_build.with? "ATMega168pbSupport"
patch do
url "https://raw.githubusercontent.com/osx-cross/homebrew-avr/d2e2566b06b90355952ed996707a0a1a24673cd3/Patch/avr-libc-add-mcu-atmega168pb.patch"
sha256 "7a2bf2e11cfd9335e8e143eecb94480b4871e8e1ac54392c2ee2d89010b43711"
end
end
url "https://github.com/avrdudes/avr-libc/releases/download/avr-libc-2_2_1-release/avr-libc-2.2.1.tar.bz2"
sha256 "006a6306cbbc938c3bdb583ac54f93fe7d7c8cf97f9cde91f91c6fb0273ab465"
end

# Branch from the Darwin maintainer of GCC, with a few generic fixes and
Expand All @@ -82,7 +62,7 @@
end
end

def install

Check warning on line 65 in Formula/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (macos-15)

`brew install --verbose --formula --build-bottle osx-cross/avr/avr-gcc@11` failed on macOS Sequoia (15) on Apple Silicon!

yes checking whether clang supports -Wall... clang++ -std=gnu++11 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/gengtype \ build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o build/gengtype-state.o build/version.o ../build-aarch64-apple-darwin24.5.0/libiberty/libiberty.a yes build/gengenrtl > tmp-genrtl.h clang++: error: unsupported option '-print-multi-os-directory' checking for socket libraries... checking for connect... /bin/sh ../../gcc/../move-if-change tmp-genrtl.h genrtl.h echo timestamp > s-genrtl-h build/genmodes -m > tmp-min-modes.c /bin/sh ../../gcc/../move-if-change tmp-min-modes.c min-insn-modes.c echo timestamp > s-modes-m build/genhooks "Target Hook" \ > tmp-target-hooks-def.h /bin/sh ../../gcc/../move-if-change tmp-target-hooks-def.h \ target-hooks-def.h yes checking for gethostbyname... echo timestamp > s-target-hooks-def-h build/genhooks "Common Target Hook" \ > tmp-common-target-hooks-def.h /bin/sh ../../gcc/../move-if-change tmp-common-target-hooks-def.h \ common/common-target-hooks-def.h echo timestamp > s-common-target-hooks-def-h build/genhooks "C Target Hook" \ > tmp-c-target-hooks-def.h /bin/sh ../../gcc/../move-if-change tmp-c-target-hooks-def.h \ c-family/c-target-hooks-def.h echo timestamp > s-c-target-hooks-def-h build/genhooks "D Target Hook" \ > tmp-d-target-hooks-def.h /bin/sh ../../gcc/../move-if-change tmp-d-target-hooks-def.h \ d/d-target-hooks-def.h echo timestamp > s-d-target-hooks-def-h build/genmodes > tmp-modes.c yes checking for exported symbols... /bin/sh ../../gcc/../move-if-change tmp-modes.c insn-modes.c echo timestamp > s-modes cp doc/gcc.1 doc/g++.1 build/genmodes -h > tmp-modes.h /bin/sh ../../gcc/../move-if-change tmp-modes.h insn-modes.h echo timestamp > s-modes-h build/genmodes -i > tmp-modes-inline.h /bin/sh ../../gcc/../move-if-change tmp-modes-inline.h \ insn-modes-inline.h yes checking for library containing dlopen... echo timestamp > s-modes-inline-h build/gengtype \ -S ../../gcc -I gtyp-input.list -w tmp-gtype.state none required checking for -fPIC -shared... yes checking for socketpair... yes checking for select... /bin/sh ../../gcc/../move-if-change tmp-gtype.state gtype.state build/gengtype \ -r gtype.state yes checking for fork... echo timestamp > s-gtype yes configure: updating cache ./config.cache checking that generated files are newer than configure... done configure: creating ./config.status clang++ -std=gnu++11 -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include \ -o build/genconstants.o ../../gcc/genconstants.c clang++ -std=gnu++11 -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include \ -o build/ggc-none.o ../../gcc/ggc-none.c clang++ -std=gnu++11 -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-r

Check warning on line 65 in Formula/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

`brew install --verbose --formula --build-bottle osx-cross/avr/avr-gcc@11` failed on macOS Sonoma (14) on Apple Silicon!

checking whether basename is declared... no checking whether clang supports -W... yes checking whether clang supports -Wall... clang++ -std=gnu++11 -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include \ -o build/gengtype-lex.o ../../gcc/gengtype-lex.c yes clang: error: unsupported option '-print-multi-os-directory' checking for socket libraries... checking for connect... clang++ -std=gnu++11 -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include \ -o build/gengtype-parse.o ../../gcc/gengtype-parse.c yes checking for gethostbyname... yes checking for exported symbols... clang++ -std=gnu++11 -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include \ -o build/gengtype-state.o ../../gcc/gengtype-state.c yes checking for library containing dlopen... none required checking for -fPIC -shared... awk -f ../../gcc/opt-functions.awk -f ../../gcc/opt-read.awk \ -f ../../gcc/opth-gen.awk \ < optionlist > tmp-options.h yes checking for socketpair... /bin/sh ../../gcc/../move-if-change tmp-options.h options.h echo timestamp > s-options-h clang++ -std=gnu++11 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/gengenrtl \ build/gengenrtl.o build/errors.o ../build-aarch64-apple-darwin23.6.0/libiberty/libiberty.a yes checking for select... clang++ -std=gnu++11 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genhooks \ build/genhooks.o build/errors.o ../build-aarch64-apple-darwin23.6.0/libiberty/libiberty.a yes checking for fork... clang++ -std=gnu++11 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genchecksum \ build/genchecksum.o ../build-aarch64-apple-darwin23.6.0/libiberty/libiberty.a echo timestamp > doc/gcc.1 (pod2man --center="GNU" --release="gcc-11.3.0" --date=2022-04-21 --section=1 gcc.pod > doc/gcc.1.T$$ && \ mv -f doc/gcc.1.T$$ doc/gcc.1) || \ (rm -f doc/gcc.1.T$$ && exit 1) yes configure: updating cache ./config.cache checking that generated files
# GCC will suffer build errors if forced to use a particular linker.
ENV.delete "LD"

Expand Down Expand Up @@ -138,8 +118,6 @@
rm_r(info)
rm_r(man7)

current_build = build

resource("avr-libc").stage do
ENV.prepend_path "PATH", bin

Expand All @@ -156,7 +134,6 @@
puts "Forcing build system to aarch64-apple-darwin."
end

system "./bootstrap" if current_build.with? "ATMega168pbSupport"
system "./configure", "--prefix=#{prefix}", "--host=avr"
system "make", "install"
end
Expand Down
Loading