>I've scoured the cf77 docs and found nothing native so I've responded to 
>concurrent and again asked how I can find unique identifying information for 
>cmake to latch onto.  Will report back.

Please see the response below about uniquely identifying cf77.  Does this seem 
doable?  How do we proceed with rolling into CMakeDetermineFortranCompiler and 
do I have a workaround that I can use for now until this gets rolled into cmake?



Anthony,

Some commands and answers to your last email...
>Can you elaborate as to why cf77 must treat -rdynamic different from GNU 
>standard?
In many ways, cf77 pre-dates GNU.

When porting cf77 to the Linux/GNU environment, option processing was made 
GNU-like when appropriate, but without allowing legacy options to change (would 
breaking exiting customer build schemes).

In reality, cf77 treats -rdynamic as a string of individual options, which in 
this case is being parsed as:
*       -r -- Pass to ld; generate a shared object
*       -d -- A cf77 debug option.  The remainder of the option string (namic) 
is considered as additional -d flags.
Now gcc interprets -rdynamic as an individual option, and ends up not passing 
the -r to ld, but -export-dynamic, as you indicated in your email.

>The cmake developers have agreed to roll this in, I just need a way of 
>uniquely identifying cf77 from any other compiler.
Unfortunately, I don't have a nice clean solution for you.  I guess it depends 
on how much trouble the cmake developers want to go to to detect cf77.

In order to identify the compiler as cf77, do something akin to the following:
$ echo '      PROGRAM V' > /tmp/nil.f
$ echo '      END' >> /tmp/nil.f
$ cf77 -v -o /dev/null -c /tmp/nil.f 2>&1 | fgrep "Concurrent Fortran" 2>&1 | 
fgrep Concurrent
Concurrent Fortran 77 Compiler - Version  7.3 Wed Jun 17 06:52:27 2015
Alternatively, one could examine the resultant object file's DWARF information 
and extract the DW_AT_producer attribute from the DW_TAG_compilation unit DIE 
for the object file.
$ cf77 -c -g /tmp/nil.f -o /tmp/nil.o
$ readelf --debug-dump=info /tmp/nil.o | fgrep DW_AT_producer
DW_AT_producer    : Concurrent Fortran 77
In terms of identifying the major and minor versions, the information isn't as 
readily available as one would like.  The major version number is included in 
the -v output of the compiler (see above).  However, the minor version number 
is only available from the RPM:
$ rpm -qa --qf="%{NAME}-%{VERSION}\n" 'ccur-f77-[0-9]*'
ccur-f77-32-7.3-006
$ rpm -qa --qf="%{NAME}-%{VERSION}\n" 'ccur-f77-[0-9]*' | sed 
"s/^ccur-f77-..-//"
7.3-006
Note that the major version number is actually part of the RPM's "name" and the 
minor version number is the RPM's "version" (cf77 supports having multiple 
major versions of the compiler installed on one system -- hence the major 
version number being embedded in the name).
Did you receive my email regarding the cf77 man page issue?

Regards,

Jeff

This e-mail (including attachments) contains contents owned by Rolls-Royce plc 
and its subsidiaries, affiliated companies or customers and covered by the laws 
of England and Wales, Brazil, US, or Canada (federal, state or provincial). The 
information contained in this email is intended to be confidential, may be 
legally privileged and subject to export controls which may restrict the access 
to and transfer of the information. If you are not the intended recipient, you 
are hereby notified that any retention, dissemination, distribution, 
interception or copying of this communication is strictly prohibited and may 
subject you to further legal action. Reply to the sender if you received this 
email by accident, and then delete the email and any attachments.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to