Changes between Version 6 and Version 7 of PortingTips


Ignore:
Timestamp:
Dec 29, 2015, 4:13:27 AM (9 years ago)
Author:
dmik
Comment:

Add "Fix OS/2 DLL name in libtool" section

Legend:

Unmodified
Added
Removed
Modified
  • PortingTips

    v6 v7  
    1818
    1919Some projects use the `build-aux/git-version-gen` script to define the project version in `configure.ac`. The "stock" version of this script doesn't understand CRLF as line terminators which leads to a corrupt `configure`. The fix is rather simple and can be seen here: r968.
     20
     21=== Fix OS/2 DLL name in libtool ===
     22
     23When `libtool` is used to generate project DLLs, such a DLL often gets a version number in its name (e.g. `libpixman-1.so.0`, where `pixman-1` is the  base DLL name and `0` is the major version number). However, on OS/2 the version information cannot follow the extension and hence it must be put into the name part. But the name part is limited to 8 chars so `libtool` has to cut the base DLL name by default to make the appended major version number fit the limit. In case of the `pixman` this would give us `pixman-0.dll` which looks misleading.
     24
     25A proper solution in this case is to force `libtool` use a special, short version of the base name for the DLL file (and only for it — all other files, such as the import library name, should carry the original name so that the linker can recognize it). This is done using the `-shortname` libtool option. Where to add it varies from project to project but the typical place is the _la_LDFLAGS variable in Makefile.am for the library. See r1232 for a real-life example.