Skip to content

meson: Assorted fixes for building under Cerbero

amyspark requested to merge amyspark/x264:fix-cerbero into meson

Hi,

This PR is to enable the usage of this fork with Cerbero (gstreamer/cerbero#215). I found several issues with the compiler set we use there:

  • the ios value of host_machine.system() strikes again (it was not handled here, therefore causing Nasm to build elf objects)
  • missing STACK_ALIGNMENT value for Nasm objects
  • Arm64 Darwin jobs were unable to execute the version.py script due to the way we clone the repo, and because they were executed with native: false
  • x264 is also affected by Android x86's bug re: insufficient registers when targeting API < 24, which requires -mstackrealign
  • The -Wl,-z,notext was applied unconditionally, even under MINGW32 which uses ld.bfd yet does not support that ELF-specific flag
  • Android x86 requires -fPIC, but Meson does not handle the default of b_staticpic anywhere

I also took the chance and modernized the version.py script, making sure text capturing was already handled by subprocess.run.

Let me know what you think.

Edited by amyspark

Merge request reports