CVE and update status of the FreeBSD ports tree3,864 unaddressed CVEs in 671 portsAll times are CET
Port details

lang/gcc15 15.2.0_4

GNU Compiler Collection 15

Port info

Maintainer
salvadore@FreeBSD.org
Packages
latest: 15.2.0_4
Upstream
up to date
Last update
to 15.2.0_4 · 23544948cb
Quarterly
2026Q4: 15.2.0_4
WWW
https://gcc.gnu.org
Links
cgit · VuXML

Install

Package
# pkg install gcc15
installs 15.2.0_4 from latest; from quarterly (2026Q4) 15.2.0_4
Port
# cd /usr/ports/lang/gcc15 && make install clean
# make -C /usr/ports/lang/gcc15 config  # change options first
Size
102 MiB download · 388 MiB installed
Depends on
devel/binutils 2.44,1, math/gmp 6.3.0, math/mpc 1.4.1, math/mpfr 4.2.2,1, print/indexinfo 0.3.1_1
License
GPLv3 and GPLv3RLE
Options
2 of 4 on in the package: MULTILIB STANDARD_BOOTSTRAP
Show the 2 options that are off
GRAPHITE LTO_BOOTSTRAP
pkg-message
Shown after installing
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc15

For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.

Packages by version and architecture

latest

FreeBSD versionamd64aarch64i386
FreeBSD 1615.2.0_415.2.0_4–
FreeBSD 1515.2.0_415.2.0_4–
FreeBSD 1415.2.0_415.2.0_415.2.0_4

quarterly (2026Q4)

FreeBSD versionamd64aarch64i386
FreeBSD 1515.2.0_415.2.0_4–
FreeBSD 1415.2.0_415.2.0_415.2.0_4

version as in the ports tree (latest) or the most common one (quarterly) · different version · ✗ not built · – no packages for this platform. Package sets that have not been rebuilt for 60 days are left out.

Unaddressed and VuXML only (0)

No unaddressed CVE and nothing reported by pkg audit for the packaged version 15.2.0_4.

Not counted (1)

CVEs that match this port only loosely: inherited from the whole project, or with versions that cannot be compared. What does this mean?

1 with versions that cannot be compared
The CVE record gives dates or the port uses snapshot versions (or the other way round), so the version of this port cannot be placed in the affected range.
CVECVSSPublishedDescription
CVE-2023-40394.82023-09-13**DISPUTED**A failure in the -fstack-protector feature in GCC-based toolchains that target AArch64 allows an attacker to exploit an existing buffer overflow in dynamic…

Fixed (0)

No VuXML entries for this package.

Problem reports (0) · open in Bugzilla, most recently changed first

None.

Commits (11)

Tijl Coosemans (tijl) · 15.2.0_4
*/*: Cleanup use of CONFIGURE_TARGET

Since 4d1f8f16c1c9 replacing amd64 with x86_64 is not necessary.
23544948cb
Dimitry Andric (dim) · 15.2.0_4 MFH 2026Q3 ✓
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:
  /wrkdirs/usr/ports/lang/gcc15/work/gcc-15.2.0/libstdc++-v3/../include/libiberty.h:225:14: error: expected identifier or '(' before '_Generic'
    225 | extern void *memrchr(const void *, int, size_t);
        |              ^~~~~~~

The former is because strchr with a 'const char *' input now returns a
'const char*'. This is easily fixed by making 'q' a 'const char *' too.

The latter is because memrchr is now a macro, similar to the other
functions in <string.h>, and libiberty.h attempts to incorrectly
redeclare it.

This is because cp-demangle.c includes libiberty.h, but does not include
the config.h generated for libiberty.h, instead using the config.h
generated for libstdc++.

The problem is really with the way upstream creates its config.h
headers: they should either make libiberty.h automatically include its
own config.h file, or rename that one to libiberty-config.h, so it can
be included at the same time as the libstdc++ config.h header.

The easiest way to fix it is to add a '!defined(__FreeBSD__)'
conditional to the #if statement that attempts to declare the
incompatible memrchr.

Approved by:	salvadore (maintainer)
PR:		297601
MFH:		2026Q3
955eda5e75
Piotr Kubaj (pkubaj) · 15.2.0_4
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
cd7c885d05
Piotr Kubaj (pkubaj) · 15.2.0_3
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.
70f1f8cf77
Piotr Kubaj (pkubaj) · 15.2.0_3
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
35a12271a3
Piotr Kubaj (pkubaj) · 15.2.0_2
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).
c02c1227e2
Lorenzo Salvadore (salvadore) · 15.2.0_1
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
b6f9ddb365
Piotr Kubaj (pkubaj) · 15.2.0_1
lang/gcc1{5,6}{,-devel}: drop USE_GCC on powerpc64*

Builds fine.
5e3e3ce9d0
Lorenzo Salvadore (salvadore) · 15.2.0
lang/gcc15: Update to 15.2.0

Changes: https://gcc.gnu.org/gcc-15/changes.html#15.2
acec5d58f7
Lorenzo Salvadore (salvadore) · 15.1.0_1
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:
7ea3d17abb
Lorenzo Salvadore (salvadore) · 15.1.0
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]
bfcb6f38f0