This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

B20.1: small change for dlltool to enhance portability

I maintain several packages that are compiled with GNU gcc compilers
for the OS/2 and Win32 platforms. I use emx+gcc for OS/2 and CygWin
and MinGW32 for Win32. One example is the official RCS 5.7 release
for the PC that I maintain.

Some of these packages also contain DLLs (such as RCS, in which I
put the shared code into a rcslib.dll). With the current tools, I
can maintain a maximum of portability of the code between Win32
and OS/2 with only a different header file and Makefiles.

However, I need to use differen .DEF files for building DLLs
because I need to use additional statements in .DEF files for OS/2.
These are part of the Microsoft/IBM defined syntax of .DEF files
but are only meaningful for some linkers (on OS/2, mostly) and
are silently ignored by other linkers.

However, the GNU binary utilities do NOT silently ignore these
additional keywords which forces me to maintain different .DEF
files just because of one single line in them (I do not want
to use sed commands in Makefiles in order to keep build procedures
as simple as possible).

So what I did was adding support for these keywords to the
dlltool's scanner and parser grammars. Since they have no meaning
to CygWin and MinGW32, no other functionality has to be added.
The dlltool utility, with this patch, now silently ignores
the following additional keywords:

a) The DATA statement now can contain the attributes NONSHARED,

b) The LIBRARY statement now can contain the attributes

As I said above, they have no meaning and are silently ignored,
just for portability reasons.

I append the small context diff to this message as an attachment.
It is relative to the source code in the B20.1 source code package.
Please add it to future releases.

Kai Uwe Rommel

/* Kai Uwe Rommel                   ARS Computer & Consulting GmbH *
 * (             Muenchen, Germany *
 * ( maintenance) */

(See attached file: dlltool.dif)