Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strap #616

Closed
wants to merge 1 commit into from
Closed

strap #616

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
25 changes: 18 additions & 7 deletions Formula/gcc/gcc-strap.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class GccStrap < Formula

Check failure on line 1 in Formula/gcc/gcc-strap.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew deps --tree --annotate --include-build --include-test paperchalice/private/gcc-strap` failed on macOS Ventura (13)!

paperchalice/private/gcc-strap ├── doxygen [build] │ ├── bison [build] │ └── cmake [build] ├── gcc-boot [build] │ ├── doxygen [build] │ │ ├── bison [build] │ │ └── cmake [build] │ ├── gcc-strap [build] (CIRCULAR DEPENDENCY) │ ├── gettext [build] │ ├── make [build] │ │ └── lzip [build] [test] [implicit] │ ├── python [build] │ │ ├── mpdecimal │ │ ├── openssl@3 │ │ │ └── ca-certificates │ │ ├── sqlite │ │ │ └── readline │ │ ├── xz │ │ └── pkg-config [build] │ ├── rust [build] │ │ ├── libgit2 │ │ │ ├── libssh2 │ │ │ │ └── openssl@3 │ │ │ │ └── ca-certificates │ │ │ ├── openssl@3 │ │ │ │ └── ca-certificates │ │ │ ├── cmake [build] │ │ │ └── pkg-config [build] │ │ ├── libssh2 │ │ │ └── openssl@3 │ │ │ └── ca-certificates │ │ ├── llvm │ │ │ ├── python@3.12 │ │ │ │ ├── mpdecimal │ │ │ │ ├── openssl@3 │ │ │ │ │ └── ca-certificates │ │ │ │ ├── sqlite │ │ │ │ │ └── readline │ │ │ │ ├── xz │ │ │ │ └── pkg-config [build] │ │ │ ├── xz │ │ │ ├── z3 │ │ │ │ ├── cmake [build] │ │ │ │ ├── python@3.12 [build] │ │ │ │ │ ├── mpdecimal │ │ │ │ │ ├── openssl@3 │ │ │ │ │ │ └── ca-certificates │ │ │ │ │ ├── sqlite │ │ │ │ │ │ └── readline │ │ │ │ │ ├── xz │ │ │ │ │ └── pkg-config [build] │ │ │ │ └── python@3.12 [test] │ │ │ │ ├── mpdecimal │ │ │ │ ├── openssl@3 │ │ │ │ │ └── ca-certificates │ │ │ │ ├── sqlite │ │ │ │ │ └── readline │ │ │ │ ├── xz │ │ │ │ └── pkg-config [build] │ │ │ ├── zstd │ │ │ │ ├── lz4 │ │ │ │ ├── xz │ │ │ │ └── cmake [build] │ │ │ ├── cmake [build] │ │ │ ├── ninja [build] │ │ │ └── swig [build] │ │ │ ├── pcre2 │ │ │ ├── python-setuptools [test] │ │ │ │ ├── python@3.12 [build] │ │ │ │ │ ├── mpdecimal │ │ │ │ │ ├── openssl@3 │ │ │ │ │ │ └── ca-certificates │ │ │ │ │ ├── sqlite │ │ │ │ │ │ └── readline │ │ │ │ │ ├── xz │ │ │ │ │ └── pkg-config [build] │ │ │ │ └── python@3.12 [test] │ │ │ │ ├── mpdecimal │ │ │ │ ├── openssl@3 │ │ │ │ │ └── ca-certificates │ │ │ │ ├── sqlite │ │ │ │ │ └── readline │ │ │ │ ├── xz │ │ │ │ └── pkg-config [build] │ │ │ └── python@3.12 [test] │ │ │ ├── mpdecimal │ │ │ ├── openssl@3 │ │ │ │ └── ca-certificates │ │ │ ├── sqlite │ │ │ │ └── readline │ │ │ ├── xz │ │ │ └── pkg-config [build] │ │ ├── openssl@3 │ │ │ └── ca-certificates │ │ └── pkg-config │ └── texinfo [build] ├── gettext [build] ├── make [build] │ └── lzip [build] [test] [implicit] ├── python [build] │ ├── mpdecimal │ ├── openssl@3 │ │ └── ca-certificates │ ├── sqlite │ │ └── readline │ ├── xz │ └── pkg-config [build] ├── rust [build] │ ├── libgit2 │ │ ├── libssh2 │ │ │ └── openssl@3 │ │ │ └── ca-certificates │ │ ├── openssl@3 │ │ │ └── ca-certificates │ │ ├── cmake [build] │ │ └── pkg-config [build] │ ├── libssh2 │ │ └── openssl@3 │ │ └── ca-certificates │ ├── llvm │ │ ├── python@3.12 │ │ │ ├── mpdecimal │ │ │ ├── openssl@3 │ │ │ │ └── ca-certificates │ │ │ ├── sqlite │ │ │ │ └── readline │ │ │ ├── xz │ │ │ └── pkg-config [build] │ │ ├── xz │ │ ├── z3 │ │ │ ├── cmake [build] │ │ │ ├── python@3.12 [build] │ │ │ │ ├── mpdecimal │
desc "GNU compiler collection"
homepage "https://gcc.gnu.org/"
url "https://ftp.gnu.org/gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz"
sha256 "e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da"
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" }

bottle do
Expand All @@ -17,6 +17,7 @@
depends_on "gettext" => :build
depends_on "make" => :build
depends_on "python" => :build
depends_on "rust" => :build
depends_on "texinfo" => :build

# The bottles are built on systems with the CLT installed, and do not work
Expand All @@ -32,22 +33,25 @@
ENV.delete "CXX"
ENV.delete "LD"

triple = "#{Hardware::CPU.arch}-apple-#{OS.kernel_name.downcase}"
languages = %w[ada c c++ d objc obj-c++ fortran jit lto m2]
inreplace "libgcc/config/t-darwin-min-5", "10.5", "11.7"

triple = "#{Hardware::CPU.arch}-apple-darwin#{OS.kernel_version.major}"
languages = %w[ada c c++ d objc obj-c++ fortran jit lto m2 rust]
sr = MacOS.sdk_path.to_str.tr "0-9", ""

configure_args = %W[
--build=#{triple}
--prefix=#{prefix}
--disable-bootstrap
--disable-multilib
--disable-bootstrap
--enable-checking=release
--enable-libphobos
--enable-languages=#{languages.join(",")}
--with-gcc-major-version-only
--with-sysroot=#{sr}
--with-arch=x86-64
--with-tune=generic
--without-zstd
]

system "./contrib/download_prerequisites"
Expand All @@ -64,8 +68,15 @@
end
rm_rf man3/"stdheader.dSYM"
[info, man1, man3, man7].each { |d| Utils::Gzip.compress(*Dir[d/"*"]) }
MachO::Tools.add_rpath "#{lib}/gcc/#{triple}/#{version.major}/adalib/#{shared_library "libgnarl"}",
"@loader_path"

gcc_s = (Formula["gcc-boot"].lib/shared_library("libgcc_s", "1.1")).to_s
gcc_ss = (lib/shared_library("libgcc_s", "1.1")).to_s
MachO::Tools.add_rpath "#{lib}/#{shared_library "libgcc_s", 1}", "@loader_path"
(Pathname.glob(lib/shared_library("*")) +
Pathname.glob(lib/"gcc/#{triple}/#{version.major}/adalib"/shared_library("*"))).each do |l|
d = MachO::Tools.dylibs l
MachO::Tools.change_install_name l.to_s, gcc_s, gcc_ss if d.include? gcc_s
end
end

test do
Expand Down
Loading