Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

scons V8 build command doesn't take into account DEST_OS #1264

Closed
adammw opened this issue Jul 3, 2011 · 2 comments
Closed

scons V8 build command doesn't take into account DEST_OS #1264

adammw opened this issue Jul 3, 2011 · 2 comments
Labels

Comments

@adammw
Copy link

adammw commented Jul 3, 2011

In cross-compiling node for another operating system (rather than just another architecture), the build system does not pass on the build operating system for v8.
For example, cross-compiling node for windows on linux, the scons command does not include os=win32, and hence V8 build would eventually fail as -Wno-long-long is not specified.

A sample diff is below, however I'm not sure if that would work on other systems (I don't know how DEST_OS interacts or if it's possible values match up directly)

diff --git a/wscript b/wscript
index e85ac15..cbdcae1 100644
--- a/wscript
+++ b/wscript
@@ -513,6 +513,11 @@ def v8_cmd(bld, variant):
   if bld.env['DEST_CPU']:
     arch = "arch="+bld.env['DEST_CPU']

+  # Possible values are (linux, macos, freebsd, openbsd, solaris, win32)
+  os = "os=linux"
+  if bld.env['DEST_OS']:
+    os = "os="+bld.env['DEST_OS']
+
   toolchain = "gcc"

   if variant == "default":
@@ -525,7 +530,7 @@ def v8_cmd(bld, variant):
   else:
     snapshot = ""

-  cmd_R = sys.executable + ' "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s toolchain=%s library=static %s'
+  cmd_R = sys.executable + ' "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s %s toolchain=%s library=static %s'

   cmd = cmd_R % ( scons
                 , Options.options.jobs
@@ -533,6 +538,7 @@ def v8_cmd(bld, variant):
                 , safe_path(v8dir_src)
                 , mode
                 , arch
+                , os
                 , toolchain
                 , snapshot
                 )

Note that even though this will pass on the OS parameter, it will still not pass cross-compiling variables (e.g. CC,CXX) that are set only for make (see #1265)

@adammw
Copy link
Author

adammw commented Nov 9, 2011

See #1266 as well, I've incorporated this patch into the proposed patch for #1266.

@bnoordhuis
Copy link
Member

Closing, no longer relevant.

shigeki pushed a commit to shigeki/node-v0.x-archive that referenced this issue Oct 21, 2015
Instead of creating new timer - reuse the timer from the freelist. This
won't make the freelist timer active for the duration of `uv_close()`,
and will let the event-loop exit properly.

Fix: nodejs#1264
PR-URL: nodejs/node#3407
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
richardlau pushed a commit to ibmruntimes/node that referenced this issue Nov 5, 2015
Instead of creating new timer - reuse the timer from the freelist. This
won't make the freelist timer active for the duration of `uv_close()`,
and will let the event-loop exit properly.

Fix: nodejs#1264
PR-URL: nodejs/node#3407
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
richardlau pushed a commit to ibmruntimes/node that referenced this issue Nov 5, 2015
Instead of creating new timer - reuse the timer from the freelist. This
won't make the freelist timer active for the duration of `uv_close()`,
and will let the event-loop exit properly.

Fix: nodejs#1264
PR-URL: nodejs/node#3407
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants