[csw-devel] SF.net SVN: gar:[17437] csw/mgar/pkg/v8/trunk
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sat Mar 17 22:14:24 CET 2012
Revision: 17437
http://gar.svn.sourceforge.net/gar/?rev=17437&view=rev
Author: wahwah
Date: 2012-03-17 21:14:23 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
Second take at building V8
Since the last time, the build system changed from scons to GYP. I decided to
have own SONAME versioning. Not sure if it's a great idea, but it'll work for
now. There are some failing unit tests, I'll investigate it at some point.
Modified Paths:
--------------
csw/mgar/pkg/v8/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/v8/trunk/files/0001-Link-with-librt-on-Solaris-by-default.patch
csw/mgar/pkg/v8/trunk/files/0002-Comment-out-unused-variables.patch
csw/mgar/pkg/v8/trunk/files/0003-Cast-to-wint_t-which-is-what-lc-expects.patch
Modified: csw/mgar/pkg/v8/trunk/Makefile
===================================================================
--- csw/mgar/pkg/v8/trunk/Makefile 2012-03-17 12:01:50 UTC (rev 17436)
+++ csw/mgar/pkg/v8/trunk/Makefile 2012-03-17 21:14:23 UTC (rev 17437)
@@ -3,10 +3,7 @@
# $Id$
NAME = v8
-VERSION = 3.6.0
-DASH_VERSION = 3-6-0
-UNDER_VERSION = 3_6_0
-# VERSION = bleeding_edge
+VERSION = 0.2012.03
DESCRIPTION = Open source JavaScript engine from Google
CATEGORIES = lib
GARTYPE = v2
@@ -20,63 +17,93 @@
NOCHECKSUM = bleeding_edge
DISTNAME = bleeding_edge
BUILD_DEP_PKGS = $(RUNTIME_DEP_PKGS)
-BUILD_DEP_PKGS += CSWscons
CONFIGURE_SCRIPTS =
BUILD_SCRIPTS = $(NAME)
INSTALL_SCRIPTS = $(NAME)
-TEST_SCRIPTS = $(NAME)
+TEST_SCRIPTS =
GARCOMPILER = GNU
SONAME_V = $(VERSION)
+NOGITPATCH = 1
+
PACKAGING_PLATFORMS = solaris10-i386
-PACKAGES += CSWlibv8-3-6-0
-CATALOGNAME_CSWlibv8-3-6-0 = libv8_3_6_0
-PKGFILES_CSWlibv8-3-6-0 += $(call baseisadirs,$(libdir),libv8-3\.6\.0\.so)
-PKGFILES_CSWlibv8-3-6-0 += $(call baseisadirs,$(libdir),libv8-3\.6\.0\.so(\.\d+)*)
-SPKG_DESC_CSWlibv8-3-6-0 += $(DESCRIPTION), libv8-3.6.0.so
+LICENSE = LICENSE
-PACKAGES += CSWlibv8-dev
-SPKG_DESC_CSWlibv8-dev += $(DESCRIPTION), development files
+# The V8 build system thinks we are on a 32-bit host and disallows a 64-bit
+# build.
+# BUILD64 = 1
-# 64-bit support via a special scons option; passing CFLAGS and CXXFLAGS does
-# not work here.
-SCONS_ARCH_isa-amd64 = arch=x64
-SCONS_ARCH += $(SCONS_ARCH_$(MODULATION))
+PATCHFILES += 0001-Link-with-librt-on-Solaris-by-default.patch
+PATCHFILES += 0002-Comment-out-unused-variables.patch
+PATCHFILES += 0003-Cast-to-wint_t-which-is-what-lc-expects.patch
-LICENSE = LICENSE
-
-BUILD64 = 1
-
-SCONS_ENV += CC=/opt/csw/gcc4/bin/gcc
-SCONS_ENV += CXX=/opt/csw/gcc4/bin/g++
-SCONS_ENV += RANLIB=/opt/csw/gcc4/bin/ranlib
+SCONS_ENV += CC=/opt/csw/bin/gcc
+SCONS_ENV += CXX=/opt/csw/bin/g++
+SCONS_ENV += RANLIB=/opt/csw/bin/ranlib
SCONS_ENV += LD=/opt/csw/bin/gld
SCONS_ENV += AR=/opt/csw/bin/gar
-SCONS_ENV += SHCXX=/opt/csw/gcc4/bin/g++
-SCONS_ENV += LINKFLAGS=-R/opt/csw/gcc4/lib
+SCONS_ENV += SHCXX=/opt/csw/bin/g++
+SCONS_ENV += LINKFLAGS=-R/opt/csw/lib
-SCONS_OPTS = visibility=default library=shared toolchain=gcc soname=on
+LINK = $(CXX)
+LD_ALTEXEC = /opt/csw/bin/gld
+EXTRA_BUILD_EXPORTS = LINK LD_ALTEXEC
+BUILD_OPTS += visibility=default
+BUILD_OPTS += library=shared
+BUILD_OPTS += toolchain=gcc
+BUILD_OPTS += soname=on
+BUILD_OPTS += soname_version=$(VERSION)
+
+GYPFLAGS = -D OS=solaris
+
+OBJDIR = $(abspath $(WORKDIR)/objdir)
+
+# 64-bit support via a special option; passing CFLAGS and CXXFLAGS does
+# not work here.
+# It would be better to use MEMORY_MODEL or something similar from GAR.
+V8_TARGET_isa-pentium_pro = ia32
+V8_TARGET_isa-amd64 = x64
+V8_TARGET = $(V8_TARGET_$(MODULATION))
+
+PACKAGES += CSWlibv8-dev
+SPKG_DESC_CSWlibv8-dev += $(DESCRIPTION), development files
+RUNTIME_DEP_PKGS_CSWlibv8-dev += CSWlibv8-0-2012-03
+
+PACKAGES += CSWlibv8-0-2012-03
+PKGFILES_CSWlibv8-0-2012-03 += $(call baseisadirs,$(libdir),libv8\.so\.0(\.\d+)*)
+SPKG_DESC_CSWlibv8-0-2012-03 += $(DESCRIPTION), the shared library
+RUNTIME_DEP_PKGS_CSWlibv8-0-2012-03 += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_CSWlibv8-0-2012-03 += CSWlibstdc++6
+
include gar/category.mk
+post-extract-modulated:
+ (cd $(WORKSRC); \
+ gmake dependencies; \
+ cd build/gyp; \
+ svn update; \
+ )
+ @$(MAKECOOKIE)
+
build-$(NAME):
- (cd $(WORKSRC); mkdir -p build-solaris; \
- cd build-solaris; \
- $(SCONS_ENV) \
- \
- scons \
- -Y .. \
- $(SCONS_ARCH) \
- $(SCONS_OPTS) \
- -j3 \
- )
+ (cd $(WORKSRC); \
+ $(BUILD_ENV) \
+ gmake \
+ $(PARALLELMFLAGS) \
+ $(BUILD_OPTS) \
+ $(V8_TARGET).release; \
+ )
@$(MAKECOOKIE)
install-$(NAME):
ginstall -d -m 755 $(DESTDIR)$(libdir)
- ginstall -m 755 $(WORKSRC)/build-solaris/lib$(NAME)-$(SONAME_V).so $(DESTDIR)$(libdir)
- ln -sf lib$(NAME)-$(SONAME_V).so $(DESTDIR)$(libdir)/lib$(NAME).so
+ # ginstall -m 755 $(WORKSRC)/build-solaris/lib$(NAME)-$(SONAME_V).so $(DESTDIR)$(libdir)
+ ginstall -m 755 \
+ $(WORKSRC)/out/$(V8_TARGET).release/obj.target/tools/gyp/lib$(NAME).so.$(SONAME_V) \
+ $(DESTDIR)$(libdir)
+ ln -sf lib$(NAME).so.$(SONAME_V) $(DESTDIR)$(libdir)/lib$(NAME).so
ginstall -d -m 755 $(DESTDIR)$(includedir)
for f in $(WORKSRC)/include/*.h; do \
ginstall -m 644 $${f} $(DESTDIR)$(includedir); \
@@ -84,15 +111,4 @@
tree $(DESTDIR)
@$(MAKECOOKIE)
-test-$(NAME):
- (cd $(WORKSRC)/build-solaris; \
- $(SCONS_ENV) scons -Y .. $(SCONS_OPTS) d8)
- (cd $(WORKSRC)/build-solaris; \
- $(SCONS_ENV) \
- ../tools/test.py \
- --shell=d8 \
- -S toolchain=gcc \
- -S library=shared \
- -S soname=on \
- -S visibility=default \
- )
+PATH := /opt/csw/gnu:$(PATH)
Added: csw/mgar/pkg/v8/trunk/files/0001-Link-with-librt-on-Solaris-by-default.patch
===================================================================
--- csw/mgar/pkg/v8/trunk/files/0001-Link-with-librt-on-Solaris-by-default.patch (rev 0)
+++ csw/mgar/pkg/v8/trunk/files/0001-Link-with-librt-on-Solaris-by-default.patch 2012-03-17 21:14:23 UTC (rev 17437)
@@ -0,0 +1,25 @@
+From 984e4cd19712fe343e5e89cf3178f7edf7cfde49 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Sat, 17 Mar 2012 16:14:05 +0100
+Subject: [PATCH 1/3] Link with librt on Solaris by default
+
+---
+ tools/gyp/v8.gyp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
+index 764789a..26044d4 100644
+--- a/tools/gyp/v8.gyp
++++ b/tools/gyp/v8.gyp
+@@ -712,7 +712,7 @@
+ ['OS=="solaris"', {
+ 'link_settings': {
+ 'libraries': [
+- '-lsocket -lnsl',
++ '-lsocket -lnsl -lrt',
+ ]},
+ 'sources': [
+ '../../src/platform-solaris.cc',
+--
+1.7.5.4
+
Added: csw/mgar/pkg/v8/trunk/files/0002-Comment-out-unused-variables.patch
===================================================================
--- csw/mgar/pkg/v8/trunk/files/0002-Comment-out-unused-variables.patch (rev 0)
+++ csw/mgar/pkg/v8/trunk/files/0002-Comment-out-unused-variables.patch 2012-03-17 21:14:23 UTC (rev 17437)
@@ -0,0 +1,32 @@
+From 75f5cb77a6c85eed7118a5fd2feafb97aa34ec2a Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Sat, 17 Mar 2012 16:14:33 +0100
+Subject: [PATCH 2/3] Comment out unused variables
+
+Otherwise the compilation breaks on them.
+---
+ src/platform-solaris.cc | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc
+index 50ad353..967d4b6 100644
+--- a/src/platform-solaris.cc
++++ b/src/platform-solaris.cc
+@@ -491,12 +491,12 @@ void Thread::set_name(const char* name) {
+
+
+ void Thread::Start() {
+- pthread_attr_t* attr_ptr = NULL;
++ // pthread_attr_t* attr_ptr = NULL;
+ pthread_attr_t attr;
+ if (stack_size_ > 0) {
+ pthread_attr_init(&attr);
+ pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_));
+- attr_ptr = &attr;
++ // attr_ptr = &attr;
+ }
+ pthread_create(&data_->thread_, NULL, ThreadEntry, this);
+ ASSERT(data_->thread_ != kNoThread);
+--
+1.7.5.4
+
Added: csw/mgar/pkg/v8/trunk/files/0003-Cast-to-wint_t-which-is-what-lc-expects.patch
===================================================================
--- csw/mgar/pkg/v8/trunk/files/0003-Cast-to-wint_t-which-is-what-lc-expects.patch (rev 0)
+++ csw/mgar/pkg/v8/trunk/files/0003-Cast-to-wint_t-which-is-what-lc-expects.patch 2012-03-17 21:14:23 UTC (rev 17437)
@@ -0,0 +1,25 @@
+From 4a75db1a8ceffd45248e773b1bbf062938446b60 Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Sat, 17 Mar 2012 16:15:13 +0100
+Subject: [PATCH 3/3] Cast to wint_t which is what %lc expects.
+
+---
+ test/cctest/test-compiler.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
+index 9ca0b0a..2345449 100644
+--- a/test/cctest/test-compiler.cc
++++ b/test/cctest/test-compiler.cc
+@@ -75,7 +75,7 @@ v8::Handle<v8::Value> PrintExtension::Print(const v8::Arguments& args) {
+ uint16_t* string = NewArray<uint16_t>(length + 1);
+ string_obj->Write(string);
+ for (int j = 0; j < length; j++)
+- printf("%lc", static_cast<wchar_t>(string[j]));
++ printf("%lc", static_cast<wint_t>(string[j]));
+ DeleteArray(string);
+ }
+ printf("\n");
+--
+1.7.5.4
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list