You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

219 lines
7.5 KiB

Index: common.gypi
--- common.gypi.orig 2016-10-18 11:21:36.000000000 +0200
+++ common.gypi 2016-10-18 21:16:35.979404283 +0200
@@ -180,7 +180,7 @@
'ldflags': [ '-pthread' ],
}],
[ 'OS in "linux freebsd openbsd solaris android"', {
- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
+ 'cflags': [ '-Wno-unused-parameter', ],
'cflags_cc': [
'-fno-delete-null-pointer-checks',
'-fno-exceptions',
@@ -231,9 +231,6 @@
'-fno-strict-aliasing',
],
'WARNING_CFLAGS': [
- '-Wall',
- '-Wendif-labels',
- '-W',
'-Wno-unused-parameter',
],
},
Index: configure
--- configure.orig 2016-10-18 11:21:36.000000000 +0200
+++ configure 2016-10-18 21:14:51.579416505 +0200
@@ -666,9 +666,9 @@
if options.shared_v8_libpath:
o['libraries'] += ['-L%s' % options.shared_v8_libpath]
if options.shared_v8_libname:
- o['libraries'] += ['-l%s' % options.shared_v8_libname]
+ o['libraries'] += ['-l%s -lexecinfo' % options.shared_v8_libname]
elif options.shared_v8:
- o['libraries'] += ['-lv8']
+ o['libraries'] += ['-lv8 -lexecinfo']
if options.shared_v8_includes:
o['include_dirs'] += [options.shared_v8_includes]
Index: deps/v8/build/toolchain.gypi
--- deps/v8/build/toolchain.gypi.orig 2016-10-18 11:21:36.000000000 +0200
+++ deps/v8/build/toolchain.gypi 2016-10-18 21:14:51.579416505 +0200
@@ -538,12 +538,6 @@
['OS=="solaris"', {
'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
}],
- ['OS=="freebsd" or OS=="openbsd"', {
- 'cflags': [ '-I/usr/local/include' ],
- }],
- ['OS=="netbsd"', {
- 'cflags': [ '-I/usr/pkg/include' ],
- }],
], # conditions
'configurations': {
# Abstract configuration for v8_optimized_debug == 0.
Index: deps/v8/src/base/platform/platform-freebsd.cc
--- deps/v8/src/base/platform/platform-freebsd.cc.orig 2016-10-18 11:21:36.000000000 +0200
+++ deps/v8/src/base/platform/platform-freebsd.cc 2016-10-18 21:14:51.579416505 +0200
@@ -122,10 +122,10 @@
std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
- std::vector<SharedLibraryAddress> result;
+ std::vector<SharedLibraryAddress> resultv;
static const int MAP_LENGTH = 1024;
int fd = open("/proc/self/maps", O_RDONLY);
- if (fd < 0) return result;
+ if (fd < 0) return resultv;
while (true) {
char addr_buffer[11];
addr_buffer[0] = '0';
@@ -156,10 +156,10 @@
// There may be no filename in this line. Skip to next.
if (start_of_path == NULL) continue;
buffer[bytes_read] = 0;
- result.push_back(SharedLibraryAddress(start_of_path, start, end));
+ resultv.push_back(SharedLibraryAddress(start_of_path, start, end));
}
close(fd);
- return result;
+ return resultv;
}
@@ -188,7 +188,7 @@
void* reservation = mmap(OS::GetRandomMmapAddr(),
request_size,
PROT_NONE,
- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
+ MAP_PRIVATE | MAP_ANON,
kMmapFd,
kMmapFdOffset);
if (reservation == MAP_FAILED) return;
@@ -260,7 +260,7 @@
void* result = mmap(OS::GetRandomMmapAddr(),
size,
PROT_NONE,
- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
+ MAP_PRIVATE | MAP_ANON,
kMmapFd,
kMmapFdOffset);
@@ -288,7 +288,7 @@
return mmap(base,
size,
PROT_NONE,
- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED,
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED,
kMmapFd,
kMmapFdOffset) != MAP_FAILED;
}
Index: deps/v8/src/base/platform/platform-posix.cc
--- deps/v8/src/base/platform/platform-posix.cc.orig 2016-10-18 11:21:36.000000000 +0200
+++ deps/v8/src/base/platform/platform-posix.cc 2016-10-18 21:14:51.579416505 +0200
@@ -327,7 +327,7 @@
#elif V8_OS_ANDROID
return static_cast<int>(gettid());
#else
- return static_cast<int>(pthread_self());
+ return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self()));
#endif
}
Index: lib/dns.js
--- lib/dns.js.orig 2016-10-18 11:21:36.000000000 +0200
+++ lib/dns.js 2016-10-18 21:14:51.579416505 +0200
@@ -151,6 +151,10 @@
req.hostname = hostname;
req.oncomplete = onlookup;
+ /* FreeBSD getaddrinfo(3) knows AI_V4MAPPED, but dislikes it */
+ if (process.platform === "freebsd")
+ hints &= ~(exports.V4MAPPED);
+
var err = cares.getaddrinfo(req, hostname, family, hints);
if (err) {
callback(errnoException(err, 'getaddrinfo', hostname));
Index: lib/module.js
--- lib/module.js.orig 2016-10-18 11:21:36.000000000 +0200
+++ lib/module.js 2016-10-18 21:14:51.579416505 +0200
@@ -512,7 +512,10 @@
var homeDir = process.env.HOME;
}
- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
+ var paths = [
+ path.resolve(process.execPath, '..', '..', 'lib', 'node', 'usr', 'node_modules'),
+ path.resolve(process.execPath, '..', '..', 'lib', 'node', 'pkg', 'node_modules')
+ ];
if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
Index: src/node_internals.h
--- src/node_internals.h.orig 2016-10-18 11:21:36.000000000 +0200
+++ src/node_internals.h 2016-10-18 21:14:51.579416505 +0200
@@ -112,6 +112,8 @@
# define ROUND_UP(a, b) ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a))
#endif
+# undef MUST_USE_RESULT
+# undef NO_RETURN
#if defined(__GNUC__) && __GNUC__ >= 4
# define MUST_USE_RESULT __attribute__((warn_unused_result))
# define NO_RETURN __attribute__((noreturn))
Index: src/util.h
--- src/util.h.orig 2016-10-18 11:21:36.000000000 +0200
+++ src/util.h 2016-10-18 21:14:51.579416505 +0200
@@ -30,13 +30,17 @@
namespace node {
+#undef FIXED_ONE_BYTE_STRING
#define FIXED_ONE_BYTE_STRING(isolate, string) \
(node::OneByteString((isolate), (string), sizeof(string) - 1))
+#undef DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
void operator=(const TypeName&); \
TypeName(const TypeName&)
+#undef ASSERT
+#undef CHECK
#if defined(NDEBUG)
# define ASSERT(expression)
# define CHECK(expression) \
@@ -48,13 +52,20 @@
# define CHECK(expression) assert(expression)
#endif
+#undef CHECK_EQ
#define CHECK_EQ(a, b) CHECK((a) == (b))
+#undef CHECK_GE
#define CHECK_GE(a, b) CHECK((a) >= (b))
+#undef CHECK_GT
#define CHECK_GT(a, b) CHECK((a) > (b))
+#undef CHECK_LE
#define CHECK_LE(a, b) CHECK((a) <= (b))
+#undef CHECK_LT
#define CHECK_LT(a, b) CHECK((a) < (b))
+#undef CHECK_NE
#define CHECK_NE(a, b) CHECK((a) != (b))
+#undef UNREACHABLE
#define UNREACHABLE() abort()
// The helper is for doing safe downcasts from base types to derived types.
Index: tools/install.py
--- tools/install.py.orig 2016-10-18 11:21:36.000000000 +0200
+++ tools/install.py 2016-10-18 21:14:51.579416505 +0200
@@ -135,11 +135,6 @@
# behave similarly for systemtap
action(['src/node.stp'], 'share/systemtap/tapset/')
- if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
- action(['doc/node.1'], 'man/man1/')
- else:
- action(['doc/node.1'], 'share/man/man1/')
-
if 'true' == variables.get('node_install_npm'): npm_files(action)
headers(action)