janet-lang / spork

Various Janet utility modules - the official "Contrib" library.
MIT License
117 stars 35 forks source link

Fix compilation on macOS #192

Closed pyrmont closed 1 month ago

pyrmont commented 1 month ago

As discussed in #191, cc.janet does not work correctly when compiling on macOS. This PR addresses these problems by:

  1. using -Wl,rpath, rather than -Wl,rpath=
  2. not using -Wl,-Bstatic and -Wl,-Bdynamic on macOS
  3. disabling -Wl,--start-group and -Wl,--end-group by default on macOS
  4. enabling dynamic lookup for undefined symbols on macOS

I'm using a vendored version of this file successfully to compile Janet libraries on macOS as part of Arnie. This fixes #191.

bakpakin commented 1 month ago

Thanks @pyrmont, LGTM!