Browse Source

build: fail w/err msg when missing binutils

Building --with-dtrace requires objdump from GNU binutils.
This change inserts a helpful error message if there is a
problem executing objdump.
v0.9.6-release
Mike Harsch 12 years ago
committed by Ben Noordhuis
parent
commit
aeb030bead
  1. 18
      tools/genv8constants.py

18
tools/genv8constants.py

@ -10,14 +10,28 @@
import re import re
import subprocess import subprocess
import sys import sys
import errno
if len(sys.argv) != 3: if len(sys.argv) != 3:
print "usage: objsym.py outfile libv8_base.a" print "usage: objsym.py outfile libv8_base.a"
sys.exit(2); sys.exit(2);
outfile = file(sys.argv[1], 'w'); outfile = file(sys.argv[1], 'w');
pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ], try:
bufsize=-1, stdout=subprocess.PIPE).stdout; pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ],
bufsize=-1, stdout=subprocess.PIPE).stdout;
except OSError, e:
if e.errno == errno.ENOENT:
print '''
Node.js compile error: could not find objdump
Check that GNU binutils are installed and included in PATH
'''
else:
print 'problem running objdump: ', e.strerror
sys.exit()
pattern = re.compile('(00000000|0000000000000000) <(.*)>:'); pattern = re.compile('(00000000|0000000000000000) <(.*)>:');
v8dbg = re.compile('^v8dbg.*$') v8dbg = re.compile('^v8dbg.*$')
numpattern = re.compile('^[0-9a-fA-F]{2} $'); numpattern = re.compile('^[0-9a-fA-F]{2} $');

Loading…
Cancel
Save