Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Feb 2015 01:04:44 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Rene Ladan <rene@FreeBSD.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, John Marino <marino@FreeBSD.org>, ports-committers@freebsd.org
Subject:   Re: svn commit: r378563 - in head/www/chromium: . files
Message-ID:  <pp9m-h9ib-wny@FreeBSD.org>
References:  <201502062228.t16MSqq8072725@svn.freebsd.org> <lhka-ipcv-wny@vfemail.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Jan Beich <jbeich@FreeBSD.org> writes:

>> ++#  elif __FreeBSD_version__ < 900031
>
> Have you made sure __FreeBSD_version__ is defined?

Also, __FreeBSD_version has no underscores at the end.

>
>> ++  return 0; /* ! */
>
> Maybe replace with
>
>     #include <sys/thr.h>
>     ...
>     long lwpid;
>     thr_self(&lwpid);
>     return static_cast<int>(lwpid);

Attached in a patch form. I haven't actually tested it builds.

Index: www/chromium/files/patch-v8__src__base__platform__platform-posix.cc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2D-- www/chromium/files/patch-v8__src__base__platform__platform-posix.cc	(=
revision 378569)
+++ www/chromium/files/patch-v8__src__base__platform__platform-posix.cc	(wo=
rking copy)
@@ -1,17 +1,36 @@
 --- v8/src/base/platform/platform-posix.cc.orig	2015-01-27 03:22:59.000000=
000 +0100
 +++ v8/src/base/platform/platform-posix.cc	2015-02-06 18:41:53.881294389 +=
0100
=2D@@ -259,6 +259,14 @@
+@@ -54,6 +54,14 @@
+ #include <sys/prctl.h>  // NOLINT, for prctl
+ #endif
+=20
++#if V8_OS_FREEBSD
++#include <osreldate.h>  // for __FreeBSD_version
++#endif
++
++#if V8_OS_NETBSD
++#include <lwp.h>        // for _lwp_self
++#endif
++
+ #if !V8_OS_NACL
+ #include <sys/syscall.h>
+ #endif
+@@ -259,6 +267,18 @@ int OS::GetCurrentThreadId() {
    return static_cast<int>(syscall(__NR_gettid));
  #elif V8_OS_ANDROID
    return static_cast<int>(gettid());
++#elif V8_OS_DRAGONFLYBSD || defined(__DragonFly__)
++  return static_cast<int>(lwp_gettid());
 +#elif V8_OS_FREEBSD
=2D+#  ifdef __DragonFly__
=2D+  return static_cast<int>(lwp_gettid());
=2D+#  elif __FreeBSD_version__ < 900031
=2D+  return 0; /* ! */
++#  if __FreeBSD_version < 900031
++  long lwpid;
++  thr_self(&lwpid);
++  return static_cast<int>(lwpid);
 +#  else
 +  return static_cast<int>(pthread_getthreadid_np());
 +#  endif
++#elif V8_OS_NETBSD
++  return static_cast<int>(_lwp_self());
  #else
    return static_cast<int>(pthread_self());
  #endif

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQF8BAEBCgBmBQJU1VacXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF
NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bI8AH/1WInGj9F++pCI1n6nxvW4oZ
Jn4uFirU2zg36YjjwsYC9aovcFAslPd2U/KQrWInZDOu194JcaGjVbo1rVhAZxO3
rbWd+n2FUPhsJjt+SBaUczbAPEtIgoGe3l7nliV1VpYpZmBYxk+j9vmAy4OiS+KX
0ixldMUqXc/J3NErHLzfFhfpZxt1CfVN7CuBSUU0/Vfh5UOjO7MxRrqD5i2fXXoC
23vGQs6wgoRN5oY0xf4ICuHN04to1NYZ7kSTaRo1WC5Y6/6TfAHeKGdRyCncHG5p
o3f4JXh+/9SON5KmpaxjLZHO8LyS6xxSfOgAkTdx79eTUnAKYXP0F6WROfwkL7A=
=xJj/
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?pp9m-h9ib-wny>