Reviewers: Dean McNamee, Description: - Fix build break on Mac OS X by using the proper formatting for pointers. Verified that this works on both ia32 and x64 on Linux and Mac OS X.
Please review this at http://codereview.chromium.org/115252 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M SConstruct M src/disassembler.cc M src/globals.h M src/platform-macos.cc Index: src/disassembler.cc =================================================================== --- src/disassembler.cc (revision 1921) +++ src/disassembler.cc (working copy) @@ -46,7 +46,7 @@ PrintF("%" V8PRIxPTR " %4" V8PRIdPTR " %02x\n", pc, pc - begin, *pc); } else { fprintf(f, "%" V8PRIxPTR " %4" V8PRIdPTR " %02x\n", - reinterpret_cast<uintptr_t>(pc), pc - begin, *pc); + pc, pc - begin, *pc); } } } Index: src/platform-macos.cc =================================================================== --- src/platform-macos.cc (revision 1921) +++ src/platform-macos.cc (working copy) @@ -481,6 +481,13 @@ // Extracting the sample from the context is extremely machine dependent. ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context); mcontext_t& mcontext = ucontext->uc_mcontext; +#if V8_HOST_ARCH_X64 + UNIMPLEMENTED(); + USE(mcontext); + sample.pc = 0; + sample.sp = 0; + sample.fp = 0; +#elif V8_HOST_ARCH_IA32 #if __DARWIN_UNIX03 sample.pc = mcontext->__ss.__eip; sample.sp = mcontext->__ss.__esp; @@ -490,6 +497,9 @@ sample.sp = mcontext->ss.esp; sample.fp = mcontext->ss.ebp; #endif // __DARWIN_UNIX03 +#else +#error Unsupported Mac OS X host architecture. +#endif // V8_TARGET_ARCH_IA32 } // We always sample the VM state. Index: src/globals.h =================================================================== --- src/globals.h (revision 1921) +++ src/globals.h (working copy) @@ -86,7 +86,7 @@ #define V8_PTR_PREFIX "" #endif -#define V8PRIxPTR V8_PTR_PREFIX "x" +#define V8PRIxPTR "p" #define V8PRIdPTR V8_PTR_PREFIX "d" // Code-point values in Unicode 4.0 are 21 bits wide. Index: SConstruct =================================================================== --- SConstruct (revision 1921) +++ SConstruct (working copy) @@ -671,8 +671,6 @@ Abort("Shared Object soname not applicable for Windows.") if env['soname'] == 'on' and env['library'] == 'static': Abort("Shared Object soname not applicable for static library.") - if env['arch'] == 'x64' and env['os'] != 'linux': - Abort("X64 compilation only allowed on Linux OS.") for (name, option) in SIMPLE_OPTIONS.iteritems(): if (not option.get('default')) and (name not in ARGUMENTS): message = ("A value for option %s must be specified (%s)." % --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---