GCC, the GNU Compiler Collection, supports a number of languages.
This port installs the C, C++, and Fortran front ends as gcc14, g++14,
and gfortran14, respectively.
===> The following configuration options are available for gcc14-14.2.0_7:
GRAPHITE=off: Support for Graphite loop optimizations
====> Options available for the radio BOOTSTRAP: you can only select none or one of them
LTO_BOOTSTRAP=off: Build using a full LTO bootstrap
STANDARD_BOOTSTRAP=on: Build using a full bootstrap without LTO
===> Use 'make config' to modify these settings
lang/gcc1?: further improvements for powerpc64*
1. Backport of e8385ea3b57862ce6c6ace5e6973b96cf238f4b6. Fixes libgcc
on powerpc64*, found with octave crashing.
2. Merge https://gcc.gnu.org/pipermail/gcc-patches/2026-July/723975.html,
not yet upstreamed, but allows to build all the remaining failing ports
due to ld128 switch for powerpc64le.
Differential Revision: https://reviews.freebsd.org/D58116
lang/gcc1[2-6]: actually fix build on powerpc64le/CURRENT
Without this patch, gcc attempts to enable support for IBM long double,
when IEEE long double is enabled, which is wrong. Allow to only
specify IEEE long double.
The whole patchset for IEEE long double on FreeBSD/powerpc64le
is being upstreamed at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126012.
lang/gcc1[2-6]: add necessary contents to patch-gcc_configure
1. For gcc14, restore the lost content.
2. For others, add powerpc64le-related content.
Pointy hat: me
lang/gcc1?: fix runtime on powerpc64le/CURRENT
Since powerpc64le recently switched to 128-bit long double, use them to
generate proper binaries. Patches are necessary to allow use of
--with-long-double-format=ieee on FreeBSD (to be upstreamed).
lang/gcc14: Build jit only when bootstrap is on
Building jit without bootstrap does not work, so we add jit to the
enabled languages only if a bootstrap option has been selected.
Indeed, building GCC on FreeBSD with FreeBSD's default compiler
(clang) and without bootstraping it is not fully supported.
See e-mail
https://lists.freebsd.org/archives/dev-commits-ports-main/2025-August/160223.html
for more details.
Reported by: vishwin
lang/gcc14: Add comment to existing patch
Add a comment to files/patch-libgcc_unwind.inc to remember when it will
get obsolete, i.e. once all supported FreeBSD releases include commit
22e564c74eb20e14bd93fd9fdde20e38a29cfcf1.
PR: 285711
lang/gcc14: Fix SIGBUS depending on CPUTYPE
Compiling GCC with some CPUTYPE values (e.g. broadwell) result in
breaking some applications (e.g. math/octave, cad/freecad), sending a
SIGBUS.
The issue is due to GCC generating instructions that require variables
to be aligned in memory on certain CPUs. Our libthr does not have the
required alignment so these CPUs fail to execute these instructions.
The patch disables the generation of such instructions.
PR: 285711
Reported by: cracauer
Tested by: cracauer, jbo
lang/gcc14: Fix linking with libisl.so
Fix linking with libisl.so depending on GRAPHITE option, which is
now implemented through options helpers.
Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>
PR: 276070
Reported by:Ivan Rozhuk <rozhuk.im@gmail.com>
lang/gcc14: fix build on powerpc
Bootstrap is required on powerpc as well:
/usr/include/c++/v1/locale:288:32: error: attempt to use a poisoned identifier
lang/gcc*: disable building of libssp
For today's FreeBSD 14 and earlier, libssp is a nop because nothing on
FreeBSD will be referencing these headers or lib. On FreeBSD 15, it
actively breaks building with FORTIFY_SOURCE enabled and it's not worth
trying to make it work- the potential for GCC improvements comes from
the __builtin_object_size enhancement, not from these headers.
PR: 280265
Approved by: salvadore (maintainer)
lang/gcc14: Add port
GCC, the GNU Compiler Collection, supports a number of languages.
This port installs the C, C++, and Fortran front ends as gcc14,
g++14, and gfortran14, respectively.
This is the first release from the GCC 14 series.
It largely is a copy of lang/gcc14-devel, with release-specific
modifications from lang/gcc13.
Common issues that could happen when porting code to GCC 14:
https://gcc.gnu.org/gcc-14/porting_to.html
Changes: https://gcc.gnu.org/gcc-14/changes.html