qt5jsbackend-0002-fix-uclibc.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. Fix build on uClibc
  2. Patch taken from https://code.google.com/p/v8/source/detail?r=12094.
  3. Review URL: https://chromiumcodereview.appspot.com/10784012
  4. Patch from Remi Duraffort <remi.duraffort@st.com>.
  5. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  6. Index: qt5jsbackend-5.0.0/src/3rdparty/v8/src/platform-linux.cc
  7. ===================================================================
  8. --- qt5jsbackend-5.0.0.orig/src/3rdparty/v8/src/platform-linux.cc 2012-12-18 20:04:01.000000000 +0100
  9. +++ qt5jsbackend-5.0.0/src/3rdparty/v8/src/platform-linux.cc 2013-03-03 20:31:46.000000000 +0100
  10. @@ -1030,7 +1030,8 @@
  11. sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]);
  12. #elif V8_HOST_ARCH_ARM
  13. // An undefined macro evaluates to 0, so this applies to Android's Bionic also.
  14. -#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
  15. +#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && \
  16. + !defined(__UCLIBC__))
  17. sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]);
  18. sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]);
  19. sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]);
  20. @@ -1038,7 +1039,8 @@
  21. sample->pc = reinterpret_cast<Address>(mcontext.arm_pc);
  22. sample->sp = reinterpret_cast<Address>(mcontext.arm_sp);
  23. sample->fp = reinterpret_cast<Address>(mcontext.arm_fp);
  24. -#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
  25. +#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) &&
  26. + // !defined(__UCLIBC__))
  27. #elif V8_HOST_ARCH_MIPS
  28. sample->pc = reinterpret_cast<Address>(mcontext.pc);
  29. sample->sp = reinterpret_cast<Address>(mcontext.gregs[29]);