Commit Graph

96 Commits (f6484842b37d515b32e32e4e3bd33274154565a3)

Author SHA1 Message Date
Ben Noordhuis 98b1ce91f6 build: fix mksnapshot crash on sunos
Unconditionally compile V8 with -fno-strict-aliasing on all platforms.

gcc 4.5.2 on sunos generates bad code when -fstrict-aliasing is enabled, which
undoubtedly means that there are more buggy versions of gcc out there.

-fstrict-aliasing does not give a significant performance boost so let's just
disable it.

Fixes #3736.
2012-07-18 23:26:00 +02:00
Ben Noordhuis c6bb361b84 build: partially fix configure on ARM
V8 on ARM requires that armv7 is set. We don't have a good way to detect the
CPU model right now so we pick a default and hope that it works okay for the
majority of people.

Non-scientific sampling - the ARM hardware I have lying around the house -
suggests that ARMv5 and ARMv6 are still most common so armv7=0 it is.

This obviously needs to be revisited sometime in the future.
2012-07-12 16:29:46 +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
Bert Belder 3e5139fd2f Fix the Windows build 2012-07-07 23:40:12 +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
Ben Noordhuis b731c96679 build: disable -fstrict-aliasing for any gcc < 4.6.0
It has been conclusively demonstrated that the -fstrict-aliasing bugs in gcc's
optimizer are not limited to the 4.5.x releases only.

Fixes #3601 among others.
2012-07-03 15:19:17 +02:00
Ben Noordhuis a0add91987 build: detect cc version with -dumpversion
The heuristic introduced in f78ce08 ("build: handle output of localized gcc or
clang") does not handle "branded" versions of gcc, i.e. a gcc whose output has
been customized by the distro vendor.

Fixes #3601.
2012-07-03 15:15:28 +02:00
Ben Noordhuis f78ce087ba build: handle output of localized gcc or clang
Before this commit, we used to scan the output of `$CC -v` for strings like
"gcc version x.y.z".

It was pointed out that this approach fails with localized versions of gcc
because those print (for example) "gcc versión x.y.z".

Use the output of `$CC --version` instead and only look at the first line.
2012-06-30 17:49:37 +02:00
Ben Noordhuis f315029268 build: rename openssl configure switches
For consistency's sake, rename:

  --openssl-use-sys
  --openssl-includes
  --openssl-libpath

To:

  --shared-openssl
  --shared-openssl-includes
  --shared-openssl-libpath

And add --shared-openssl-libname while we're at it.

The old switches still work but `./configure --help` won't print them.

Fixes #3591.
2012-06-30 04:30:49 +02:00
Ben Noordhuis d5f13f6c08 build: use proper python interpreter
Make configure start gyp with the same python interpreter that is used to
run configure itself.

Fixes an issue where configure fails with a SyntaxError because the user
has multiple python binaries on his $PATH and the default one is too old.
2012-06-28 01:07:45 +02:00
Gabriel 9e72b7b65c build: handle CC env var with spaces
For example:

    CC='ccache gcc' ./configure
2012-06-27 19:52:01 +02:00
Ben Noordhuis f00c8bcef8 build: fix --shared-v8 option 2012-06-27 00:35:16 +02:00
Bert Belder 10448487e5 configure: don't fail if compiler_version() doesn't work
This fixes the Windows build.
2012-06-26 19:23:24 +02:00
Ben Noordhuis 06c82c5069 build: expand ~ in `./configure --prefix=~/a/b/c` 2012-06-26 16:35:14 +02:00
Ben Noordhuis 07e5877144 build: disable strict aliasing in v8 with gcc 4.5.x
The gcc 4.5.x have various bugs that make V8 crash in various and interesting
ways when -fstrict-aliasing is in effect.
2012-06-26 03:01:46 +02:00
Ryan Dahl fe464a2fea Rename GYP variable node_use_system_openssl to be consistent 2012-06-20 22:38:30 +02:00
isaacs 0ef6cfd39b Fix #3465 Add ./configure --no-ifaddrs flag
For Old Solaris.
2012-06-18 14:52:12 -07:00
Igor Zinkovsky 35a1421e96 Windows: Enable ETW events.
This commit enables ETW events to be fired on Windows for existing
DTrace probes.  ETW instrumentation is enabled by default.  It
is possible to build node.exe without ETW instrumentation by
using --without-etw option with configure script.
2012-06-13 15:36:08 -07:00
isaacs c393853b4e build: Set strict_aliasing on SunOS always
A build failure was introduced on c9676c9147
in SmartOS systems.  This makes it build properly.
2012-05-16 14:49:51 -07:00
Sadique Ali c9676c9147 build: improve c compiler detection 2012-05-15 22:51:17 +02:00
Javier Hernández 792d9a921d build: print error message if no compiler found
Make the configure script warn the user about the lack of an acceptable
C compiler on the system.
2012-05-05 16:31:27 +02:00
Nathan Rajlich 9b7a6c5238 configure: output a newline at the end of config.gypi 2012-04-11 11:16:47 -07:00
Nathan Rajlich fdeeabba78 configure: don't use "with" for Python 2.5 and older 2012-04-11 11:16:11 -07: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
Nathan Rajlich 70e68893fe build: make --openssl-use-sys a boolean option
Before you had to enter a truthy value like: --openssl-use-sys=1
2012-03-17 12:57:24 -07:00
Alex Xu 5abcdc9671 build: fix configure with spaces in CC 2012-03-16 16:01:53 -07:00
Nathan Rajlich dc752327bb vcbuild: run the 'configure' script in vcbuild.bat
So that a 'config.gypi' file gets generated, which is
required for the `process.config` object (see #2928).
2012-03-15 16:12:19 -07:00
Ben Noordhuis 5ebc05f560 build: disable -fvisibility=hidden if gcc < 4.0.0 2012-03-05 17:03:27 +01:00
Ben Noordhuis 5062741bd7 build: make CC command in -fstrict-aliasing check configurable 2012-03-05 17:03:15 +01:00
Sadique Ali 707863c1fb build: make CC command in host check configurable 2012-03-05 16:56:52 +01:00
Shigeki Ohtsu d6f0ecc622 build: fix gcc version check 2012-03-03 18:07:39 +01:00
Shigeki Ohtsu b6595c4d60 build: remove unused import from configure script 2012-03-03 18:07:22 +01: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
Ben Noordhuis 0613af0a20 build: remove --shared-cares configure switch
c-ares is a) bundled with libuv now, and b) contains out-of-tree patches. It no
longer makes sense to link against a shared library.

