[FFmpeg-devel] mingw64 4.7.x struct alignment behavior has changed
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Jan 11 13:09:18 CET 2014
On 10.01.2014, at 03:42, Timothy Gu <timothygu99 at gmail.com> wrote:
> On Jan 9, 2014 6:53 PM, "Gianluigi Tiesi" <mplayer at netfarm.it> wrote:
>
>> as stated in this announce:
>> http://cygwin.com/ml/cygwin-announce/2013-07/msg00011.html
>>
>> For gcc-4.7.x, struct alignment behavior has changed, -mms-bitfields is
>> now default for better MSVC compatibility. This may cause ABI changes
>> in libraries that expose data structures directly to clients. Workaround
>> include marking the struct with the gcc_struct attributes.
>
> More technical details here:
> http://gcc.gnu.org/onlinedocs/gccint/Storage-Layout.html#index-TARGET_005fMS_005fBITFIELD_005fLAYOUT_005fP-3938
>
>>
>> this actually breaks mplayer libmpdemux/asf.h structs
>>
>> e.g. ASF_stream_header_t is 56 bytes instead of 54
>>
>> I'm not sure about other places in mplayer and/or ffmpeg
>> I'm not even sure for libraries I build for dependencies
>>
>> Should we add explicit gcc_struct or pass -mno-ms-bitfields to mingw?
>
> I'd say to pass the compiler option to prevent corruption of source code,
> if really necessary.
You'd have to add it to the .pc files, too.
IMO we should just make sure this option makes no difference.
More information about the ffmpeg-devel
mailing list