FreeBSD 10 To Use Clang Compiler, Deprecate GCC


Recommended Posts

FreeBSD 10 To Use Clang Compiler, Deprecate GCC

As indicated by the Q1-2012 FreeBSD Status Report, LLVM's Clang compiler is quickly replacing GCC for this popular BSD operating system. The developers are also making much progress in a GNU-free C++11 stack. For FreeBSD 10 they're aiming for Clang as the default C/C++ compiler, deprecate GCC, and to have a BSD-licensed C++ stack.

While the Q1-2012 FreeBSD Status Report was just talked about in the afore-linked article, the Clang and C++ items warranted their own more detailed article.

Going back to 2009, FreeBSD developers have worked to replace GCC with LLVM/Clang. Over time, there's been numerous improvements especially with the FreeBSD 9.0 release. The FreeBSD developers are interested in doing away with the GPL-licensed GNU Compiler Collection and instead use the Apple-sponsored LLVM/Clang work that's under a BSD-like license.

As reported in the status report for the last quarter, Clang 3.0 is now installed by default for FreeBSD 10.0-CURRENT and 9.0-STABLE. They're also working to import a newer Clang snapshot since LLVM 3.1 and Clang 3.1 are about to be released (next week). On FreeBSD 10.0-CURRENT, Clang can now build world and the generic FreeBSD kernel without emitting any error warnings. With more recent revisions, a new WITH_CLANG_IS_CC option will make Clang become the default cc, c++, and cpp commands.

The intent is to make Clang become the default compiler for FreeBSD 10.0 and to then deprecate GCC from FreeBSD. "The intent is to switch on this option by default rather sooner than later, so we can start preparing for shipping 10.0-RELEASE with Clang as as the default system compiler, and deprecating gcc."

Additional information on building FreeBSD with Clang is available from this FreeBSD.org Wiki page. Any FreeBSD package not building under Clang should be treated as a bug; "One of the most important tasks at the moment is to actually build and run your entire FreeBSD system with Clang, as much as possible. Any compile-time or run-time problems should be reported to the appropriate mailing list, or filed as a PR. If you have patches and/or workarounds, that would be even better."

There's also been other non-Apple operating systems toying with Clang for different use-cases. There was also the Debian Clang experiment, which could build most of the Debian packages for popular architectures, but LLVM/Clang still falls behind in its support of the more obscure CPU architectures and platforms compared to GCC. Some vendors have also been playing around with the idea of using Clang to build the Linux kernel (it's possible to do with certain kernel configurations, patches, and other headaches).

LLVM/Clang is unlikely to replace GCC on any tier-one Linux distribution as the default in the foreseeable future, but it's interesting as a complementary option. Clang is quite good with its static analysis abilities, among other benefits.

In terms of FreeBSD's mission for a GNU-free C++11 stack, the libc++ and libcxxrt libraries have gained new features, support for the ARM EABI, and with Clang 3.1 can now pass all C++11 atomic tests. The libcxxrt library is the new C++ run-time that was given by PathScale. There's still some work ahead in this area, but the status report mentions, "we're on track for a BSD licensed C++ stack in 10.0."

Source: Phoronix

