GCC, the GNU Compiler Collection, supports a number of languages.
This port installs the C, C++, and Fortran front ends as gcc15, g++15,
and gfortran15, respectively.
===> The following configuration options are available for gcc15-15.2.0_4:
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/gcc15: fix build after base d08296c7ab0d
After base d08296c7ab0d7bb259bf7b8cdf9ffb819c1929ab ("libc: Implement
qualifier-preserving standard library functions"), lang/gcc15 fails to
build with errors like:
/wrkdirs/usr/ports/lang/gcc15/work/gcc-15.2.0/libgomp/affinity-fmt.c: In
function 'gomp_display_affinity':
/wrkdirs/usr/ports/lang/gcc15/work/gcc-15.2.0/libgomp/affinity-fmt.c:330:25:
error: initialization discards 'const' qualifier from pointer target type
[-Werror=discarded-qualifiers]
330 | char *q = strchr (p + 1, '}');
| ^~~~~~
and:
In file included from
/wrkdirs/usr/ports/lang/gcc15/work/.build/gcc/include-fixed/stdio.h:52,
from cp-demangle.c:109:
(Only the first 15 lines of the commit message are shown above )
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/gcc15: 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/gcc15: Unbreak on aarch64
FreeBSD defines ElfW(x) to translate Linux's convention to FreeBSD's convention.
GCC defines ElfW to convert its convention to FreeBSD's convention. This patch
removes the conversion defined by GCC so that the FreeBSD conversion only is
applied.
Co-authored-by: Mark Millard <marklmi26-fbsd@yahoo.com>
PR: 282797
Reported by: John F. Carr <jfc@mit.edu>
Email Thread:
https://lists.freebsd.org/archives/freebsd-toolchain/2025-May/002282.html
lang/gcc15:
lang/gcc15: Add port
GCC, the GNU Compiler Collection, supports a number of languages.
This port installs the C, C++, and Fortran front ends as gcc15,
g++15, and gfortran15, respectively.
This is the first release from the GCC 15 series.
It largely is a copy of lang/gcc15-devel, with release-specific
modifications from lang/gcc14.
Common issues that could happen when porting code to GCC 15:
https://gcc.gnu.org/gcc-15/porting_to.html
Changes: https://gcc.gnu.org/gcc-15/changes.html
Note: files/patch-libgcc_unwind.inc will get obsolete once all supported
FreeBSD releases include commit
22e564c74eb20e14bd93fd9fdde20e38a29cfcf1. [1]
PR: 285711 [1]