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

Víctor Paesa wzrlpy
Thu Sep 7 15:56:34 CEST 2006


Hi,

> On 9/6/06, V?ctor Paesa <wzrlpy at arsystel.com> wrote:
>> Hi,
>>
>> > As discussed on drawtext.c rewrite patch, here follows the standalone
>> > patch to fix Makefile problem (linker is missing specific libraries
>> > for each vhook).
>> >
>> >
>>
>> Cygwin is picky regarding the place of libraries in the link command
>> line,
>> I need the $(LDFLAGS_$@) to be at the right.
>>
>>
>> So in your patch this one line ...
>>
>> +        $(CC) $(LDFLAGS_$@) $(VHOOKLIBS) $(LDFLAGS) -g -o $@
>> $(VHOOKSHFLAGS) $<
>>
>> ... should be:
>>
>> +        $(CC) $(VHOOKLIBS) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $<
>> $(LDFLAGS_$@)
>>
>> That order of dependancy libraries was already discussed at:
>> http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-July/012851.html
>
> problem is: it need to be before LDFLAGS since this defines --as-needed.
>
> Ideas?
>

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?


Regards,
V?ctor Paesa




More information about the ffmpeg-devel mailing list