Go

Recommended compiler and linker flags for GCC

Did you know that when you compile your C or C++ programs, GCC will not enable all exceptions by default?  Do you know which build flags you need to specify in order to obtain the same level of security hardening that GNU/Linux distributions use (such as Red Hat Enterprise Linux and Fedora)? This article walks through a list of recommended build flags.

The GNU-based toolchain in Red Hat Enterprise Linux and Fedora (consisting of GCC programs such as gcc, g++, and Binutils programs such as as and ld)  are very close to upstream defaults in terms of build flags. For historical reasons, the GCC and Binutils upstream projects do not enable optimization or any security hardening by default. While some aspects of the default settings can be changed when building GCC and Binutils from source, the toolchain we supply in our RPM builds does not do this. We only align the architecture selection to the minimum architecture level required by the distribution.

Consequently, developers need to pay attention to build flags, and manage them according to the needs of their project for optimization, level of warning and error detection, and security hardening.

Continue reading “Recommended compiler and linker flags for GCC”

Share

Getting started with go-toolset

One of the new software collections we’ve introduced this fall is for Go, the programming language that aims to make it easy to build simple, reliable, and efficient software. Go is a compiled, statically typed language in the C/C++ tradition with garbage collection, concurrent programming support, and memory safety features.

In go-toolset-7, we’re including everything you need to start programming in Go on Red Hat Enterprise Linux 7, in the familiar format of software collections. In this release, we’re shipping golang as a Tech Preview. (NOTE: The “-7” in our toolset name is to sync with the other collections now being released, devtoolset-7, rust-toolset-7, and llvm-toolset-7.)

Continue reading “Getting started with go-toolset”

Share

Manage test dependencies with Go

Introduction

I’m working on the upstream fabric8-wit project of openshift.io. In this Go project, we embrace testing as best as we can in order to deliver a stable component. Testing acts as our safety net to allow for fast-paced feature development. This blog post is about our recent change in our testing strategy. It is not as boring as it might sound at first. 😉

Continue reading “Manage test dependencies with Go”

Share

Basics of Go in Fedora

Why use RPMs (distribution packages in general) at all ?!

Distribution RPMs enables you to get signed curated content, with security updates, bug fixes, general updates, some level of testing, and known ways of reproducing the build locally. Of course, it has its cost mostly in the package size overhead and packaging infrastructure overhead (yum, dnf, apt….).

Continue reading “Basics of Go in Fedora”

Share

Using the Kubernetes Client for Go

The Kubernetes client package for Go provides developers with a vast range of functions to access data and resources in a cluster. Taking advantage of its capabilities can allow the opportunity to build powerful controllers, monitoring and managing your cluster, beyond the scope of what is offered by stock OpenShift or Kubernetes setups.

For example, the PodInterface allows you to list, update, delete, or get specific pods either by namespace or across all namespaces. This interface is complemented by similar implementations for many other cluster resource types such as ReplicationControllers and ResourceQuotas.

Continue reading “Using the Kubernetes Client for Go”

Share