[cmake-developers] [CMake 0013745]: CHECK_C_COMPILER_FLAG doesn't work with -march=xlr option with a MIPS gcc cross compiler

Mantis Bug Tracker mantis at public.kitware.com
Tue Nov 27 04:25:57 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13745 
====================================================================== 
Reported By:                Mahendra Ladhe
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13745
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-11-27 04:25 EST
Last Modified:              2012-11-27 04:25 EST
====================================================================== 
Summary:                    CHECK_C_COMPILER_FLAG doesn't work with -march=xlr
option with a MIPS gcc cross compiler
Description: 
I 've a CMakeLists.txt file as below.

CHECK_C_COMPILER_FLAG (-march=xlr FLAG_xlr)
CHECK_C_COMPILER_FLAG (-march=xlp FLAG_xlp)

I'm using a gcc MIPS cross compiler. Using this cross compiler I'm able to 
compile a simple C program using both -march=xlr and -march=xlp compiler 
options. The size of a.out differs with these two options (just to show that
-march option is acted upon by the compiler)

When I invoke cmake on above CMakeLists.txt file, I get the following.

-- Performing Test FLAG_xlr
-- Performing Test FLAG_xlr - Failed
-- Performing Test FLAG_xlp
-- Performing Test FLAG_xlp - Success

It says Test FLAG_xlr failed, but it shouldn't fail since the cross compiler 
does support -march=xlr option.

Steps to Reproduce: 
As described above.
I cannot provide the gcc cross compiler used since it's not publicly available.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-11-27 04:25 Mahendra Ladhe New Issue                                    
======================================================================




More information about the cmake-developers mailing list