Sun 19 Feb 2012 10:45:44 PM UTC, original submission:
This is a follow-up from http://sourceware.org/bugzilla/show_bug.cgi?id=13710
In the latest binutils snapshots, a change was applied which makes the processing of .def files for the win32/win64 targets more strict. According to the MSDN documentation at http://msdn.microsoft.com/en-us/library/d91k01sh%28v=vs.80%29.aspx all .def files must start with 'LIBRARY mylib.dll' followed by 'EXPORTS'.
Let's take this simple .def file for example:
LIBRARY mylib.dll
EXPORTS
my_func
If this .def file is processed by libtool then it automatically performs this set of commands:
libtool: link: if test "x`/bin/sed 1q .libs/libcairo.def`" = xEXPORTS; then cp
.libs/libcairo.def .libs/libcairo-2.dll.def; else echo EXPORTS >
.libs/libcairo-2.dll.def; cat .libs/libcairo.def >> .libs/libcairo-2.dll.def;
fi
This set of commands check if the first line of the .def file contains 'EXPORTS' and if this isn't the case, it automatically adds it.
Given the example .def file I mentioned earlier this will end up in:
EXPORTS
LIBRARY mylib.dll
EXPORTS
my_func
This obviously is incorrect and can't be processed by binutils.
Can libtool be changed so that it can process these kind of situations more properly?
|