0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

124 Commits

Author SHA1 Message Date
Andrei Sedoi
1d90b5b78e configure: allow V8 snapshot for cross-compilation
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-16 13:15:25 +04:00
Fedor Indutny
a030c7b902 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	src/node.cc
	src/node_crypto.cc
	src/node_crypto.h
2014-03-26 11:42:57 +04:00
Ben Noordhuis
7989f42f86 build: fix g++ 4.8 build, disable -Werror
Turn off -Werror when building V8, it hits -Werror=unused-local-typedefs
with g++ 4.8.  The warning itself is harmless so don't abort the build.

This was originally implemented in commit d2ab314e back in 2011 but the
build process has gone through a few iterations since then, that change
no longer works.
2014-03-23 16:11:08 -07:00
Timothy J Fontaine
e5eadcfa19 build: don't enable gc-sections
In some scenarios this will strip the DOF sections for DTrace, and in a
future world where we re-export all static libraries it would defeat
that purpose.
2014-02-17 20:29:30 -08:00
Timothy J Fontaine
c1b1f31203 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	lib/net.js
	node.gyp
	src/node_version.h
2014-01-24 19:13:50 -08:00
Fedor Indutny
25f9e92813 gyp: fix non-ninja build 2014-01-20 18:39:05 +04:00
Fedor Indutny
61c0d571bf gyp: fix ninja build on linux
fix #6679
2014-01-16 17:11:04 +00:00
Ben Noordhuis
f057c7049e build: unconditionally disable -Werror
Forcibly disable -Werror, the old { 'werror': '' } hack in node.gyp
no longer works with newer versions of V8.

We support a wide range of compilers, it's simply not feasible to
squelch all warnings, never mind that the libraries in deps/ are
not under our control.

Fixes #6817.
2014-01-07 23:35:04 +04:00
Ben Noordhuis
9e32a7daaa build: add libicu i18n support
Adds a --with-icu-path= switch to the configure script.  Requires that
the user checks out the copy of libicu that's bundled with chromium to
a fixed directory.  It's still a little rough around the edges but it
works.

Fixes #6371.
2013-12-05 16:15:21 -08:00
Timothy J Fontaine
001f9b46e7 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	src/stream_wrap.cc
2013-12-01 19:43:34 -08:00
Timothy J Fontaine
6877e64fa8 build: include postmortem symbols on linux
Previously we were building the symbols, but the linker was garbage
collecting the symbols because they weren't used. Inform the linker
that we want to keep all symbols from v8 around.
2013-12-01 18:57:43 -08:00
Bert Belder
6430c3f55d build: disable some msvc compiler warnings
These are not real problems, and they are so plenty that actual problems
are hidden from view.
2013-08-01 11:53:41 +02:00
Ben Noordhuis
0181fee411 build: don't enable --gc-sections on sunos
The SunOS linker doesn't support it. Fixes build breakage introduced
in commit 9b3de60.
2013-07-06 18:49:02 +02:00
Ben Noordhuis
9b3de60d35 build: remove --unsafe-optimizations flag
The previous commit removes our patch that builds V8 at -O2 rather
than -O3 so there is not much point in keeping the configure switch
around.

The reason it did so was to work around an assortment of compiler and
linker bugs. In particular, certain combinations of g++ and binutils
generate bad or no code when -ffunction-sections or -finline-functions
is enabled (which -O3 implicitly does.)

It was quite the problem back in the day because everyone and his dog
built from source. Now that we have prebuilt binaries and packages
available, there is no longer a pressing need to be so accommodating.

If you experience spurious (or possibly not so spurious) segmentation
faults after this commit, you need to upgrade your compiler/linker
toolchain.
2013-07-06 16:53:07 +02:00
Linus Mårtensson
5e4e8ec429 build: add android support
Resolves minor discrepancies between android and standard POSIX systems.
In addition, some configure parameters were added, and a helper-script
for android configuration. Ideally, this script should be merged into
the standard configure script.

To build for android, source the android-configure script with an NDK
path:

    source ./android-configure ~/android-ndk-r8d

This will create an android standalone toolchain and export the
necessary environment parameters.

After that, build as normal:

    make -j8

After the build, you should now have android-compatible NodeJS binaries.
2013-06-17 17:21:56 +02:00
Ben Noordhuis
b9655fc758 build: fix windows build, disable postmortem
Always define v8_postmortem_support, even if the platform does not
support it. Commit d8852aa adds a rule that references it in node.gyp.

