Ticket #6905: patch-mozjs-configure.diff

File patch-mozjs-configure.diff, 1.4 KB (added by Thomas Nyman, 3 months ago)

Patch to libraries/source/spidermonkey/patch.sh that fixes the flags passed to ld64 during the check for linker

  • new file libraries/source/spidermonkey/FixClang15Build.diff

    diff --git a/libraries/source/spidermonkey/FixClang15Build.diff b/libraries/source/spidermonkey/FixClang15Build.diff
    new file mode 100644
    index 0000000000..3c4ef84f55
    - +  
     1--- a/build/moz.configure/toolchain.configure   2022-10-15 11:52:58
     2+++ b/build/moz.configure/toolchain.configure   2024-02-28 19:23:05
     3@@ -2107,7 +2107,7 @@
     4         die("Unsupported linker " + linker)
     5 
     6     # Check the kind of linker
     7-    version_check = ["-Wl,--version"]
     8+    version_check = ["-Wl,-ld_classic,--version"]
     9     cmd_base = c_compiler.wrapper + [c_compiler.compiler] + c_compiler.flags
     10 
     11     def try_linker(linker):
  • libraries/source/spidermonkey/patch.sh

    diff --git a/libraries/source/spidermonkey/patch.sh b/libraries/source/spidermonkey/patch.sh
    index 876f5de284..20c1cd3d60 100644
    a b then  
    3131    pip3 install --upgrade -t virtualenv virtualenv
    3232    export PYTHONPATH="$(pwd)/virtualenv:$PYTHONPATH"
    3333    patch -p1 < ../FixVirtualEnv.diff
     34
     35    # The toolchain configuration script does not correctly detect ld64 as the
     36    # linker in MacOS 14 / Xcode 15 as the -Wl,--version flag passed via Clang
     37    # is an unknown option. This patch fixes the checks for linker on MacOS.
     38    patch -p1 < ../FixClang15Build.diff
    3439fi
    3540
    3641if [ "$OS" = "Linux" ]