[FFmpeg-devel] [PATCH]Fix PGC compilation

Hendrik Leppkes h.leppkes at gmail.com
Thu Apr 18 07:35:36 CEST 2013


On Thu, Apr 18, 2013 at 1:36 AM, Paul B Mahol <onemda at gmail.com> wrote:

> On 4/17/13, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> > Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:
> >
> >> The following fate tests also fail, I was unable
> >> to find a workaround:
> >> fate-acodec-ra144
> >> fate-lavf-ogg
> >
> > They are both related to the compilation of
> > libavcodec/lpc.o, works with "-O" (but not -O2).
> > No warnings are shown when compiling lpc.c
> >
> > Following inlined patch allows compilation
> > with --disable-optimizations (which mostly
> > fixes fate except the mov crash and a failure
> > with smc, smc needs O0 or O1 or O2 or O3).
> >
> > diff --git a/configure b/configure
> > index f146f7e..2aff8e2 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2806,7 +2806,7 @@ probe_cc(){
> >          opt_common='-alias=ansi -Mdse -Mlre -Mpre'
> >          _cflags_speed="-O3 -Mautoinline -Munroll=c:4 $opt_common"
> >          _cflags_size="-O2 -Munroll=c:1 $opt_common"
> > -        _cflags_noopt="-O1"
> > +        _cflags_noopt="-O"
> >          _flags_filter=pgi_flags
> >      elif $_cc 2>&1 | grep -q Microsoft; then
> >          _type=msvc
> >
> >
> > This is a workaround for the crash in movenc.c:
> >
> > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > index 8f3b1bc..8efd1cb 100644
> > --- a/libavformat/movenc.c
> > +++ b/libavformat/movenc.c
> > @@ -1266,7 +1266,9 @@ static int mov_write_stts_tag
> >              if (i && duration == stts_entries[entries].duration) {
> >                  stts_entries[entries].count++; /* compress */
> >              } else {
> > -                entries++;
> > +                // Fixes a crash with Portland pgc compiler
> > +                int entries2 = entries + 1;
> > +                entries = entries2;
>
> Is this some kind of joke?
>
>
I agree, what does this compiler offer that it warrants these ugly hacks?


More information about the ffmpeg-devel mailing list