On 2008-10-02 09:53+0200 Werner Smekal wrote:
Hi,
recently I found out (make VERBOSE=1) that when an executable is compiled
with MinGW Makefiles some linker options are in the command line, which
should be in my opinion only necessary for libraries:
-Wl,--out-implib,libtest.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
I could reproduce this options with a simple test case (files attached).
Compiling this project gives (MinGW Makefiles):
Linking C executable test.exe
C:\DevZone\cmake-2.6.2-win32-x86\bin\cmake.exe -E cmake_link_script
CMakeFiles\test.dir\link.txt --verbose=1
C:\DevZone\MinGW-3.4.5\bin\gcc.exe CMakeFiles\test.dir\test.c.obj -o
test.exe -Wl,--out-implib,libtest.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
It doesn't seem to have any implications, apart maybe from this message:
http://www.mail-archive.com/[email protected]/msg15862.html
Any ideas?
Hi Werner:
I have no experience with MinGW linker, but it does seem strange that CMake
is setting what appears to be library flags for an executable. In what
follows I am going to assume you are right and concentrate on the
implementation question.
It appears from grepping through the 2.6.1 Platform directory that the
linker flags you are worried about are set in Windows-gcc.cmake. Note, it
is likely non-MinGW platforms use that file since there is already
if(MINGW) logic there so any changes you make there should also be protected
by if(MINGW).
From the name, I assume it is the CMAKE_C_LINK_EXECUTABLE variable that is
the culprit here. Try modifying that flag for the MINGW case. If that
implementation works, you should send the patch to the CMake bugtracker, and
as PLplot developer you should also store the modified Windows-gcc.cmake
file in the PLplot build system so our other MINGW users immediately benefit
from your work.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake