Revision: 12094
Author: [email protected]
Date: Mon Jul 16 05:34:34 2012
Log: Fix compilation for ARM/uClibc
BUG=
TEST=Compile for ARM using uClibc
Review URL: https://chromiumcodereview.appspot.com/10784012
Patch from Remi Duraffort <[email protected]>.
http://code.google.com/p/v8/source/detail?r=12094
Modified:
/branches/bleeding_edge/src/platform-linux.cc
=======================================
--- /branches/bleeding_edge/src/platform-linux.cc Fri Jun 29 01:04:24 2012
+++ /branches/bleeding_edge/src/platform-linux.cc Mon Jul 16 05:34:34 2012
@@ -1025,7 +1025,8 @@
sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]);
#elif V8_HOST_ARCH_ARM
// An undefined macro evaluates to 0, so this applies to Android's Bionic
also.
-#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
+#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && \
+ !defined(__UCLIBC__))
sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]);
sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]);
sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]);
@@ -1033,7 +1034,8 @@
sample->pc = reinterpret_cast<Address>(mcontext.arm_pc);
sample->sp = reinterpret_cast<Address>(mcontext.arm_sp);
sample->fp = reinterpret_cast<Address>(mcontext.arm_fp);
-#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
+#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) &&
+ // !defined(__UCLIBC__))
#elif V8_HOST_ARCH_MIPS
sample->pc = reinterpret_cast<Address>(mcontext.pc);
sample->sp = reinterpret_cast<Address>(mcontext.gregs[29]);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev