Clang Compiling Against GCC On Ubuntu ARM Linux

Posted by Michael Larabel on June 11, 2012

Here's an update on the LLVM/Clang vs. GCC compiler benchmarking on ARM hardware under Linux.

Last month on Phoronix I shared a few basic benchmarks of GCC vs. LLVM/Clang Compilers On ARMv7 Linux. GCC 4.6.3 on Ubuntu 12.04 was doing much better than LLVM/Clang 3.0 from the Precise repository. As was realized after the fact, LLVM/Clang on ARM Linux isn't auto-detecting the processor. GCC on ARM Linux, meanwhile, was able to recognize the dual-core ARM Cortex-A9. Therefore GCC does much better "out of the box" in a standard configuration like most Linux end-users would build their software.

Thanks to the public pressure, Apple/LLVM looks like they're now working for ARM target auto-detection so that we get functionality similar to GCC on ARM Linux or x86: Request for Help: Teach ARM target to auto-detect cpu / subtarget features. This is a current deficiency of LLVM on ARM.

For those interested, below are some updated ARM compiler benchmarks under Linux. In this article is a development snapshot of Ubuntu 12.10 while testing GCC 4.7.0 and LLVM/Clang 3.0. The benchmarking was still being done from a PandaBoard ES with Texas Instruments OMAP4460 dual-core ARM Cortex-A9 development board. Via the CFLAGS/CXXFLAGS, -march=armv7-a was passed to each compiler.

GCC 4.7 has a small advantage over LLVM/Clang 3.0 in the TSCP chess computational benchmark.

7-Zip compression on the Texas Instruments' PandaBoard ES is now faster with the LLVM/Clang compiler than the latest GCC release.

GCC is still superior for the multi-core C-Ray ray-tracing benchmark.

Additional information is available via OpenBenchmarking.org. You can also compare your x86/ARM performance with these benchmarks to the ARMv7 results by running phoronix-test-suite benchmark 1206060-SU-LLVMCLANG78. More tests are forthcoming.


Recent work on the ARM Linux cluster from the Phoronix office.

Also check out the cheap 12-core 13-Watt Ubuntu Linux ARM cluster and Ubuntu 12.10 Sets To Make ARM Even Stronger. On the x86 side there is the recent 11-way code compiler comparison on Intel's Ivy Bridge platform.

Discuss this article in our forums, IRC channel, or email the author. You can also follow our content via RSS and on social networks like Facebook, Identi.ca, and Twitter (@Phoronix and @MichaelLarabel). Subscribe to Phoronix Premium to view our content without advertisements, view entire articles on a single page, and experience other benefits.
Latest Hardware Reviews
  1. Intel Haswell HD Graphics 4600 vs. AMD Radeon Graphics On Linux
  2. Intel Haswell HD Graphics 4600 Performance On Ubuntu Linux
  3. Intel Core i7 4770K "Haswell" Benchmarks On Ubuntu Linux
  4. The First Experience Of Intel Haswell On Linux
Latest Software Articles
  1. Optimized Binaries Provide Great Benefits For Intel Haswell
  2. 11-Way Linux, BSD Platform Comparison
  3. SNA Acceleration Works Great For Intel Core i7 Haswell
  4. The Linux Evolution For Intel Haswell's Performance
Latest Linux News
  1. KDE's KWin Made Lots Of Progress In 4.11
  2. Ubuntu Announces Carrier Advisory Group
  3. Qt 5.1 Release Candidate 1 Has Arrived
  4. In-Fighting Continues Over Mir On Non-Unity Ubuntu
  5. Subversion 1.8 Presents New Features
  6. LLVM 3.3 Officially Released
  7. LLVM/Clang Now Uses Loop Vectorizer At New Levels
  8. Intel GPU Driver Tries To Rip Out FBDEV Support
  9. Coreboot Doing AMD USB 3.0, Q35 QEMU Emulation
  10. VP9 Codec Now Enabled By Default In Chrome
  11. openSUSE 13.1 M2 Plays On PulseAudio 4.0
Latest Forum Talk
  1. Intel GPU Driver Tries To Rip Out FBDEV Support
  2. In-Fighting Continues Over Mir On Non-Unity Ubuntu
  3. Ubuntu Announces Carrier Advisory Group
  4. Vote for GOG to add Linux versions of games they...
  5. Intel Haswell HD Graphics 4600 vs. AMD Radeon...
  6. Mir Still Causing Concerns By Ubuntu Derivatives
  1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Motherboards
  5. Peripherals
  6. Processors
  7. Software
  8. Operating Systems
  9. All Articles
  1. Linux Benchmarking
  2. OpenBenchmarking.org
  3. Phoronix Test Suite