[FFmpeg-devel] [PATCH] Add -fno-common to PE32 CFLAGS

Dave Yeo daveryeo
Thu Apr 9 07:40:24 CEST 2009


On 04/08/09 06:42 pm, Ramiro Polla wrote:
> Hi,
>
> Some time ago Art Clarke sent a patch to unconditionally add
> -fno-common to mingw32 builds because of a bug in GCC. Instead of
> applying the patch, the documentation was updated to reflect this bug
> and the workaround.
>
> The bug details can be found here:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
>
> I finally took some time to investigate what combination of
> gcc+binutils triggers the bug. Just like Brian Dessent mentions in
> comment #6, the bug appears with binutils starting November 2007. The
> gcc version doesn't matter as long as it puts data in .comm. binutils
> 2.18 doesn't show this bug, but it has other shortcomings which make
> it not fit for building FFmpeg.
>
> With current mingw32 binutils floating around the web, all builds will
> crash at some point in some optimizations (maybe Baptiste can give us
> a sample that really crashes, I haven't seen them yet, but there are
> lots of reports).
>
> So is it ok to unconditionally include this flag with attached patch
> (and a very descriptive log message) before binutils is fixed?
>
[...]
> @@ -1688,6 +1691,7 @@
>           SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
>           SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
>           enable dos_paths
> +        check_cflags -fno-common
>           ;;
>
>       *)

OS/2 doesn't need this as we aren't using the pe assembler, plus our 
binutils are too old (2.16.1) though it doesn't seem to hurt.
Dave



More information about the ffmpeg-devel mailing list