[cmake-developers] [CMake 0014880]: TI ASM rule should not use --asm_file switch

Mantis Bug Tracker mantis at public.kitware.com
Tue Apr 15 10:39:45 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14880 
====================================================================== 
Reported By:                raspy
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14880
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-04-15 10:39 EDT
Last Modified:              2014-04-15 10:39 EDT
====================================================================== 
Summary:                    TI ASM rule should not use --asm_file switch
Description: 
TI assembler is strange enough to have two different dialects: a regular file
(with .asm extension) and a linear file (with .sa extension). Both these
dialects use different switches: --asm_file or --ap_file.

If one has a linear assembly file in a project and adds ".sa" as a supported
assembler extension, the compiler will choke since the file will be provided
with --asm_file switch which is invalid. Changing --asm_file into --ap_file also
does not resolve problem, since then regular assembly files do not compile.

I suggest to drop language specification from assembly rules and allow compiler
to automatically detect language (unless there is some special support for
different ASM dialects in CMake). Therefore replace in TI-ASM.cmake:

set(CMAKE_ASM_COMPILE_OBJECT  "<CMAKE_ASM_COMPILER> --compile_only
--asm_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")

With:

set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --compile_only <DEFINES>
<FLAGS> --output_file=<OBJECT> <SOURCE>")

It would also be great if .sa extension be handled by default, like so:

Replace:

set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs)

With:

set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs;sa)


Steps to Reproduce: 
Try to add and compile any linear assembly file. These are generated for example
by tconf for use with DSPBIOS.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-04-15 10:39 raspy          New Issue                                    
======================================================================



More information about the cmake-developers mailing list