Fixes #2117.
2012-03-02 16:24:37 +01:00
Shigeki Ohtsu 82ad1f87fa Fix #2830 for the old gcc bug on SmartOS 2012-02-27 12:02:25 -08:00
T.C. Hollingsworth d03b8487c6 build: support shared zlib 2012-02-27 02:31:23 +01:00
isaacs 59ecf2ccf7 Revert "Revert "build: support shared V8 properly""
This reverts commit a9130222bd.
2012-02-23 14:52:18 -08:00
isaacs c5cbc3db47 Merge branch 'v0.7.5-release' 2012-02-23 14:39:58 -08:00
isaacs a9130222bd Revert "build: support shared V8 properly"
This reverts commit 3d1b670640.

Breaks build on windows.
https://gist.github.com/1895279
2012-02-23 14:12:14 -08:00
Shigeki Ohtsu 680d75af34 build: make default_configuration consistent with BUILDTYPE 2012-02-23 14:11:26 +01:00
T.C. Hollingsworth 3d1b670640 build: support shared V8 properly
-don't pull in bundled v8 as a dependency when node_shared_v8==true
-use node_shared_v8_includes for v8.h and v8-debug.h
2012-02-22 15:20:23 +01:00
Nathan Rajlich 19133cac02 build: better host_arch() definition in configure
On one of my OS X Lion machines, it always reports i386, even though 64-bit
is supported. This lookup better matches how WAF determines the host arch,
which was correctly getting 64-bit even on this screwy machine.
2012-02-20 22:14:23 +01:00
Nathan Rajlich 028043dd02 build: map i686 to ia32 2012-02-20 11:49:57 +01:00
Nathan Rajlich af4a96ce6e build: test `uname -m` first, then `uname -p`
Prevent false i386 on 64-bit OS X.
2012-02-20 11:49:25 +01:00
Karl Skomski 09ccbef3bb build: detect host_arch better 2012-02-13 17:43:30 +01:00
Ben Noordhuis 74a8215a86 Revert support for isolates.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.

Hence, this commit backs out all isolates-related changes.

Good bye, isolates. We hardly knew ye.
2012-02-06 15:44:42 +01:00
Ben Noordhuis ad42a82df5 build: remove node_debug from config.gypi 2012-01-18 02:00:43 +01:00
Ben Noordhuis e493b29598 build: respect --debug configure switch 2012-01-17 23:03:21 +01:00
Fedor Indutny 6e76a7cb45 installer: install node-waf
* added --without-waf flag for configure script
2012-01-16 21:56:05 -08:00