[DVDnav-discuss] [PATCH] Fix packed structures with mingw gcc >= 4.7

Erik Hovland erik at hovland.org
Wed Feb 20 01:07:08 CET 2013


On Sat, Jan 26, 2013 at 12:01 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Saturday 26 January 2013 14:23:28 John Stebbins wrote:
>> On 01/26/2013 11:20 AM, Mike Frysinger wrote:
>> > On Saturday 26 January 2013 13:56:17 John Stebbins wrote:
>> >> +    if test "$GCC" = "yes" ; then
>> >> +        gcc_version="`$CC -dumpversion`"
>> >> +        gcc_version_major=$(echo $gcc_version | cut -d"." -f1)
>> >> +        gcc_version_minor=$(echo $gcc_version | cut -d"." -f2)
>> >> +        gcc_version_patch=$(echo $gcc_version | cut -d"." -f3)
>> >> +        if test $gcc_version_major -ge 4 -a $gcc_version_minor -ge 7 ;
>> >> +            CFLAGS="-mno-ms-bitfields $CFLAGS"
>> >> +        fi
>> >> +    fi
>> >
>> > why not test if the flag is supported and then use it whenever it is ?
>> > that way you don't have to check the gcc version.
>>
>> Because I suck at autoconf and didn't know how...
>
> not too many people would admit to being good at autotools :)
>
> easiest thing is probably to copy ax_check_compile_flag.m4 from the autoconf-
> archive project into the m4/ subdir and then do:
>         AX_CHECK_COMPILE_FLAG([-mno-ms-bitfields],
>                 [CFLAGS="-mno-ms-bitfields $CFLAGS"])

Like this?

E

-- 
Erik Hovland
erik at hovland.org
http://hovland.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-ax_check_compile_flag-to-the-m4-files.patch
Type: application/octet-stream
Size: 3980 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20130219/79d510cf/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-packed-structures-with-mingw-gcc-4.7.patch
Type: application/octet-stream
Size: 1569 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20130219/79d510cf/attachment-0001.obj>


More information about the DVDnav-discuss mailing list