CVE and update status of the FreeBSD ports tree4,526 unaddressed CVEs in 616 portsAll times are CET

Port details

lang/gcc1616.1.0_3

GNU Compiler Collection 16

Maintainer
salvadore@FreeBSD.org
Packages
gcc16 16.1.0_3
Upstream
Higher version available: 16.2.0
CPE
gnu:gcc from the port
WWW
https://gcc.gnu.org
Links
cgit · VuXML

Unaddressed (1) · The CVE record lists this version as affected, no VuXML entry names the CVE

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…

VuXML only (0) · listed, port not fixed yet

None. pkg audit reports nothing for this version.

Fixed (0)

No VuXML entries for this package.

Commits (7)

Dimitry Andric (dim) · 16.1.0_3
lang/gcc16: fix build after base d08296c7ab0d

After base d08296c7ab0d7bb259bf7b8cdf9ffb819c1929ab ("libc: Implement
qualifier-preserving standard library functions"), lang/gcc16
fails to build with an error like:

  In file included from /wrkdirs/usr/ports/lang/gcc16/work/.build/gcc/include-fixed/stdio.h:52,
                   from cp-demangle.c:109:
  /wrkdirs/usr/ports/lang/gcc16/work/gcc-16.1.0/libstdc++-v3/../include/libiberty.h:225:14: error: expected identifier or '(' before '_Generic'
    225 | extern void *memrchr(const void *, int, size_t);
        |              ^~~~~~~

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

In turn, 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.

PR:		297630
Approved by:	salvadore (maintainer)
MFH:		2026Q3
19c6e313dc
Piotr Kubaj (pkubaj) · 16.1.0_3
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
Lorenzo Salvadore (salvadore) · 16.1.0_2
lang/gcc16: Fix build on arm64

GCC upstream has removed conditional definitions for some constants,
defining them directly with the same values used on Linux. However,
FreeBSD values for the same constants are different. Then revert
upstream commit.

Co-authored-by: Mark Millard <marklmi26-fbsd@yahoo.com>
PR:             294062
Reported by:    Luke Yasuda <jing@jing.rocks>
13e3a42d6e
Piotr Kubaj (pkubaj) · 16.1.0_2
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) · 16.1.0_2
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) · 16.1.0_1
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) · 16.1.0
lang/gcc16: Add port

GCC, the GNU Compiler Collection, supports a number of languages.
This port installs the C, C++, and Fortran front ends as gcc16,
g++16, and gfortran16, respectively.

This is the first release from the GCC 16 series.
It largely is a copy of lang/gcc16-devel, with release-specific
modifications from lang/gcc15.

Common issues that could happen when porting code to GCC 16:
https://gcc.gnu.org/gcc-16/porting_to.html

Changes: https://gcc.gnu.org/gcc-16/changes.html
3c75afef99