/media/libvpx/xcode4.patch

http://github.com/zpao/v8monkey · Patch · 42 lines · 38 code · 4 blank · 0 comment · 0 complexity · 32c919638e8655db5acc94f5b5cb1516 MD5 · raw file

  1. commit 52f6e28e9e5e176424c1c65ff13aa57abf9c00e6
  2. Author: Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
  3. Date: Sat Mar 5 15:36:40 2011 -0500
  4. Fix build with xcode4 and simplify GLOBAL.
  5. Without this change I get link errors in firefox's libxul. It looks
  6. like the linker expect a particular pattern for getting the GOT. This
  7. patch changes webm to use the same pattern used by the compiler.
  8. Change-Id: Iea8c2e134ad45c1dc7d221ff885a8429bfa4e057
  9. diff --git a/vpx_ports/x86_abi_support.asm b/vpx_ports/x86_abi_support.asm
  10. index a872b28..be64cd7 100644
  11. --- a/vpx_ports/x86_abi_support.asm
  12. +++ b/vpx_ports/x86_abi_support.asm
  13. @@ -168,15 +168,10 @@
  14. %macro GET_GOT 1
  15. push %1
  16. call %%get_got
  17. - %%sub_offset:
  18. - jmp %%exitGG
  19. %%get_got:
  20. - mov %1, [esp]
  21. - add %1, fake_got - %%sub_offset
  22. - ret
  23. - %%exitGG:
  24. + pop %1
  25. %undef GLOBAL
  26. - %define GLOBAL(x) x + %1 - fake_got
  27. + %define GLOBAL(x) x + %1 - %%get_got
  28. %undef RESTORE_GOT
  29. %define RESTORE_GOT pop %1
  30. %endmacro
  31. @@ -289,7 +284,6 @@
  32. %elifidn __OUTPUT_FORMAT__,macho32
  33. %macro SECTION_RODATA 0
  34. section .text
  35. -fake_got:
  36. %endmacro
  37. %else
  38. %define SECTION_RODATA section .rodata