Skip to content

Commit

Permalink
www/node: Use binutils from ports with BUNDLED_SSL
Browse files Browse the repository at this point in the history
www/node does not work well with with BUNDLED_SSL
when DTRACE is on (default) and we are using an older
binutils version. FreeBSD is using the last GPLv2 one,
which does not provide options expected by a few python
scripts.

Use ports binutils and patch python scripts to use it.

Signed-off-by:	Johannes Meixner <johannes@perceivon.net>
  • Loading branch information
xmj committed Jun 12, 2018
1 parent 2b93147 commit 3854818
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
5 changes: 5 additions & 0 deletions www/node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ BUNDLED_SSL_DESC= Use node.js's bundled OpenSSL implementation
BUNDLED_SSL_USES_OFF= ssl
BUNDLED_SSL_CONFIGURE_OFF= --shared-openssl --openssl-use-def-ca-store
BUNDLED_SSL_RUN_DEPENDS_OFF= ca_root_nss>=0:security/ca_root_nss
BUNDLED_SSL_USE= binutils=yes
BUNDLED_SSL_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-deps_v8_tools_disasm.py \
${PATCHDIR}/extra-patch-deps_v8_tools_grokdump.py \
${PATCHDIR}/extra-patch-deps_v8_tools_ll__prof.py \
files/extra-patch_tools_genv8constants.py

NLS_CONFIGURE_ON= --with-intl=system-icu
NLS_LIB_DEPENDS= libicui18n.so:devel/icu
Expand Down
11 changes: 11 additions & 0 deletions www/node/files/extra-patch-deps_v8_tools_disasm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- deps/v8/tools/disasm.py.orig 2018-06-10 08:55:38 UTC
+++ deps/v8/tools/disasm.py
@@ -34,7 +34,7 @@ import tempfile


# Avoid using the slow (google-specific) wrapper around objdump.
-OBJDUMP_BIN = "/usr/bin/objdump"
+OBJDUMP_BIN = "/usr/local/bin/objdump"
if not os.path.exists(OBJDUMP_BIN):
OBJDUMP_BIN = "objdump"

11 changes: 11 additions & 0 deletions www/node/files/extra-patch-deps_v8_tools_grokdump.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- deps/v8/tools/grokdump.py.orig 2018-06-10 08:55:46 UTC
+++ deps/v8/tools/grokdump.py
@@ -584,7 +584,7 @@ MD_CPU_ARCHITECTURE_ARM64 = 0x8003
MD_CPU_ARCHITECTURE_AMD64 = 9

OBJDUMP_BIN = None
-DEFAULT_OBJDUMP_BIN = '/usr/bin/objdump'
+DEFAULT_OBJDUMP_BIN = '/usr/local/bin/objdump'

class FuncSymbol:
def __init__(self, start, size, name):
11 changes: 11 additions & 0 deletions www/node/files/extra-patch-deps_v8_tools_ll__prof.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- deps/v8/tools/ll_prof.py.orig 2018-06-10 08:55:52 UTC
+++ deps/v8/tools/ll_prof.py
@@ -869,7 +869,7 @@ if __name__ == "__main__":
default="/tmp/__v8_gc__",
help="gc fake mmap file [default: %default]")
parser.add_option("--objdump",
- default="/usr/bin/objdump",
+ default="/usr/local/bin/objdump",
help="objdump tool to use [default: %default]")
parser.add_option("--host-root",
default="",
11 changes: 11 additions & 0 deletions www/node/files/extra-patch_tools_genv8constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- tools/genv8constants.py.orig 2018-06-10 09:22:07.876673000 +0000
+++ tools/genv8constants.py 2018-06-10 09:22:18.437062000 +0000
@@ -18,7 +18,7 @@

outfile = file(sys.argv[1], 'w');
try:
- pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ],
+ pipe = subprocess.Popen([ '/usr/local/bin/objdump', '-z', '-D', sys.argv[2] ],
bufsize=-1, stdout=subprocess.PIPE).stdout;
except OSError, e:
if e.errno == errno.ENOENT:

0 comments on commit 3854818

Please sign in to comment.