首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >我是否可以跳过cmake编译器测试或避免"error: unrecognized option '-rdynamic'“

我是否可以跳过cmake编译器测试或避免"error: unrecognized option '-rdynamic'“
EN

Stack Overflow用户
提问于 2012-05-15 18:42:34
回答 5查看 33.6K关注 0票数 36

用于ARM目标系统的cmake (在windows上)的编译选项,但当我运行configure时,它启动了编译器测试:

代码语言:javascript
运行
复制
CMake Error at D:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "D:/Program Files/yagarto/bin/arm-none-eabi-gcc.exe" is not
  able to compile a simple test program.

  It fails with the following output:

   Change Dir: D:/merge/complex/build/CMakeFiles/CMakeTmp



  Run Build Command:D:/PROGRA~1/YAGART~1/bin/make.exe "cmTryCompileExec/fast"

  D:/PROGRA~1/YAGART~1/bin/make.exe -f
  CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  make.exe[1]: Entering directory
  `D:/merge/complex/build/CMakeFiles/CMakeTmp'

  "D:/Program Files/CMake 2.8/bin/cmake.exe" -E cmake_progress_report
  D:/merge/complex/build/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o

  "D:/Program Files/yagarto/bin/arm-none-eabi-gcc.exe" -o
  CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
  D:/merge/complex/build/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTryCompileExec

  "D:/Program Files/yagarto/bin/arm-none-eabi-gcc.exe"
  "CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o" -o cmTryCompileExec
  -rdynamic 

  arm-none-eabi-gcc.exe: error: unrecognized option '-rdynamic'

  make.exe[1]: *** [cmTryCompileExec] Error 1

使用Yagatdo 4.6.*交叉编译工具链

如何跳过此测试或修复我收到的-rdynamic错误?

EN

Stack Overflow用户

发布于 2015-06-04 19:02:04

可以将CMAKE_<LANG>_COMPILER_WORKS设置为true,以禁止对该语言进行进一步的编译器检查。

代码语言:javascript
运行
复制
set(CMAKE_C_COMPILER_WORKS 1)
票数 37
EN
查看全部 5 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10599038

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档