Compilers

Find quick reference materials for GCC, Clang/LLVM, Go, and Rust compilers for Red Hat Enterprise Linux.

 

Red Hat Developer Toolset delivers the latest stable versions of essential GCC C, C++, Fortran, and supporting development tools to enhance developer productivity and improve deployment times. Available on Red Hat Enterprise Linux 6 and 7 via most Red Hat Enterprise Linux subscriptions, Red Hat Developer Toolset makes it possible to compile once and deploy to multiple versions of Red Hat Enterprise Linux. Components include GCC, GDB, SystemTap, OProfile, and more. Eclipse IDE and Git are also available via a separate installation.

gnu

GCC

GCC is the featured component of Red Hat Developer Toolset (see above) which includes:

  • A full development toolset of GCC (C, C++, and Fortran), GDB, SystemTap, Valgrind, OProfile, and much more.
  • Frequent updates - DTS for Red Hat Enterprise Linux 7 is updated semi-annually.
  • Red Hat developer support - each major update is supported for 2 years.
  • Upwards compatible compiling:  compile on one major Red Hat Enterprise Linux release, and then deploy on both that version and the next major release.
  • Red Hat Developer Toolset also delivers the latest stable tools faster to help developers more quickly create, diagnose, and debug applications in development.

When installed, Red Hat Developer Toolset does not replace the default system tools included with Red Hat Enterprise Linux 6 or 7. Instead, a parallel set of newer tools is provided for optional use by developers. The default compiler and debugger, for example, remain those in the base Red Hat Enterprise Linux system.

The companion tool, Eclipse IDE, is also available.

 

Get to Hello World

clang

Clang/LLVM

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies, with a primary focus on these two compilers:

  • The LLVM back-end compiler and core libraries provide a modern source- and target-independent optimizer, along with code generation support for the RHEL CPU architectures.

  • Clang is an “LLVM native” C/C++/Objective-C compiler, which aims to deliver amazingly fast compiles, extremely useful error and warning messages and to provide a platform for building great source level tools. The Clang Static Analyzer is a tool that automatically finds bugs in your code, and is a great example of the sort of tool that can be built using the Clang frontend as a library to parse C/C++ code.

 

Get to Hello World

Golang

Go

The Go language is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It’s a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

 

Get to Hello World

Rust

Rust

Rust is an open-source systems programming language created by Mozilla and a community of volunteers, designed to help developers create fast, secure applications which take full advantage of the powerful features of modern multi-core processors. It prevents segmentation faults and guarantees thread safety, all with an easy-to-learn syntax.

In addition, Rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads with no data races, trait-based generics, pattern matching, type inference, and efficient C bindings, with a minimum runtime size.

Also included is cargo, a build system and dependency manager for Rust.

 

Get to Hello World

Learn More about Compilers

secure coding
Article
07/04/2023

A developer’s guide to secure coding with FORTIFY_SOURCE

Learn how the FORTIFY_SOURCE feature in the GNU C library improves C code security by detecting and preventing buffer overflow, and more.

Featured image for: Automating the testing process for SystemTap, Part 1: Test automation with libvirt and Buildbot.
Article
06/30/2023

ISystemTap: An interactive SystemTap notebook

Get an introduction to ISystemTap, a Jupyter kernel for Linux operating systems that helps you write and run SystemTap scripts.

Article
06/19/2023

Debugging in GDB: Create custom stack winders

Learn how to create custom stack unwinders for the GNU Project Debugger using GDB’s Python API with this in-depth tutorial.

Featured image for: Value range propagation in GCC with Project Ranger.
Article
05/31/2023

Improvements to static analysis in the GCC 13 compiler

The latest version of the GNU Compiler Collection, GCC 13, includes enhancements to -fanalyzer, a static analysis pass that can identify issues at