[FFmpeg-devel] [Patch] Alternative OS/2 patch

Dave Yeo daveryeo
Fri Nov 9 06:19:16 CET 2007

On 11/05/07 04:05 am, Ramiro Polla wrote:
> Hello,
> Diego Biurrun wrote:
>> On Sun, Nov 04, 2007 at 02:07:54PM -0800, Dave Yeo wrote:
>>> I'm not sure about the use of SLIB_EXTRA_CMD in mingw. It looks like it is 
>>> just appending some more linker flags in which case they could perhaps be 
>>> moved to SHFLAGS and SLIB_EXTRA_CMD moved to prelinking or replaced by 
>>> SLIB_CREATE_DEF_CMD. The SLIB_EXTRA_CMD here could easily be rolled into 
>>> SLIB_CREATE_DEF_CMD as well.
>> I'm not sure what the lib command does either, but since it is run after
>> installation it cannot add linker flags unless I misunderstand what you
>> mean by "adding linker flags".
>> Doesn't the lib command create some sort of def file as well?
> In SHFLAGS, "-Wl,--output-def,$(@:$(SLIBSUF)=.def)" is responsible for 
> creating the DEF file. Isn't there something similar for OS/2? (letting 
> the compiler create the DEF file when building the shared library).

No, at that the linker needs a DEF file during linking to output a
useful shared library, eg one that actually exports functions. OS/2 is
similar to Windows but the linking rules are more strict and IBM stopped
most compiler development about 10 yrs ago. GCC also didn't have much
development for a long time and way back it was decided by whoever was
doing the port to just use the IBM linker to create a DLL using ld as a
frontend. Bonus with this method was that GCC could also use the native
toolkit headers and libs.

> In SLIB_EXTRA_CMD, the lib command creates a LIB file from the DEF file. 
> The output filename is implicit.
> Ramiro Polla

More information about the ffmpeg-devel mailing list