[FFmpeg-devel] [PATCH] Re-add OS/2 support

Dave Yeo daveryeo
Mon Oct 8 07:16:26 CEST 2007


Diego Biurrun wrote:
> On Sat, Sep 15, 2007 at 09:38:39PM -0700, Dave Yeo wrote:
>> Diego Biurrun wrote:
...
> 
>>>> +    SLIB_INSTALL_EXTRA_CMD="-install -m 644 
>>>> \$(SLIBNAME:\$(SLIBSUF)=.lib) \$(SLIBNAME:\$(SLIBSUF)=.a) \$(LIBDIR)"
>>> This looks wrong.  First you set SLIBSUF to .dll then you change it
>>> here?  What's going on?  Also, there should be no libs with the names
>>> you are trying to install, since they are created under different names
>>> according to what you have set LIBSUF and SLIBSUF to ...
>> GCC on OS/2 supports both a.out binaries, objects and libs. Libs use .a 
>> suffix, uses ld for linking, needs to be bound to execute. Plus OMF 
>> objects, binaries, and libs. Libs use .lib suffix, and uses native linker 
>> for linking. Can also use IBM debuggers and other tools.
> 
> You are contradicting yourself here by saying two different things about
> libs ...

No contradiction, just 2 different ways to create libs and binaries. GCC 
probably only supported a.out binary format when first ported to OS/2 
(1991?) with native OMF binary format added to the port later. It still 
uses a.out by default.

> 
>> To link to DLLs we create an import lib from the DLL (or DEF) and link to 
>> that so ideally we want to end up with static foo_s.a and foo_s.lib (we 
>> only get the .lib now), foo.dll and foo.a and foo.lib which the respective 
>> linkers actually link against. Most of this is taken care of here by 
>> dllar.cmd.
...
>> These could also be named libfoo_s.a, libfoo.dll.a etc. Older GCC did not 
>> understand these so I stayed with the older naming partially out of habit 
>> and partially to keep some backwards compatibility.
> 
> I say forget backwards compatibility and go for the clean solution.

Well now on install they are renamed to libfoo_dll.a etc. A cleaner 
solution is to update dllar.cmd upstream which will have to wait for a 
future release of klibc.
> 
>> Note also that we (and also Windows?) need an extra uninstall command as 
>> well in a future patch.
> 
> Patches welcome.

Yes, well one patch at a time :)
> 
>> After ./configure --enable-shared --enable-os2threads && make && make 
>> install with attached patch.

10-07-07   6:53p   2244033         124  avcodec-51.44.0.dll
10-07-07   6:53p   2244033         124  avcodec-51.dll
10-07-07   6:53p   2244033         124  avcodec.dll
10-07-07   6:53p    168056         124  libavcodec_dll.a
10-07-07   6:53p    103936         124  libavcodec_dll.lib
10-07-07   6:53p  11030528         124  libavcodec_s.lib
...

updated patch attached
Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.os2.diff
Type: text/x-patch
Size: 1721 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071007/9bfe5438/attachment.bin>



More information about the ffmpeg-devel mailing list