Opened 3 weeks ago

#6915 new enhancement

SpiderMonkey build on MacOS (14.4.1) Intel

Reported by: GeorgeVl Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Build & Packages Keywords:
Cc: Patch:

Description

Without getting into much detail to get my SpiderMonkey to build on my system I had to add to libraries/source/spidermonkey/build.sh the following:

👉 This should be fine for all platforms as the change is under Darwin

  # Unless we are forcing an architecture, switch between ARM / x86 based on platform.
  if [ -z "${ARCH}" ]; then
    if [ "$(uname -m)" == "arm64" ]
    then
      ARCH="aarch64"
    else
      ARCH="x86_64"
    fi
  fi
  CONF_OPTS="${CONF_OPTS} --target=$ARCH-apple-darwin --enable-linker=ld64"

and

👉 This should also be fine for other platforms but cannot be sure due to the version check switch. The catch for linker output I assume will work with 15.0.0 gcc output only

  # Prevent complaining that configure is outdated.
  touch ./js/src/configure

  sed -i '' 's/\["-Wl,--version"]/["-Wl","--version"]/g' build/moz.configure/toolchain.configure
  sed -i '' 's/if retcode == 1 and "Logging ld64 options" in stderr:/if retcode == 0 and "Apple clang version" in stdout:/g' build/moz.configure/toolchain.configure

In essence forcing ld64 linker and catching the correct linker output for ld64 in toolchain.configure

Change History (0)

Note: See TracTickets for help on using tickets.