Fixes the Windows build.
2013-04-04 02:00:56 +02:00
Bert Belder
c0a5af8d07 Revert "build, windows: disable SEH"
This is no longer necessary - the underlying issue was fixed in 01fa5ee.
This reverts commit d879042860.
2013-03-05 19:40:02 +01:00
Ben Noordhuis
cb87920ba9 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/src/unix/pipe.c
	lib/http.js
	src/node_version.h
2013-02-28 16:58:24 +01:00
Ben Noordhuis
d879042860 build, windows: disable SEH
Turn off safe exception handlers, they're incompatible with how
openssl is compiled / linked under MSVS 2012.

Addresses the following build error:

  openssl.lib(x86cpuid.obj) : error LNK2026: module unsafe for SAFESEH
  image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
  openssl.lib(x86.obj) : error LNK2026: module unsafe for SAFESEH
  image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
  # etc. etc.
  g:\jenkins\workspace\nodejs-oneoff\Release\node.exe : fatal error
  LNK1281: Unable to generate SAFESEH image.
  [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]

Fixes #4242.
2013-02-28 16:40:13 +01:00
Fedor Indutny
e2592cc6a3 gyp: fix build with dtrace support on FreeBSD
Fix undefined reference to `gelf_getsym`... and other undefined symbols
from libelf, by adding `-lelf` to linker options on FreeBSD.
2013-01-21 12:47:26 +04:00
Shigeki Ohtsu
11a5119e72 build: disable use of thin archive
Thin archive needs binutils >= 2.19, disable it for supporting old ar
even if static libraries are linked within a local build.
2012-11-21 14:06:37 +01:00
Ben Noordhuis
1e738c5ef2 build: make python executable configurable
Upstreamed in https://codereview.chromium.org/11418101/

Fixes #4287.
2012-11-20 22:47:45 +01:00
Timothy J Fontaine
0f3ddad0fc build: let xcode pick proper compiler 2012-11-06 00:18:36 +01:00
Ben Noordhuis
83e5e20c2c build: remove _LARGEFILE_SOURCE, _FILE_OFFSET_BITS
Don't define the _LARGEFILE_SOURCE and _FILE_OFFSET_BITS flags, they're
inherited from libuv now.
2012-11-04 01:26:30 +01:00
Ben Noordhuis
a6fef475ce build: make debug build on os x compile at -O0
Set GCC_OPTIMIZATION_LEVEL explicitly, otherwise GYP defaults to -Os.
2012-11-02 15:58:21 +01:00
Bert Belder
bf16d9280e Merge branch 'v0.8'
Conflicts:
	ChangeLog
	deps/openssl/openssl.gyp
	src/node_version.h
