diff --git a/Formula/s/spidermonkey@115.rb b/Formula/s/spidermonkey@115.rb index 809001e2d7936..f847a103dbfe8 100644 --- a/Formula/s/spidermonkey@115.rb +++ b/Formula/s/spidermonkey@115.rb @@ -1,9 +1,9 @@ class SpidermonkeyAT115 < Formula desc "JavaScript-C Engine" homepage "https://spidermonkey.dev" - url "https://archive.mozilla.org/pub/firefox/releases/115.22.0esr/source/firefox-115.22.0esr.source.tar.xz" - version "115.22.0" - sha256 "f57b6507ab1db52183df2aadb1fd81d9f0108b185226d1bac6205b7d7d3005b3" + url "https://archive.mozilla.org/pub/firefox/releases/115.23.0esr/source/firefox-115.23.0esr.source.tar.xz" + version "115.23.0" + sha256 "55d8883e7df92559ec09312cf3f5d747120027b9e4cd161aadf44c9faad91ff7" license "MPL-2.0" # Spidermonkey versions use the same versions as Firefox, so we simply check @@ -55,6 +55,9 @@ class SpidermonkeyAT115 < Formula end end + # Fix to find linker on macos-15, abusing LD_PRINT_OPTIONS is not working + patch :DATA + def install # Workaround for ICU 76+ # Issue ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1927380 @@ -110,3 +113,27 @@ def install assert_equal "hello", shell_output("#{bin}/js#{version.major} #{path}").strip end end + +__END__ +diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure +index 3f91d71..0133a67 100644 +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -1783,7 +1783,16 @@ def select_linker_tmpl(host_or_target): + kind = "ld64" + + elif retcode != 0: +- return None ++ # macOS 15 fallback: try `-Wl,-v` if --version failed ++ if target.kernel == "Darwin": ++ fallback_cmd = cmd_base + linker_flag + ["-Wl,-v"] ++ retcode2, stdout2, stderr2 = get_cmd_output(*fallback_cmd, env=env) ++ if retcode2 == 0 and "@(#)PROGRAM:ld" in stderr2: ++ kind = "ld64" ++ else: ++ return None ++ else: ++ return None + + elif "mold" in stdout: + kind = "mold"