[Ffmpeg-devel] [PATCH] fix vhook/Makefile

Diego Biurrun diego
Fri Sep 8 01:04:55 CEST 2006


On Thu, Sep 07, 2006 at 12:35:05PM -0300, Gustavo Sverzut Barbieri wrote:
> On 9/7/06, V?ctor Paesa <wzrlpy at arsystel.com> wrote:
> >The flag --as-needed affects ELF platforms so I am not able to test it
> >in Cygwin.
> >
> >I got a Linux From Scratch live image (lfslivecd-x86-6.2-2.iso, that is
> >kernel 2.6.16.27, gcc 4.0.3, ld 2.16.1) and built there SVN-6182
> >
> >I used: ./configure --disable-static --enable-shared
> >
> >I built once with $(LDFLAGS_$@) where it is, and the other at the end of
> >the line:
> >
> >
> >--- Makefile    2006-09-07 10:44:04.000000000 +0000
> >+++ Makefile.after      2006-09-07 10:41:06.000000000 +0000
> >@@ -35,7 +35,7 @@
> >        -rmdir "$(shlibdir)/vhook/"
> >
> > %$(SLIBSUF): %.o
> >-       $(CC) $(LDFLAGS_$@) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $<
> >+       $(CC) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $< $(LDFLAGS_$@)
> >
> > clean:
> >        rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
> >
> >
> >The results are very similar:
> >
> >-rwxr-xr-x 1 root root 28046 2006-09-07 10:41 after/drawtext.so
> >-rwxr-xr-x 1 root root 28070 2006-09-07 10:51 before/drawtext.so
> >
> >I took the a-mpeg4-rc.avi (generated in make test)
> >and I processed it using the two versions of drawtext.so:
> >
> >ffmpeg -i a-mpeg4-rc.avi -vhook './vhook/before/drawtext.so -f
> >/usr/share/imlib2/data/fonts/notepad.ttf -y 100 -t Hello' -sameq
> >outBefore.avi
> >ffmpeg -i a-mpeg4-rc.avi -vhook './vhook/after/drawtext.so -f
> >/usr/share/imlib2/data/fonts/notepad.ttf -y 100 -t Hello' -sameq
> >outAfter.avi
> >
> >cmp shows no differences between outBefore.avi and outAfter.avi
> >
> >Then I used: ./configure --disable-shared --enable-static
> >
> >And again very similar sizes for the .so and there were no differences
> >of output.
> >
> >Could you please explain under which scenario moving the $(LDFLAGS_$@)
> >to the right is troublesome for your platform?
> 
> You're right. I did some tests here and I've found that:
> 
> $(CC) $(LDFLAGS_$@) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $<
> $(CC) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $< $(LDFLAGS_$@)
> 
> both work, while:
> 
> $(CC) $(LDFLAGS) $(LDFLAGS_$@)  -g -o $@ $(VHOOKSHFLAGS) $<
> $(CC) $(LDFLAGS)  -g -o $@ $(VHOOKSHFLAGS) $(LDFLAGS_$@) $<
> 
> do not.
> 
> So Diego, please apply Victor's patch since it work for both systems.

Changed.

Diego




More information about the ffmpeg-devel mailing list