Using newer version of GCC and binutils with the FreeBSD Ports Collection

Martin Matuska

Revision: 44683
Legal Notice
Last modified on 2014-04-28 by wblock.

This article describes how to use newer versions of the GCC compilers and binutils from the FreeBSD ports tree. Custom GCC configurations are also discussed.

[ Split HTML / Single HTML ]

Table of Contents
1. Introduction
2. Prerequisites
3. Configuring ports for custom version of GCC
4. Impact on the binary performance

1. Introduction

The default system compiler as of FreeBSD 8.0 is GCC version 4.2.1. In addition, the base system of FreeBSD includes binutils version 2.15. These versions are several years old and lack, among other things, support for recent CPU instructions like SSSE3, SSE4.1, SSE4.2, etc. Due to licensing issues, new versions of these applications will not be integrated into the base system. Luckily, it is possible to use a newer version of the GCC compiler (e.g. version 4.4) with the help of the FreeBSD ports tree.

All FreeBSD documents are available for download at

Questions that are not answered by the documentation may be sent to <>.
Send questions about this document to <>.