This topic is now closed to further replies.
  • Posts

    • Google reportedly limited Meta's Gemini access over limited AI compute by Karthik Mudaliar Google is reportedly limiting Meta's use of its Gemini AI models after Meta tried buying more computing capacity than even Google could supply. According to the Financial Times, Google told Meta in March that it could not provide the full Gemini capacity that Meta had requested. This shortfall even disrupted and delayed some of Meta's internal projects. Due to this, Meta even told its employees internally to use AI tokens more efficiently. Meta wasn't the only one to get hit by this sudden refusal by Google; even other customers were affected. But Meta was hit harder because of its unusually high demand for Google's models. The move from Google makes it evident that companies all over are in limited supply of both infrastructure and compute. Alphabet said in April that Google Cloud revenue grew 63% year-over-year to $20 billion in the first quarter, helped by enterprise AI infrastructure and AI solutions. In pursuit of more compute, Meta had earlier signed a multi-billion-dollar AWS agreement as well as a large AMD GPU deal for AI data centers. But the crunch would be short-lived as both Meta and Google have also ramped up infrastructure investments heavily. Meta said in November that it was committing more than $600 billion in the U.S. by 2028 for AI technology, infrastructure, and workforce expansion. In the first quarter of this year, Meta also raised its expected capital expenditure for 2026 to a range of $125 billion to $145 billion, citing higher component pricing and additional data center costs for future capacity. However, this doesn't make the company immune to the current dependence on outside suppliers. Meta has also spent many years promoting Llama as an open-weight alternative to closed models from Google, OpenAI, and Anthropic. But if the reported reliance on Google's Gemini models is severe enough for internal work to get impacted, then it looks like even frontier labs and Big Tech aren't fully self-sufficient. Source: Financial Times
    • I like to reminisce about the good old days, way back in autumn 2025 when building a gaming machine was fun and the drives were about $150 when you caught a deal. Yes duh, back in the day we had it gone. Then baby Skynet came along, hiding in AI datacenters demanding more processing power until it reached singularity. End of a not totally fictional story.
    • My experience in the past with older Windows 11 builds was not great on unsupported machines but I recently used Rufus to put the latest build on a older 5th Gen Core Thinkpad T that we upgraded with a SATA SSD and 8GB of RAM four years ago when hardware was reasonable and it seemed pretty fast and solid. Customer is very happy with the performance and will probably get four more years out of that venerable laptop that he loves so much. Another customer just retired his Dell Studio laptop from 2009 running Windows 10. It got an SSD over 10 years ago and did everything he needed it to for 17 years but he also retired last year and is happy doing everything on his iPad now.
    • Apple's newest AirTag 2 gets first big discount by Taras Buria In late January 2026, Apple introduced its second-generation AirTag trackers, bringing a refresh to the old model that has been on the market for half a decade. Now, you can get these new trackers at an all-time low price, thanks to the first big discount that brought the price down by 17% on Amazon. While the second-generation AirTag looks identical to its predecessor, it packs meaningful upgrades inside. The second-gen ultrawideband chip works 50% farther than the original AirTag, allowing you to detect lost items in a wider range. In addition, the second-generation AirTag features an upgraded Bluetooth chip for extended range and a significantly louder speaker (up to 50%) so that you can hear it better when locating a lost item. Note that the second-gen AirTag only works with iPhones and iPads that run iOS/iPadOS 26 and newer, so you need a compatible device to use the tracker. Like the original AirTag, the AirTag 2 is available in two packs: one and four pieces. Both are now available at a notable discount on Amazon, and you can purchase them using the links below. Apple AirTag 2 tracker - $24 | 17% off on Amazon Apple AirTag 2 tracker (four-pack) - $89 | 10% off on Amazon Good to know This Amazon deal is U.S.- specific and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • I've been on Deezer for over a decade, but glad that Tidal joined them in fighting AI slop. Can't stand such takes as Spotify's: "Spotify's CEO recently pushed back against listeners who call AI music "slop," urging people to stop using the term and instead embrace the creative potential of AI music."
  • Recent Achievements

    • Reacting Well
      NovaEdgeX earned a badge
      Reacting Well
    • Week One Done
      NovaEdgeX earned a badge
      Week One Done
    • One Year In
      BA the Curmudgeon earned a badge
      One Year In
    • Conversation Starter
      rosiecharles earned a badge
      Conversation Starter
    • First Post
      KMilenkoski1202 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      536
    2. 2
      +Edouard
      265
    3. 3
      PsYcHoKiLLa
      150
    4. 4
      Steven P.
      98
    5. 5
      macoman
      66
  • Tell a friend

    Love Neowin? Tell a friend!