[x264-devel] [Question] Technical reason why x264 sets a mstack-alignment value on compile time?

Nomis101 Nomis101 at web.de
Sat Nov 12 19:04:55 UTC 2022


Hi. If building FFmpeg with x264, configure does set a value for mstack-alignment for x264, for
example on macOS
-mstack-alignment=64. On HandBrake we found there is an issue with current Clang in Xcode about
conflicting 'override-stack-alignment' values if we build with ThinLTO.

"ld: linking module flags 'override-stack-alignment': IDs have conflicting values"

I found out why this is. x264 does set -mstack-alignment=64 in configure, FFmpeg does set
-mstack-alignment=16 and this seems to be a conflict when linking. If I modify both configure files
and remove the mstack-alignment part, then the build does finish with no error.

And here comes my questions. I was wondering, about the technical reason why x264 does set
mstack-alignment? And if it would be safe to disable it in case x264 is compiled with ThinLTO (for
HandBrake)?

Thanks and Regards


More information about the x264-devel mailing list