Skip to content
Open
Show file tree
Hide file tree
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 AvrGccAT12 < 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 "e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff"

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

head "https://gcc.gnu.org/git/gcc.git", branch: "master"

bottle do
root_url "https://github.com/osx-cross/homebrew-avr/releases/download/[email protected]_3"
sha256 arm64_sonoma: "ba0c8596203f126e5acb5795fe14180799b192920abd77c3c4f3962296e380dd"
sha256 ventura: "b87620c6e9d5fc0dc5b39e0ed0342e012b3a88a44c801c3be4ae11d918c4382f"
sha256 monterey: "484339713793087bd20767adb522fba3848423b3c407fd6ae8ae67e1afe63653"
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 Down Expand Up @@ -57,19 +47,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.1.0.tar.bz2"
mirror "https://download-mirror.savannah.gnu.org/releases/avr-libc/avr-libc-2.1.0.tar.bz2"
sha256 "0b84cee5c08b5d5cba67c36125e5aaa85251bc9accfba5773bfa87bc34b654e8"

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

def version_suffix
Expand All @@ -80,7 +60,7 @@
end
end

def install

Check warning on line 63 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@12` failed on macOS Sequoia (15) on Apple Silicon!

no checking whether clang supports -W... 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 -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/inchash.o ../../gcc/inchash.cc yes checking whether clang supports -Wall... 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 -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/genenums.o ../../gcc/genenums.cc yes checking for gethostbyname... 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 -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/genmddeps.o ../../gcc/genmddeps.cc 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 -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/read-md.o ../../gcc/read-md.cc yes checking for library containing dlopen... none required 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 -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.o ../../gcc/gengtype.cc checking for -fPIC -shared... yes checking for socketpair... yes checking for select... yes checking for fork... 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 -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.cc yes configure: updating cache ./config.cache checking that generated files are newer than configure... done configure: creating ./config.status 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 -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genconstants \ build/genconstants.o build/read-md.o build/errors.o ../build-aarch6

Check warning on line 63 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@12` failed on macOS Sonoma (14) on Apple Silicon!

no checking whether clang supports -W... 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 -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.cc yes checking whether clang supports -Wall... yes clang: error: unsupported option '-print-multi-os-directory' checking for socket libraries... checking for connect... yes checking for gethostbyname... 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 -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.cc yes checking for exported symbols... yes checking for library containing dlopen... awk -f ../../gcc/opt-functions.awk -f ../../gcc/opt-read.awk \ -f ../../gcc/opth-gen.awk \ < optionlist > tmp-options.h none required checking for -fPIC -shared... /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 -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 socketpair... 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 -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 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 -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-12.2.0" --date=2022-08-19 --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 checking for fork... yes configure: updating cache ./config.cache checking that generated files are newer than configure... done configure: creating ./config.status 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 -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \ build/genmodes.o build/errors.o ../build-aarch64-apple-darwin23.6.0/libiberty/libiberty.a config.status: creating Makefile clang++ -std=gnu++11 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-strict-alia
# GCC will suffer build errors if forced to use a particular linker.
ENV.delete "LD"

Expand Down Expand Up @@ -136,8 +116,6 @@
rm_r(info)
rm_r(man7)

current_build = build

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

Expand All @@ -154,7 +132,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
Loading