[cmake-developers] [CMake 0014401]: CMake incorrectly passes C/CXX flags to assembler
Mantis Bug Tracker
mantis at public.kitware.com
Thu Sep 12 09:29:46 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14401
======================================================================
Reported By: Pawel Defee
Assigned To:
======================================================================
Project: CMake
Issue ID: 14401
Category: CMake
Reproducibility: always
Severity: major
Priority: high
Status: new
======================================================================
Date Submitted: 2013-09-12 09:29 EDT
Last Modified: 2013-09-12 09:29 EDT
======================================================================
Summary: CMake incorrectly passes C/CXX flags to assembler
Description:
When building mixed C/CXX/ASM projects, CMake incorrectly passes C/CXX compiler
options to assembler. On some platform (standard X86 GNU compilers), this is not
an issue, but in my case where I cross-compile on X86 for ARM target, the
assembler refuses to compile due to invalid options as follows:
[user at host temp]$ make
Scanning dependencies of target asmbug
[ 50%] Building CXX object CMakeFiles/asmbug.dir/main.cpp.obj
[100%] Building ASM object CMakeFiles/asmbug.dir/asmfunction.S.obj
/usr/local/embedded-cross-compilers/arm-eabi-as: unrecognized option '-O3'
make[2]: *** [CMakeFiles/asmbug.dir/asmfunction.S.obj] Error 1
make[1]: *** [CMakeFiles/asmbug.dir/all] Error 2
make: *** [all] Error 2
Steps to Reproduce:
Run CMake on the attached example project. This requires an arm cross
compilation toolchain to be installed.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-09-12 09:29 Pawel Defee New Issue
2013-09-12 09:29 Pawel Defee File Added: asmbug.tar
======================================================================
More information about the cmake-developers
mailing list