[cmake-developers] [CMake 0015617]: When assembler is enabled TI Compiler might end up with wrong archiver
Mantis Bug Tracker
mantis at public.kitware.com
Mon Jun 15 08:43:26 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15617
======================================================================
Reported By: Florian Reinhard
Assigned To:
======================================================================
Project: CMake
Issue ID: 15617
Category: Modules
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-06-15 08:43 EDT
Last Modified: 2015-06-15 08:43 EDT
======================================================================
Summary: When assembler is enabled TI Compiler might end up
with wrong archiver
Description:
If "ENABLE(ASM)" is used in a TI-Toolchain project and something named ar(.exe)
is present in your path, this archiver (ar) will be used and not the TI
toolchain's ar6x!
Here's why:
CMakeDetermineCCompiler.cmake (line 153, [1]) and
CMakeDetermineCXXCompiler.cmake have some special code/regex to get the
toolchain prefix and suffix. CMakeDetermineASMCompiler.cmake does not contain
this code.
What happeens?
- The ASM Compiler is processed, pre- and suffix are empty.
- CMakeFindBinUtils.cmake is processed and CMAKE_AR is filled witht he wrong
archiver
- Subsequent languages (c/cxx) will not overwrite the wrong CMAKE_AR setting.
Steps to Reproduce:
I managed to reproduce this easily on multiple machines (all windows):
1. Get a regular archiver named "ar" in your path. On windows something named
ar.exe should do the trick
2. setup a project that uses the TI Toolchain
3. use ENABLE(ASM) in yourproject
Additional Information:
[1]
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCCompiler.cmake;h=937aa8c3efe6a83acbc751aee527b7409f68b300;hb=refs/heads/master#l153
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-06-15 08:43 Florian ReinhardNew Issue
======================================================================
More information about the cmake-developers
mailing list