Skip to content

Commit

Permalink
update syntax for empty noall_load on macOS
Browse files Browse the repository at this point in the history
fixes #82

Closes #84.

Signed-off-by: Dominique <[email protected]>
  • Loading branch information
dpo committed Jul 17, 2024
1 parent c119654 commit 307c93a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cutest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Cutest < Formula
homepage "https://github.com/ralna/CUTEst/wiki"
url "https://github.com/ralna/CUTEst/archive/refs/tags/v2.1.0.tar.gz"
sha256 "83557557a8c6b174e817116ddc056f4a321bc6651719b25925fff399e44b5997"
revision 2
revision 3

head "https://github.com/ralna/CUTEst.git"

Expand Down Expand Up @@ -71,21 +71,21 @@ def install
# Build shared libraries.
if OS.mac?
so = "dylib"
all_load = "-Wl,-all_load"
noall_load = ""
all_load = ["-Wl,-all_load"]
noall_load = []
extra = ["-Wl,-undefined", "-Wl,dynamic_lookup", "-headerpad_max_install_names"]
else
so = "so"
all_load = "-Wl,-whole-archive"
noall_load = "-Wl,-no-whole-archive"
all_load = ["-Wl,-whole-archive"]
noall_load = ["-Wl,-no-whole-archive"]
extra = []
end
compiler = "gfo"
precisions.each do |prec|
cd "objects/#{machine}.#{arch}.#{compiler}/#{prec}" do
Dir["*.a"].each do |l|
lname = File.basename(l, ".a") + "_#{prec}.#{so}"
system "gfortran", "-fPIC", "-shared", all_load, l, noall_load, "-o", lname, *extra
system "gfortran", "-fPIC", "-shared", *all_load, l, *noall_load, "-o", lname, *extra
end
end
end
Expand Down

0 comments on commit 307c93a

Please sign in to comment.