Thanks for taking a look at this, more below./
On 09/08/2016 04:15 PM, David Woodhouse wrote:
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);
I believe this is a recent GCC warning complaining about a offsetof a
struct with a parent class, so its not strictly POD (at least that is
the way I read it). This is mozjs issue, not related to anything in
pacrunner, so there isn't any way for pacrunner to "fix" it outside of
suppressing the warning, which is probably valid in this case.
Should I still suppress it?
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.
Well the .cpp was more a reflection of mozjs's naming convention rather
than v8s, which I looked at only as part of the v2 link rework. I will
rename it to .cc.
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
<shrug> Since it came first I thought it might be best to clone your
comment for mozjs, but then I spent a few hours trying to figure out why
things conceptually missing from the build, were still affecting the
linker choice. I learned a few more things about automake I didn't
really want to know...
Rather than mess with your comment, i'm just going to drop the new one.
Is that ok?
# 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.