TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Practical comparison of ARM compilers

108 点作者 manchoz将近 2 年前

8 条评论

tiniuclx将近 2 年前
I&#x27;ve been using GCC &amp; friends for a few years now, building mostly for the Cortex-M23. GDB has been a godsend, with a J-Link you basically have as much runtime debugging support as you would on a hosted system. This is especially helpful in cases where logging would slow down the operation of the system too much.<p>We&#x27;re also very successfully using CMake as our build system, as opposed to Make itself. It lets you organise your build system &amp; support different configurations &amp; dependencies in a much easier way than e.g. Makefiles &amp; Git submodules, which we&#x27;ve tried in the past. When combined with the Ninja generator we&#x27;re also seeing ~20% faster compilation times.
评论 #36881486 未加载
评论 #36881429 未加载
alexlesuper将近 2 年前
I certainly didn&#x27;t predict my reddit thread (<a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;embedded&#x2F;comments&#x2F;13ozrn9&#x2F;what_is_the_value_of_using_a_proprietary_compiler&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;embedded&#x2F;comments&#x2F;13ozrn9&#x2F;what_is_t...</a>) would trigger so many discussions hackernews threads and blog posts. Glad I positively contributed to the embedded community :-)
nagisa将近 2 年前
I have not seen a compiler that incidentally ICEs (crashes) more than IAR does (experience from c. 5 yrs ago.) Early-days rustc may come close, but experience is likely skewed by my perspective as a rustc contributor too.<p>And then we were always using IAR in a way that disabled all and every optimization; if enabling them did not lead to a compiler imploding, the compiler would produce invalid machine code even for trivial examples. This defeated any possible code size benefits that IAR may have had over GCC&#x2F;Clang.<p>To top if off, I had an impression that reports of that nature weren’t really considered critical.
评论 #36881391 未加载
nona42将近 2 年前
For Armv8.M and MVE, I expect that Clang and Arm Compiler for Embedded, which is Clang&#x2F;LLVM based, generates much better code than GCC or IAR.<p>Regarding code size: the common pitfall is -Os for GCC and -Oz for Clang based compilers to optimise for minimum code size.
评论 #36881014 未加载
furtiman将近 2 年前
In my experience arm clang compiler often times produced code that is ~10-20 percent faster (hence less energy consuming) than gcc with the same optimisation levels<p>(Building bare metal code with a lot of DSP and MATMUL)
评论 #36876004 未加载
kevin_thibedeau将近 2 年前
You don&#x27;t need attributes for alignment anymore in a post-C11 world. It&#x27;s much more advisable to use alignas and avoid vendor specific ifdef soup.
bottom999mottob将近 2 年前
Gcov is great until higher-ups start demanding 100% line coverage, and you end up with hundreds of thousands of lines of unit tests. Then you gotta hire someone to check why the Jenkins builds are failing because some of your code isn&#x27;t thread safe, and running the unit tests takes longer than compiling and taking a smoke break...
jeffreygoesto将近 2 年前
I remember an ARM person stating: &quot;We thought we&#x27;re building those chips, who else could optimize for them better than us? Then we learned how little we know about C++ and the next version will be clang based.&quot;. That was back when we filed a number of RealView 4 compiler bugs...