diff options
author | vanilla <vanilla@FreeBSD.org> | 2011-12-25 23:33:41 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2011-12-25 23:33:41 +0800 |
commit | 1560449e1a15b0ad8b57064b6ea030ae16f457af (patch) | |
tree | bce82ecb2178c5236789b28925ce4652d6a785cc /lang | |
parent | 7d5f19982508a5b33ae7f75341d60bb44598afa3 (diff) | |
download | freebsd-ports-gnome-1560449e1a15b0ad8b57064b6ea030ae16f457af.tar.gz freebsd-ports-gnome-1560449e1a15b0ad8b57064b6ea030ae16f457af.tar.zst freebsd-ports-gnome-1560449e1a15b0ad8b57064b6ea030ae16f457af.zip |
1: Upgrade to 3.8.2.
2: handle '-fno-strict-aliasing'.
PR: ports/163606
Submitted by: Panagiotis Christias <p.christias at noc.ntua.gr> [2]
Diffstat (limited to 'lang')
-rw-r--r-- | lang/v8/Makefile | 10 | ||||
-rw-r--r-- | lang/v8/distinfo | 4 | ||||
-rw-r--r-- | lang/v8/files/patch-SConstruct | 6 | ||||
-rw-r--r-- | lang/v8/files/patch-platform-freebsd.cc | 136 |
4 files changed, 14 insertions, 142 deletions
diff --git a/lang/v8/Makefile b/lang/v8/Makefile index f521978ed454..c4c77ce317f0 100644 --- a/lang/v8/Makefile +++ b/lang/v8/Makefile @@ -6,7 +6,7 @@ # PORTNAME= v8 -PORTVERSION= 3.7.3 +PORTVERSION= 3.8.2 PORTREVISION= 0 CATEGORIES= lang MASTER_SITES= LOCAL/vanilla @@ -48,6 +48,14 @@ V8ARCH=ia32 .elif ${ARCH} == amd64 V8ARCH=x64 .endif + +.if defined(CFLAGS) +CFLAGS:= ${CFLAGS:C/-fstrict-aliasing//} +.if empty(CFLAGS:M-fno-strict-aliasing) +CFLAGS+= -fno-strict-aliasing +.endif +.endif + PLIST_SUB+= ARCH=${V8ARCH} SCONS_ARGS+= arch=${V8ARCH} SCONS_BUILDENV+= CC="${CC} ${CFLAGS}" CXX="${CXX} ${CXXFLAGS}" diff --git a/lang/v8/distinfo b/lang/v8/distinfo index 973bc9cbdcce..af567d840b31 100644 --- a/lang/v8/distinfo +++ b/lang/v8/distinfo @@ -1,2 +1,2 @@ -SHA256 (v8-3.7.3.tar.xz) = ee993686d9c1e71f9c1adbe42d3e8ccb374f6d8f2e91c6378ce0ee880ff327fe -SIZE (v8-3.7.3.tar.xz) = 7921496 +SHA256 (v8-3.8.2.tar.xz) = 6afdb5e93d61f932cce8726d2012a7e447e9f34d4e80f62375056eb54179cf8e +SIZE (v8-3.8.2.tar.xz) = 7958544 diff --git a/lang/v8/files/patch-SConstruct b/lang/v8/files/patch-SConstruct index 9c6c172c0bed..b05b63675d67 100644 --- a/lang/v8/files/patch-SConstruct +++ b/lang/v8/files/patch-SConstruct @@ -1,6 +1,6 @@ ---- SConstruct.orig 2011-06-01 14:00:58.000000000 +0800 -+++ SConstruct 2011-06-16 09:56:00.000000000 +0800 -@@ -120,10 +120,10 @@ LIBRARY_FLAGS = { +--- SConstruct.orig 2011-12-22 10:08:53.000000000 +0800 ++++ SConstruct 2011-12-25 22:54:25.000000000 +0800 +@@ -111,10 +111,10 @@ LIBRARY_FLAGS = { } }, 'os:freebsd': { diff --git a/lang/v8/files/patch-platform-freebsd.cc b/lang/v8/files/patch-platform-freebsd.cc deleted file mode 100644 index 620e137cb944..000000000000 --- a/lang/v8/files/patch-platform-freebsd.cc +++ /dev/null @@ -1,136 +0,0 @@ ---- src/platform-freebsd.cc.orig 2011-10-25 19:44:21.000000000 +0800 -+++ src/platform-freebsd.cc 2011-10-25 20:08:08.000000000 +0800 -@@ -333,32 +333,96 @@ int OS::StackWalk(Vector<OS::StackFrame> - static const int kMmapFd = -1; - static const int kMmapFdOffset = 0; - -+VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } -+ -+ -+VirtualMemory::VirtualMemory(size_t size) -+ : address_(ReserveRegion(size)), size_(size) { } - --VirtualMemory::VirtualMemory(size_t size) { -- address_ = mmap(NULL, size, PROT_NONE, -- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -- kMmapFd, kMmapFdOffset); -- size_ = size; --} - -+VirtualMemory::VirtualMemory(size_t size, size_t alignment) -+ : address_(NULL), size_(0) { -+ ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment()))); -+ size_t request_size = RoundUp(size + alignment, -+ static_cast<intptr_t>(OS::AllocateAlignment())); -+ void* reservation = mmap(OS::GetRandomMmapAddr(), -+ request_size, -+ PROT_NONE, -+ MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -+ kMmapFd, -+ kMmapFdOffset); -+ if (reservation == MAP_FAILED) return; -+ -+ Address base = static_cast<Address>(reservation); -+ Address aligned_base = RoundUp(base, alignment); -+ ASSERT_LE(base, aligned_base); -+ -+ // Unmap extra memory reserved before and after the desired block. -+ if (aligned_base != base) { -+ size_t prefix_size = static_cast<size_t>(aligned_base - base); -+ OS::Free(base, prefix_size); -+ request_size -= prefix_size; -+ } -+ -+ size_t aligned_size = RoundUp(size, OS::AllocateAlignment()); -+ ASSERT_LE(aligned_size, request_size); -+ -+ if (aligned_size != request_size) { -+ size_t suffix_size = request_size - aligned_size; -+ OS::Free(aligned_base + aligned_size, suffix_size); -+ request_size -= suffix_size; -+ } -+ -+ ASSERT(aligned_size == request_size); -+ -+ address_ = static_cast<void*>(aligned_base); -+ size_ = aligned_size; -+} - - VirtualMemory::~VirtualMemory() { - if (IsReserved()) { -- if (0 == munmap(address(), size())) address_ = MAP_FAILED; -+ bool result = ReleaseRegion(address(), size()); -+ ASSERT(result); -+ USE(result); - } - } - -+void VirtualMemory::Reset() { -+ address_ = NULL; -+ size_ = 0; -+} -+ -+void* VirtualMemory::ReserveRegion(size_t size) { -+ void* result = mmap(OS::GetRandomMmapAddr(), -+ size, -+ PROT_NONE, -+ MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -+ kMmapFd, -+ kMmapFdOffset); -+ -+ if (result == MAP_FAILED) return NULL; -+ -+ return result; -+} - - bool VirtualMemory::IsReserved() { - return address_ != MAP_FAILED; - } - -+bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { -+ return CommitRegion(address, size, is_executable); -+} - --bool VirtualMemory::Commit(void* address, size_t size, bool executable) { -- int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0); -- if (MAP_FAILED == mmap(address, size, prot, -+bool VirtualMemory::CommitRegion(void* address, -+ size_t size, -+ bool is_executable) { -+ int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0); -+ if (MAP_FAILED == mmap(address, -+ size, -+ prot, - MAP_PRIVATE | MAP_ANON | MAP_FIXED, -- kMmapFd, kMmapFdOffset)) { -+ kMmapFd, -+ kMmapFdOffset)) { - return false; - } - -@@ -366,13 +430,22 @@ bool VirtualMemory::Commit(void* address - return true; - } - -- - bool VirtualMemory::Uncommit(void* address, size_t size) { -- return mmap(address, size, PROT_NONE, -+ return UncommitRegion(address, size); -+} -+ -+bool VirtualMemory::UncommitRegion(void* address, size_t size) { -+ return mmap(address, -+ size, -+ PROT_NONE, - MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, -- kMmapFd, kMmapFdOffset) != MAP_FAILED; -+ kMmapFd, -+ kMmapFdOffset) != MAP_FAILED; - } - -+bool VirtualMemory::ReleaseRegion(void* address, size_t size) { -+ return munmap(address, size) == 0; -+} - - class Thread::PlatformData : public Malloced { - public: |