On Wed, 2016-08-31 at 14:36 -0500, Jeremy Linton wrote:
Mozjs185 is getting really old and unsupported. Newer versions
of the mozjs JSAPI are C++ based. Start the conversion to more recent
JSAPI's by updating pacrunner to use mozjs24 which is a common version
being used by a number of distributions. It also happens to be the first
C++ only version of JSAPI.
In file included from /usr/include/mozjs-24/jsapi.h:24:0,
/usr/include/mozjs-24/jspubtd.h:370:50: warning: offsetof within non-standard-layout type
‘js::PerThreadDataFriendFields::RuntimeDummy’ is undefined [-Winvalid-offsetof]
static const size_t RuntimeMainThreadOffset = offsetof(RuntimeDummy, mainThread);
Also, why call it 'mozjs.cpp' when the v8 one is call 'v8.cc'?
If you want to *rename* v8.cc to v8.cpp then I'll have no objection to
that, but please don't be inconsistent.
I'm sure how much the resulting comments in Makefile.am make sense if
you read the file rather than purely looking at the history. Your mozjs
comments come *above* the v8 one I'd already added, and it ends up
# similar to v8 if mozjs isn't enabled then
# try to avoid using g++ by building a library
# This is a bit funny because at first sight you would think that
# the #if MOZJS would keep the builtin_sources from affecting the automake
# choice of linker, but it doesn't.
# If we compile this into a v8.a library first, then autohell
# won't use g++ to link pacrunner. And thus won't end up linking
# against libstdc++ even in the builds where V8 is disabled.