`js78-config --libs` output is incorrect.
I modified my local copy by just copying the MOZ_JS_LIBS contents into the second-last line (the only line that uses it).
Also, the -std= bit does not actually work with the headers... -std=c++17 is now required, so if you're patching the config script, that should be fixed as well.
A commit in branch main references this bug:
Author: Steve Wills <swills@FreeBSD.org>
AuthorDate: 2021-08-29 00:12:38 +0000
Commit: Steve Wills <swills@FreeBSD.org>
CommitDate: 2021-08-29 00:13:34 +0000
lang/spidermonkey78: bug fixes
* fix js78-config --libs
* fix js::SharedArrayRawBufferRefs public API
Reported by: shurd
lang/spidermonkey78/Makefile | 2 +-
.../files/patch-js_public_StructuredClone.h (new) | 13 +++++++++++++
.../files/patch-js_src_build_js-config.in (new) | 18 ++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)
Fix committed, thanks for the report!