-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
gcc@13: add Modula 2 support #176192
gcc@13: add Modula 2 support #176192
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
class GccAT13 < Formula | ||
Check warning on line 1 in Formula/g/[email protected] GitHub Actions / macOS 14-x86_64`brew linkage --cached --test --strict gcc@13` failed on macOS Sonoma (14)!
Check warning on line 1 in Formula/g/[email protected] GitHub Actions / macOS 13-x86_64`brew linkage --cached --test --strict gcc@13` failed on macOS Ventura (13)!
Check warning on line 1 in Formula/g/[email protected] GitHub Actions / macOS 12-x86_64`brew linkage --cached --test --strict gcc@13` failed on macOS Monterey (12)!
|
||
desc "GNU compiler collection" | ||
homepage "https://gcc.gnu.org/" | ||
url "https://ftp.gnu.org/gnu/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz" | ||
mirror "https://ftpmirror.gnu.org/gcc/gcc-13.3.0/gcc-13.3.0.tar.xz" | ||
sha256 "0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083" | ||
license "GPL-3.0-or-later" => { with: "GCC-exception-3.1" } | ||
revision 1 | ||
|
||
livecheck do | ||
url :stable | ||
|
@@ -31,6 +32,8 @@ | |
depends_on "mpfr" | ||
depends_on "zstd" | ||
|
||
uses_from_macos "flex" => :build | ||
uses_from_macos "m4" => :build | ||
uses_from_macos "zlib" | ||
|
||
on_linux do | ||
|
@@ -55,7 +58,7 @@ | |
# - Ada and D, which require a pre-existing GCC to bootstrap | ||
# - Go, currently not supported on macOS | ||
# - BRIG | ||
languages = %w[c c++ objc obj-c++ fortran] | ||
languages = %w[c c++ objc obj-c++ fortran m2] | ||
|
||
pkgversion = "Homebrew GCC #{pkg_version} #{build.used_options*" "}".strip | ||
|
||
|
@@ -120,7 +123,8 @@ | |
# To make sure GCC does not record cellar paths, we configure it with | ||
# opt_prefix as the prefix. Then we use DESTDIR to install into a | ||
# temporary location, then move into the cellar path. | ||
system "make", install_target, "DESTDIR=#{Pathname.pwd}/../instdir" | ||
# Deparallelize for modula 2 as make install will block indefinitely. | ||
ENV.deparallelize { system "make", install_target, "DESTDIR=#{Pathname.pwd}/../instdir" } | ||
mv Dir[Pathname.pwd/"../instdir/#{opt_prefix}/*"], prefix | ||
end | ||
|
||
|
@@ -263,5 +267,18 @@ | |
EOS | ||
system "#{bin}/gfortran-#{version.major}", "-o", "test", "test.f90" | ||
assert_equal "Done\n", shell_output("./test") | ||
|
||
(testpath/"hello.mod").write <<~EOS | ||
MODULE hello; | ||
|
||
FROM InOut IMPORT WriteString, WriteLn; | ||
|
||
BEGIN | ||
WriteString("Hello, world!"); | ||
WriteLn; | ||
END hello. | ||
EOS | ||
system "#{bin}/gm2-#{version.major}", "-o", "hello-m2", "hello.mod" | ||
assert_equal "Hello, world!\n", shell_output("./hello-m2") | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been reported upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is pstree when
make install
is parallelizedThe call to
make
is stuck (the pid 06362 does not change over hours) and there is no progress reported in~/Library/Logs/Homebrew/gcc/03.make
. The probem is the ancientmake 3.81
in/Library/Developer/CommandLineTools/usr/bin/make
. Replacing it with the modernmake
from Homebrew makesmake install
run to completion.It's difficult to know which upstream to blame: gcc lists
make 3.80
as a minimal dependency. Are they to blame? There are lots of custom Makefile changes in the applied patchhttps://raw.githubusercontent.com/Homebrew/formula-patches/bda0faddfbfb392e7b9c9101056b2c5ab2500508/gcc/gcc-13.3.0.diff
- is it to blame for requiring a more recentmake
? My guess is Homebrew setting quite a few enviroment variables. Are they to blame for requiring a more recentmake
?