2012-08-28 02:54:22 +02:00
Ben Noordhuis
2786737417 build: compile with -fno-tree-sink if gcc <= 4.4
Fixes a 'pure virtual method called' run-time error with some versions of gcc
on some platforms, notably ARM.
2012-08-27 22:09:23 +02:00
Ben Noordhuis
84590f3fe9 build: fix -fno-tree-vrp heuristic
-fno-tree-vrp is a gcc only switch. Don't enable it when compiling with clang,
it will only complain about -fno-tree-vrp being ignored.
2012-08-27 22:09:01 +02:00
Ben Noordhuis
1867511400 build: compile with -Wextra -Wno-unused-parameter 2012-08-22 10:05:18 +02:00
Nathan Rajlich
be3a77bd42 build: don't use "-Wnewline-eof" on OS X
This is the only thing preventing a manually compiled version of GCC
(rather than Apple's provided llvm-gcc or heavily modified gcc 4.2)
from working properly, so we might as well enable support for that.

With this patch I was able to compile node using a manually compiled
gcc 4.7.1.

Closes #3887.
2012-08-20 08:18:14 -07:00
Ben Noordhuis
100e163dda build: compile with -fno-tree-vrp when gcc >= 4.0 2012-08-13 15:33:27 +02:00
Ben Noordhuis
b2648934f0 build: unbreak ustack on smartos
I disabled the -ffunction-sections and -fdata-sections switches in 202df30
because they're horribly buggy with some gcc/binutils combos.

However, it turns out that the dtrace/ustack post-processing tool requires
that V8 is compiled with said switches and was broken because of it.

This commit turns them on again on SunOS systems. Let's hope for the best.
2012-07-19 18:20:34 +02:00
Ben Noordhuis
5a5e128165 build: link with -rdynamic, not -Wl,--export-dynamic
The system linker on SunOS doesn't understand --export-dynamic.
2012-07-19 00:08:37 +02:00
Ben Noordhuis
202df30aab build: disable unsafe optimizations
Compile at -O2 and disable optimizations that trigger gcc bugs.

Some people still reported mksnapshot crashes after commit b40f813 ("build: fix
spurious mksnapshot crashes for good" - so much for that).

Average performance of the -O2 binary is on par with the -O3 binary. Variance
on the http_simple bytes/8 benchmark appears to be slightly greater but small
enough that the possibly of it being noise cannot be excluded.

The new binary very slightly but consistently outperforms the -O3 binary (by
about 0.5%) on the mostly CPU-bound bytes/102400 benchmark. That could be an
artifact of the system I benchmarked it on, a Core 2 Duo with a puny 32 kB of
L1 instruction cache. The smaller binary seems to play nicer with the cache.
2012-07-12 16:17:25 +02:00
Ben Noordhuis
b40f813bab build: fix spurious mksnapshot crashes for good
A variety of gcc bugs made mksnapshot crash with either a segmentation fault
or a 'pure virtual method callled' run-time error.

After much wailing and gnashing of teeth I managed to deduce that the bugs
show up when:

  1. gcc 4.5.2 for i386-pc-solaris2.11 is used and -fstrict-aliasing is
     enabled, or

  2. gcc version 4.4.6 for x86_64-redhat-linux is used and
     -ffunction-sections -finline-functions at -O2 or higher is enabled

Therefore, disable -ffunction-sections and -fdata-sections unconditionally
and disable -fstrict-aliasing only on Solaris.

The -ffunction-sections and -fdata-sections switches were nonsense anyway
because we don't link with -Wl,--gc-sections.
2012-07-11 03:52:13 +02:00
Ben Noordhuis
b1cce04646 build: rename strict_aliasing to node_no_strict_aliasing
Make the variable naming consistent with the other strict aliasing var,
v8_no_strict_aliasing.
2012-07-03 15:28:45 +02:00
Robert Mustacchi
f62441367f x64 target should always pass -m64 2012-06-07 17:54:56 -07:00
Bert Belder
c8a10e97c8 Merge branch 'v0.6'
Conflicts:
	deps/uv/include/uv-private/uv-unix.h
	deps/uv/include/uv-private/uv-win.h
	deps/uv/src/uv-common.c
	deps/uv/src/win/fs.c
	src/process_wrap.cc
2012-04-29 00:17:23 +02:00
Bert Belder
51e66ec410 Windows: turn off /Gm
Otherwise multicode compile doesn't work.
2012-04-27 22:06:12 +02:00
Ben Noordhuis
2639566c6e build: configure openssl
* compile with -DOPENSSL_NO_SOCK and -DOPENSSL_NO_DGRAM, we don't need it
* compile with -DOPENSSL_NO_GOST and -DOPENSSL_NO_HW_PADLOCK, works around the
  brain dead linker on solaris and maybe others
* compile with -DTERMIOS, OS X doesn't have <termio.h>
* compile with -D__EXTENSIONS__ on solaris, makes siginfo_t available
* compile without -ansi on linux, it hides a number of POSIX declarations
  (sigaction, NI_MAXHOST, etc.)
2012-04-12 01:34:05 +02:00
Nathan Rajlich
7b71fd0c68 build: add comment explaining MACOSX_DEPLOYMENT_TARGET. 2012-04-10 14:39:29 -07:00
Nathan Rajlich
70a5b53e03 Re-apply "build: target OSX 10.5 when building on darwin"
This reverts commit 93eca95aec.

Fixes #3072 (once again).
2012-04-10 14:38:47 -07:00
isaacs
93eca95aec Revert "build: target OSX 10.5 when building on darwin"
This reverts commit b6d6a54f80,
which fixed #3072, so we'll have to figure out another way
to make that work.
2012-04-08 22:31:28 -07:00
Nathan Rajlich
b6d6a54f80 build: target OSX 10.5 when building on darwin 2012-04-05 16:30:33 -07:00
Bert Belder
930fabe43f Disable V8 postmortem debugging on Windows
It is not supported by V8.
2012-04-03 03:07:47 +02:00
Ben Noordhuis
92c0c6953a build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.

Fixes #2061.
2012-04-02 23:53:05 +02:00
Dave Pacheco
cc15299c32 build: add support for DTrace and postmortem
* fixes #2110
* includes V8 postmortem metadata in Solaris builds
* adds GYP support for DTrace probes and ustack helper
* ustack helper derives constants dynamically from libv8_base.a
* build with DTrace support by default on SunOS
2012-04-01 00:14:36 +00:00
Ben Noordhuis
30b29d8f87 build: disable -fstrict-aliasing if gcc < 4.6.0
A compiler bug in older versions of gcc makes it do unsafe optimizations at -O1
and higher. This manifested itself with (at least) gcc 4.5.2 on SmartOS because
it made V8 hang in a busy loop.

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
2012-03-02 09:26:35 -08:00
Shigeki Ohtsu
82ad1f87fa Fix #2830 for the old gcc bug on SmartOS 2012-02-27 12:02:25 -08:00
Nathan Rajlich
3c68c85f18 build: use -pthreads (not -pthread) on Solaris 2012-02-27 02:28:06 +01:00
Shigeki Ohtsu
491ec171ec build: change default BUILDTYPE of gyp to Release 2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
58e5d69250 build: fix the case where config.gypi doesn't exist 2012-02-23 14:11:26 +01:00
Shigeki Ohtsu
680d75af34 build: make default_configuration consistent with BUILDTYPE 2012-02-23 14:11:26 +01:00
Nathan Rajlich
546870edd8 build: use proper -arch for target_arch on OS X 2012-02-20 11:49:32 +01:00
Dave Pacheco
7864bb9eb8 build: disable -fomit-frame-pointer on solaris
This "optimization" cripples debuggability and has dubious performance value,
so we want to disable it at least on SmartOS.
2012-02-18 00:30:00 +01:00
Nathan Rajlich
71e975669c Default to static linking CRT on Windows. 2012-02-15 13:32:46 -08:00
Ben Noordhuis
8a6576f764 Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	common.gypi
2012-02-12 16:12:26 +01:00
Igor Zinkovsky
0a347559bf enable x64 windows build
use "vcbuild x64" to do x64 build of node.exe
2012-02-07 13:32:53 -08:00
Bert Belder
2e2df04b35 Windows: disable RTTI and exceptions 2012-02-06 15:59:08 +01:00
Ben Noordhuis
03c4aa6aef build: don't set -mmacosx-version-min
It sets __MAC_OS_X_VERSION_MIN_REQUIRED__, which is what we use for feature
detection.
2012-01-31 15:12:12 +01:00
Ben Noordhuis
6b5853794d build: disable NDEBUG in release builds for now
assert() sanity checks are a good thing.
2012-01-20 16:00:27 +01:00
Shigeki Ohtsu
55c21970fd build: compile without -fvisibility=hidden
Fixes symbol lookup errors when loading an addon module on Linux.
2012-01-05 16:50:55 +01:00
Ryan Dahl
7edfb02984 Remove visibility=hidden options from common.gypi
Not necessary and preventing addon loading.
2011-12-20 22:02:50 -08:00
Ryan Dahl
c65a91c96f GYP: don't build V8 twice 2011-12-19 13:41:04 -08:00
Ben Noordhuis
bbd976b8c4 build: always compile with large file support
Fixes a nasty sizeof(struct stat) mismatch bug that caused random crashes and
silent memory corruption.
2011-11-30 02:28:12 +01:00
Ben Noordhuis
1cf13bca19 build: compile with -D__DARWIN_64_BIT_INO_T on OS X
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.

Fixes #2061 for gyp builds. Solution proposed by Paddy Byers.
2011-11-25 16:53:38 +01:00
Bert Belder
4a1efb2b9c Support native extension loading on Windows 2011-10-29 01:06:51 +02:00
Peter Bright
766430c743 Windows: set executables to be console programs
closes #1644
2011-09-04 19:27:04 +02:00
Ryan Dahl
85f7b78e9b gyp: Further fixes to target_defaults for mac 2011-08-23 13:19:17 -07:00
Evan Martin
8a29e5ea5b gyp: Don't pass C++ flags to C compiler, and don't pass -ansi in OpenSSL builds. 2011-08-23 13:19:17 -07:00
Evan Martin
a916d888f2 common.gypi: don't nest "target_defaults" within "target_defaults"
The "conditions" block is already within a "target_defaults", so its
children amend target default settings already.
2011-08-23 13:19:17 -07:00
Ryan Dahl
b433c42a56 gyp: Support Linux 2011-08-15 21:17:02 -04:00
Ryan Dahl
25a5e90289 Fix GYP build on OSX
Broken due to DOS line endings.

  ./configure-gyp
  make -f Makefile-gyp
2011-08-15 13:41:07 -07:00
Peter Bright
16788f461a Rename gyp files to produce useful solution names.
Hoist common settings into common.gypi.

Restrict v8's common.gypi to v8 projects.

Ensure v8 doesn't use /MP in debug builds.

Add basic settings for other platforms.

Make uv import common.gypi properly.

Remove LTCG warning.
2011-08-13 19:57:42 -07:00