Skip to content

Commit

Permalink
bg
Browse files Browse the repository at this point in the history
  • Loading branch information
paperchalice committed May 31, 2024
1 parent 84cd603 commit 4cd2100
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions Formula/gcc/bootstrap-gcc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
class BootstrapGcc < Formula
desc "GNU compiler collection"
homepage "https://gcc.gnu.org/"
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" }

keg_only "bootstrap formula"

depends_on "arm64-apple-darwin-gcc"
depends_on "doxygen" => :build

Check failure on line 11 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "doxygen" (line 11) should be put before dependency "arm64-apple-darwin-gcc" (line 10)
depends_on "gettext" => :build

Check failure on line 12 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "gettext" (line 12) should be put before dependency "arm64-apple-darwin-gcc" (line 10)
depends_on "make" => :build

Check failure on line 13 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "make" (line 13) should be put before dependency "arm64-apple-darwin-gcc" (line 10)
depends_on "python" => :build

Check failure on line 14 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "python" (line 14) should be put before dependency "arm64-apple-darwin-gcc" (line 10)
depends_on "rust" => :build

Check failure on line 15 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "rust" (line 15) should be put before dependency "arm64-apple-darwin-gcc" (line 10)
depends_on "texinfo" => :build

Check failure on line 16 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "texinfo" (line 16) should be put before dependency "arm64-apple-darwin-gcc" (line 10)
depends_on xcode: :build

Check failure on line 17 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

FormulaAudit/DependencyOrder: dependency "xcode" (line 17) should be put before dependency "arm64-apple-darwin-gcc" (line 10)

# 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

# GCC bootstraps itself, so it is OK to have an incompatible C++ stdlib
cxxstdlib_check :skip

resource "isl" do
url "https://libisl.sourceforge.io/isl-0.26.tar.xz"
sha256 "a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504"
end

resource "mpc" do
url "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
sha256 "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8"
end

resource "mpfr" do
url "https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz"
sha256 "277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2"
end

resource "gmp" do
url "https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
sha256 "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898"
end

resource "gettext" do
url "https://ftp.gnu.org/gnu/gettext/gettext-0.22.5.tar.gz"
sha256 "ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0"
end

patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/82b5c1cd38826ab67ac7fc498a8fe74376a40f4a/gcc/gcc-14.1.0.diff"
sha256 "1529cff128792fe197ede301a81b02036c8168cb0338df21e4bc7aafe755305a"
end

def install

Check failure on line 56 in Formula/gcc/bootstrap-gcc.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew install --verbose --formula --build-bottle paperchalice/private/bootstrap-gcc` failed on macOS Ventura (13)!

"" \ "" \ "" \ "" \ "no" \ > tmp-mlib.h; \ else \ /bin/sh ../../gcc/genmultilib '' '' '' '' '' '' '' '' \ "" '' no \ > tmp-mlib.h; \ fi checking for suffix of executables... awk -f ../../gcc/config/aarch64/check-sve-md.awk \ ../../gcc/config/aarch64/aarch64-sve2.md awk -f ../../gcc/config/aarch64/check-sve-md.awk \ ../../gcc/config/aarch64/aarch64-sme.md echo timestamp > s-check-sve-md lsf="../../gcc/ada/gcc-interface/lang-specs.h ../../gcc/cp/lang-specs.h ../../gcc/d/lang-specs.h ../../gcc/lto/lang-specs.h"; for f in $lsf; do \ echo "#include \"$f\""; \ done | sed 's|../../gcc/||' > tmp-specs.h /bin/sh ../../gcc/../move-if-change tmp-specs.h specs.h echo timestamp > s-specs awk -f ../../gcc/gen-pass-instances.awk \ ../../gcc/passes.def ../../gcc/config/aarch64/aarch64-passes.def > pass-instances.def /bin/sh ../../gcc/../move-if-change tmp-mlib.h multilib.h echo timestamp > s-mlib TARGET_CPU_DEFAULT="" \ HEADERS="" DEFINES="" \ /bin/sh ../../gcc/mkconfig.sh tm_rust.h rm -f tmp-omp-device-properties.h; \ for kind in kind arch isa; do \ echo 'const char omp_offload_device_'${kind}'[] = ' \ >> tmp-omp-device-properties.h; \ for prop in none ; do \ [ "$prop" = "none" ] && continue; \ tgt=`echo "$prop" | sed 's/=.*$//'`; \ props=`echo "$prop" | sed 's/.*=//'`; \ echo "\"$tgt\\0\"" >> tmp-omp-device-properties.h; \ sed -n 's/^'${kind}': //p' ${props} \ | sed 's/[[:blank:]]/ /g;s/ */ /g;s/^ //;s/ $//;s/ /\\0/g;s/^/"/;s/$/\\0\\0"/' \ >> tmp-omp-device-properties.h; \ done; \ echo '"";' >> tmp-omp-device-properties.h; \ done; \ /bin/sh ../../gcc/../move-if-change tmp-omp-device-properties.h \ omp-device-properties.h echo "arm64-apple-darwin22-g++ -pie -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -pie -static-libstdc++ -static-libgcc " > checksum-options.tmp \ && ../../gcc/../move-if-change checksum-options.tmp checksum-options echo timestamp > s-omp-device-properties-h /bin/sh ../../gcc/config/aarch64/geniterators.sh \ ../../gcc/config/aarch64/iterators.md > \ aarch64-builtin-iterators.h mkdir -p ada/gen_il cd ada/gen_il; gnatmake -q -g -gnata -gnat2012 -gnatw.g -gnatyg -gnatU -I/Users/runner/work/homebrew-private/build_farm/bootstrap-gcc-20240531-14815-dnm9wh/gcc-14.1.0/gcc/ada gen_il-main /bin/sh: gnatmake: command not found gmake[2]: *** [../../gcc/ada/Make-generated.in:21: ada/stamp-gen_il] Error 127 gmake[2]: *** Waiting for unfinished jobs.... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm64-apple-darwin22-gcc accepts -g... yes checking for arm64-apple-darwin22-gcc option to accept ISO C89... none needed checking whether arm64-apple-darwin22-gcc understands -c and -o together... rm: conftest.dSYM: is a directory yes checking how to run the C preprocessor... arm64-apple-darwin22-gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm64-apple-darwin22-strip... arm64-appl
ENV.delete "CC"
ENV.delete "CXX"
ENV.delete "LD"

inreplace "libgcc/config/t-darwin-min-5", "10.5", "11.7"

triple = "#{Hardware::CPU.arch}-apple-darwin#{OS.kernel_version.major}"
target = "arm64-apple-darwin#{OS.kernel_version.major}"
languages = %w[ada c c++ d]
sr = MacOS.sdk_path.to_str.tr "0-9", ""

configure_args = %W[
--build=#{triple}
--host=#{target}
--target=#{target}
--prefix=#{prefix}
--with-as=/usr/bin/as
--with-ld=/usr/bin/ld
--with-dsymutil=/usr/bin/dsymutil
--disable-bootstrap
--disable-multilib
--enable-checking=release
--enable-languages=#{languages.join(",")}
--with-gcc-major-version-only
--with-sysroot=#{sr}
--without-zstd
]

resources.each { |r| r.stage buildpath/r.name }
mkdir "build" do
system "../configure", *configure_args
system "gmake"
system "gmake", "install", "-j", "1"
end
rm_rf man3/"stdheader.dSYM"
[info, man1, man3, man7].each { |d| Utils::Gzip.compress(*Dir[d/"*"]) }
end

test do
system "echo"
end
end

0 comments on commit 4cd2100

Please sign in to comment.