Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-05-27 18:29:55 +0400
committerRyan <ry@tinyclouds.org>2009-05-27 18:29:55 +0400
commita3627c06f8248b8c7a1580f2985f5b566fc12672 (patch)
treed8789d54c9ac3b8a8967e78cf89d2e1dfd9b6060
parent1d8c4659d16d68d81726ecb1a944f7908df4f65a (diff)
Change to build on FreeBSDv0.0.1
The v8/SConstruct change has been give to the v8 people. http://codereview.chromium.org/113897
-rw-r--r--deps/libeio/wscript7
-rw-r--r--deps/libev/wscript5
-rw-r--r--deps/v8/SConstruct22
-rw-r--r--wscript11
4 files changed, 25 insertions, 20 deletions
diff --git a/deps/libeio/wscript b/deps/libeio/wscript
index ef38b807fff..07afd24dea1 100644
--- a/deps/libeio/wscript
+++ b/deps/libeio/wscript
@@ -10,11 +10,6 @@ def configure(conf):
conf.check_cc(lib="pthread", header_name="pthread.h", function_name="pthread_create", mandatory=True)
- platform_string = "__" + Options.platform
- if Options.platform == "linux2":
- platform_string = "__linux"
- conf.define(platform_string, 1)
-
conf.check_cc(msg="Checking for futimes(2)", define_name="HAVE_FUTIMES", fragment="""
#include <sys/types.h>
#include <sys/time.h>
@@ -66,7 +61,7 @@ def configure(conf):
}
""")
- conf.check_cc(msg="Checking for sendfile(2)" , defines=[platform_string + "=1"] , define_name="HAVE_SENDFILE" , fragment="""
+ conf.check_cc(msg="Checking for sendfile(2)" , define_name="HAVE_SENDFILE" , fragment="""
# include <sys/types.h>
#if __linux
# include <sys/sendfile.h>
diff --git a/deps/libev/wscript b/deps/libev/wscript
index b713c0c4244..d3bbbd6d052 100644
--- a/deps/libev/wscript
+++ b/deps/libev/wscript
@@ -8,11 +8,6 @@ def configure(conf):
print "--- libev ---"
#conf.check_tool('compiler_cc')
- platform_string = "__" + Options.platform
- if Options.platform == "linux2":
- platform_string = "__linux"
- conf.define(platform_string, 1)
-
conf.check_cc(header_name="sys/inotify.h")
conf.check_cc(header_name="sys/epoll.h")
conf.check_cc(header_name="sys/event.h")
diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct
index 0c506790e80..a8929262992 100644
--- a/deps/v8/SConstruct
+++ b/deps/v8/SConstruct
@@ -43,6 +43,16 @@ ANDROID_TOP = os.environ.get('TOP')
if ANDROID_TOP is None:
ANDROID_TOP=""
+# TODO: Sort these issues out properly but as a temporary solution for gcc 4.4
+# on linux we need these compiler flags to avoid a mksnapshot segfault, avoid
+# crashes in the v8 test suite and avoid dtoa.c strict aliasing issues
+if os.environ.get('GCC_VERSION') == '44':
+ GCC_EXTRA_CCFLAGS = ['-fno-tree-vectorize', '-fno-tree-vrp']
+ GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing']
+else:
+ GCC_EXTRA_CCFLAGS = []
+ GCC_DTOA_EXTRA_CCFLAGS = []
+
ANDROID_FLAGS = ['-march=armv5te',
'-mtune=xscale',
'-msoft-float',
@@ -109,7 +119,7 @@ LIBRARY_FLAGS = {
}
},
'os:linux': {
- 'CCFLAGS': ['-ansi'],
+ 'CCFLAGS': ['-ansi'] + GCC_EXTRA_CCFLAGS,
'library:shared': {
'LIBS': ['pthread']
}
@@ -118,6 +128,8 @@ LIBRARY_FLAGS = {
'CCFLAGS': ['-ansi'],
},
'os:freebsd': {
+ 'CPPPATH' : ['/usr/local/include'],
+ 'LIBPATH' : ['/usr/local/lib'],
'CCFLAGS': ['-ansi'],
},
'os:win32': {
@@ -260,7 +272,7 @@ MKSNAPSHOT_EXTRA_FLAGS = {
'LIBS': ['pthread'],
},
'os:freebsd': {
- 'LIBS': ['pthread'],
+ 'LIBS': ['execinfo', 'pthread']
},
'os:win32': {
'LIBS': ['winmm', 'ws2_32'],
@@ -278,7 +290,8 @@ MKSNAPSHOT_EXTRA_FLAGS = {
DTOA_EXTRA_FLAGS = {
'gcc': {
'all': {
- 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized']
+ 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'],
+ 'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS
}
},
'msvc': {
@@ -371,6 +384,7 @@ SAMPLE_FLAGS = {
'LIBS': ['pthread'],
},
'os:freebsd': {
+ 'LIBPATH' : ['/usr/local/lib'],
'LIBS': ['execinfo', 'pthread']
},
'os:win32': {
@@ -671,8 +685,6 @@ def VerifyOptions(env):
Abort("Shared Object soname not applicable for Windows.")
if env['soname'] == 'on' and env['library'] == 'static':
Abort("Shared Object soname not applicable for static library.")
- if env['arch'] == 'x64' and env['os'] != 'linux':
- Abort("X64 compilation only allowed on Linux OS.")
for (name, option) in SIMPLE_OPTIONS.iteritems():
if (not option.get('default')) and (name not in ARGUMENTS):
message = ("A value for option %s must be specified (%s)." %
diff --git a/wscript b/wscript
index 5938bdcdbf9..090611f888e 100644
--- a/wscript
+++ b/wscript
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+# /usr/bin/env python
import Options
import sys
import os
@@ -31,6 +31,11 @@ def configure(conf):
conf.env["USE_DEBUG"] = Options.options.debug
+
+ if sys.platform.startswith("freebsd"):
+ if not conf.check(lib="execinfo", libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"):
+ fatal("install the libexecinfo port. devel/libexecinfo")
+
conf.sub_config('deps/libeio')
conf.sub_config('deps/libev')
@@ -43,8 +48,6 @@ def configure(conf):
conf.env.append_value("CCFLAGS", "-DEIO_STACKSIZE=%d" % (4096*8))
- #conf.check(lib='rt', uselib_store='RT')
-
conf.check(lib='profiler', uselib_store='PROFILER')
# Split off debug variant before adding variant specific defines
@@ -158,7 +161,7 @@ def build(bld):
deps/http_parser
"""
node.uselib_local = "oi ev eio http_parser"
- node.uselib = "V8 RT PROFILER"
+ node.uselib = "V8 EXECINFO PROFILER"
node.install_path = '${PREFIX}/bin'
node.chmod = 0755