[CMake] Regression between 2.4.8 and 2.6.2 for the macada version of the gcc compiler

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Jan 28 12:48:29 EST 2009


On 2009-01-28 11:19+0100 Hendrik Sattler wrote:

> Alan W. Irwin schrieb:
>> Can somebody recommend a fix to that file so that CMake-2.6.2 works just as
>> well as CMake-2.4.8 for the macada version of the gcc compiler?
>>
>> I have no idea whether gcc should always be expected to recognize the
>> -current_version flag.
>
> http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Darwin-Options.html#Darwin-Options
> says that it is recognized as passed to the linker.
>
>> That is, I cannot conclude one way or the other
>> whether this problem is due to a macada compiler deficiency or incorrect
>> CMake-2.6.2 assumption about gcc.  However, this developer is currently
>> completely stuck because PLplot now uses 2.6.0 as the minimum version. (I
>> got tired of maintaining build-system logic for the two separate
>> versions so
>> I recently ripped out the 2.4.8-specific stuff.  It was only at that point,
>> that it turned out this developer had failed to do the requested testing of
>> 2.6.0 before the final changeover, but that is the way it often goes when
>> testing is requested.)
>
> Do both use the same linker? You could pass the -v flag to gcc for the
> link call to see what and how the linker is called.

I tried your suggestion on my own platform (Debian testing) by specifying

export CC='gcc -v'

before running cmake for the simple test project.  The result shows that
collect2 application is being used for the final link step.  If you look
that up using "info gcc", it is a wrapper for the actual linker, and there
are a number of different possibilities for what linker is actually being used.

I will ask the other developer to try gcc -v, but I am concerned that the
actual linker being used will be similarly obfuscated on his Mac OS X/macada
gcc platform.

Is there a better gcc option then -v to find out the _actual_ linker being
used?

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
__________________________


More information about the CMake mailing list