[cmake-developers] patch that adds -KPIC flag to SunPro Fortran compiler

Steven Vancoillie steven.vancoillie at teokem.lu.se
Tue Mar 24 04:38:10 EDT 2015


On Mar 23 [10:33], Brad King wrote:
> On 03/23/2015 04:37 AM, Steven Vancoillie wrote:
> Thanks.  I split out the -KPIE removal:
> 
>  SunPro: Drop non-existent -KPIE flag
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=209c142f
> 
> Please rebase the revisions below on that.
> 
> The current patch does not account for differences in the
> flags for each language:
> 
> * The _VERBOSE_FLAG is -v for most languages and -# for ASM.

The verbose flags for SunPro compilers are documented as:
  Sun C compiler: -# (-v enables stricter semantic checks)
  Sun CXX compiler: -# (-v turns on -verbose=diags, seems similar)
  Sun ASM compiler: none (-v/-# are not recognized)
  Sun Fortran compiler: -v (-# works too)
Since the current verbose flags are thus not correct, I've left
this alone in this patch, as it should be pure refactoring. Maybe
they can go in a separate patch?

> * The _CREATE_PREPROCESSED_SOURCE rule for Fortran uses -F
>   instead of -E.

The _CREATE_PREPROCESSED_SOURCE rule for Fortran is now overwritten
again in the Fortran-specific file to use the -F option.

> Please revise the patch accordingly and check that the values
> set after refactoring match those from before.  It is okay for
> flags that are not shared by all languages to be set as they
> are now or overridden after the macro call.

I've attached the new patch. This does not strictly follow your
rule, as now there will be a CMAKE_ASM_COMPILE_OPTIONS_PIC variable
set because of the macro (before this was not set). Should I unset it
again in the ASM-specific file?

Steven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactor-SunPro-per-language-options-into-single-mac.patch
Type: text/x-diff
Size: 7793 bytes
Desc: 0001-Refactor-SunPro-per-language-options-into-single-mac.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150324/d5cf0dfd/attachment.patch>


More information about the cmake-developers mailing list