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

Nomis101 Nomis101 at web.de
Sun Nov 13 15:46:54 EET 2022


Am 12.11.22 um 23:09 schrieb Ronald S. Bultje:
> Hi,
>
> On Sat, Nov 12, 2022 at 1:57 PM Nomis101 <Nomis101 at web.de> wrote:
>
>> Hi.If building FFmpeg, configure does set a value for mstack-alignment,
>> for example on macOS
>> -mstack-alignment=16. 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 FFmpeg does set
>> mstack-alignment? And if it would be safe to disable it in case FFmpeg is
>> compiled with ThinLTO (for
>> HandBrake)?
>>
>
> It can safely be set to the higher of the two values, it has the same
> meaning. Alignment of 64 implies alignment of 16.
Thanks. I found out, that its enough to disable the mstack-alignment part for x264 in case of
ThinLTO. This will also fix the error.


>
> Ronald
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list