diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index 9d2a7bc612..41c9faeb63 100644 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -225,7 +225,8 @@ LIBRARY_FLAGS = { 'LINKFLAGS': ['-m64'], }, 'prof:oprofile': { - 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] + 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'], + 'LIBS': ['opagent', 'bfd'] } }, 'msvc': { diff --git a/wscript b/wscript index 3cc70e2610..9d5379b604 100644 --- a/wscript +++ b/wscript @@ -187,6 +187,9 @@ def configure(conf): conf.env["USE_OPROFILE"] = o.use_oprofile + if o.use_oprofile: + conf.check(lib=['bfd', 'opagent'], uselib_store="OPROFILE") + conf.check(lib='dl', uselib_store='DL') if not sys.platform.startswith("sunos") and not sys.platform.startswith("cygwin"): conf.env.append_value("CCFLAGS", "-rdynamic") @@ -573,7 +576,7 @@ def build(bld): node = bld.new_task_gen("cxx", product_type) node.name = "node" node.target = "node" - node.uselib = 'RT EV OPENSSL CARES EXECINFO DL KVM SOCKET NSL UTIL' + node.uselib = 'RT EV OPENSSL CARES EXECINFO DL KVM SOCKET NSL UTIL OPROFILE' node.add_objects = 'eio http_parser' if product_type_is_lib: node.install_path = '${PREFIX}/lib'