This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM2434:使用并行编译时、tiarmlink(具有-flto)中可能的竞态条件 (TI ARM CGT 3.2.2 LTS)

Guru**** 2374090 points
Other Parts Discussed in Thread: AM2434
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1529135/am2434-possible-race-condition-in-tiarmlink-with--flto-when-using-parallel-build-ti-arm-cgt-3-2-2-lts

器件型号:AM2434

工具/软件:

尊敬的 TI 团队:

我想我遇到了一个与相关的错误  链接时优化 (LTO)   tiarmlink 工具中使用  TI ARM CGT 3.2.2 LTS

设置:

  • 构建系统:  CMake  一方  Makefile 生成器
  • 目标:  Sitara AM2434 、使用  两个 R5 内核
  • 工具链:  TI ARM 编译器工具 3.2.2 LTS
  • 我们构建多个静态库并链接两个可执行文件(每个内核一个)
  • 通过 -flto 标志启用 LTO

问题:

  • 生成内容  可靠地成功  运行时  保持并行性
  •  --parallel 与 CMake(即)一起使用时 make -jN、构建  链接期间偶尔出现故障
  • 带来问题  仅与一起出现  -flto没有它,构建是稳定的
  • 误差略有不同、这表明了一种可能  中的竞争条件  tiarmlink

错误片段:

示例 1:

[100%] Linking CXX executable CommunicationCore_lp_r5_1-0.out
../../master/ELFLNK/symbol.c:880:internal fatal error #10158: ("sprintf")

INTERNAL ERROR: ...\tiarmlnk executed an illegal instruction

This is caused by a defect in the TI Linker.
TI Customer Support may be able to suggest a workaround to avoid this.
...

示例 2:

[ 97%] Linking CXX executable CommunicationCore_lp_r5_1-0.out
[100%] Linking CXX executable ControllerCore_lp_r5_0-0.out
llvm-lto2: .../_Build/_Temp\100: Malformed block
tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)

结语:

这似乎指向链接器 LTO 阶段的并发问题。 以前是否报告过此情况? 在较新版本的工具链中是否有已知的权变措施或修复?

此致、
Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    版本 3.2.3.LTS 中修复了与您的版本相同的问题。  注意除错误修复之外、此版本与版本 3.2.2.LTS 相同。  因此,它是一个简单的升级。

    谢谢。此致、

    -乔治

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    谢谢您的信息,我们将尝试它!