Port details |
- gcc12 GNU Compiler Collection 12
- 12.4.0_1 lang
=5 12.4.0Version of this port present on the latest quarterly branch. - Maintainer: salvadore@FreeBSD.org
 - Port Added: 2022-05-06 18:12:06
- Last Update: 2025-02-10 18:18:05
- Commit Hash: 6f5f51a
- People watching this port, also watch:: binutils, nmap, samba416, samba419, python39
- License: GPLv3 GPLv3RLE
- WWW:
- https://gcc.gnu.org
- Description:
- GCC, the GNU Compiler Collection, supports a number of languages.
This port installs the C, C++, and Fortran front ends as gcc12, g++12,
and gfortran12, respectively.
Gerald Pfeifer <gerald@FreeBSD.org>
¦ ¦ ¦ ¦ 
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - Dependency lines:
-
- Conflicts:
- CONFLICTS:
- To install the port:
- cd /usr/ports/lang/gcc12/ && make install clean
- To add the package, run one of these commands:
- pkg install lang/gcc12
- pkg install gcc12
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: gcc12
- Flavors: there is no flavor information for this port.
- ONLY_FOR_ARCHS: aarch64 amd64 armv6 armv7 i386 powerpc powerpc64 powerpc64le riscv64
- distinfo:
- TIMESTAMP = 1724162795
SHA256 (gcc-12.4.0.tar.xz) = 704f652604ccbccb14bdabf3478c9511c89788b12cb3bbffded37341916a9175
SIZE (gcc-12.4.0.tar.xz) = 83377372
No package information for this port in our database- Sometimes this happens. Not all ports have packages. Perhaps there is a build error. Check the fallout link:

- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- as : devel/binutils
- gmake>=4.4.1 : devel/gmake
- makeinfo : print/texinfo
- as : devel/binutils
- perl5>=5.36<5.37 : lang/perl5.36
- Runtime dependencies:
-
- as : devel/binutils
- indexinfo : print/indexinfo
- Library dependencies:
-
- libgmp.so : math/gmp
- libmpfr.so : math/mpfr
- libmpc.so : math/mpc
- This port is required by:
- for Build
-
- astro/R-cran-maptools
- astro/nightfall
- benchmarks/himenobench
- benchmarks/polygraph
- biology/R-cran-Biobase
- biology/R-cran-BiocGenerics
- biology/psi88
-
Deleted ports which required this port:
- for Libraries
-
- sysutils/arcconf
-
Deleted ports which required this port:
- for Run
-
- astro/R-cran-maptools
- astro/nightfall
- benchmarks/himenobench
- benchmarks/polygraph
- biology/R-cran-Biobase
- biology/R-cran-BiocGenerics
- biology/psi88
-
Deleted ports which required this port:
- * - deleted ports are only shown under the This port is required by section. It was harder to do for the Required section. Perhaps later...
Configuration Options:
- ===> The following configuration options are available for gcc12-12.4.0_1:
GRAPHITE=off: Support for Graphite loop optimizations
MULTILIB=on: Build support for 32-bit and 64-bit targets
====> 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
- Options name:
- lang_gcc12
- USES:
- compiler:c++11-lang cpe gmake iconv libtool makeinfo perl5 tar:xz
- pkg-message:
- For install:
- 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/gcc12
For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
- Master Sites:
|
Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
Commit | Credits | Log message |
12.4.0_1 10 Feb 2025 18:18:05
    |
Lorenzo Salvadore (salvadore)  Author: Dimitry Andric |
lang/gcc12: Fix segfaults for static binaries
Fix segmentation faults caused by -static flag into compiled binaries.
Email thread:
https://lists.freebsd.org/archives/freebsd-hackers/2025-January/004236.html
Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685
PR: 284441
Reported by: kargl |
12.4.0 29 Oct 2024 23:54:20
    |
Kyle Evans (kevans)  |
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) |
12.4.0 03 Sep 2024 15:45:41
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Update to 12.4.0
Changes: https://gcc.gnu.org/gcc-12/changes.html#12.4
PR: 281091
Tested by: exp-run (antoine) |
12.3.0 13 May 2024 21:19:50
    |
Robert Clausecker (fuz)  |
lang/gcc12: enable for riscv64
Builds fine on riscv64 15-CURRENT.
PR: 272759
Approved by: salvadore (maintainer)
MFH: 2024Q2 |
12.3.0 03 Feb 2024 09:57:04
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Update to 12.3.0
Changes: https://gcc.gnu.org/gcc-12/changes.html#12.3
PR: 273397
Tested by: exp-run (antoine) |
12.2.0_9 03 Feb 2024 09:57:04
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc{12,13}: Switch back to standard bootstrap
Switch back to STANDARD_BOOTSTRAP on i386, amd64 and aarch64 as default
option instead of LTO_BOOTSTRAP, forwarding the changes already commited
in the devel ports (commits daf12c76bd531335f58e7602afd3bc8da8fc5c33,
872d61f8ead10a6d935117876cf60057a46770ff, and
da4cb11216a7ed594d5dc453deb4693b48c3c7e9) and in lang/gcc11 (commit
3e0fc5e7607d30400bfb3d5a7b3d1b77e1a6699a)
Users wanting to use LTO_BOOTSTRAP can still enable the option manually.
PR: 273397
Tested by: exp-run (antoine) |
12.2.0_8 27 Jan 2024 00:30:41
    |
Muhammad Moinur Rahman (bofh)  |
lang/gcc12: Moved man to share/man
Approved by: portmgr (blanket) |
12.2.0_7 05 Jan 2024 21:04:07
    |
Piotr Kubaj (pkubaj)  |
lang/gcc12: drop ELFv1 support |
12.2.0_7 31 Dec 2023 00:37:05
    |
Muhammad Moinur Rahman (bofh)  |
*/*: Sunset 12.4-RELEASE/12-STABLE from ports tree
- Remove all references to defunct ARCH arm
- Remove all references to defunct ARCH sparc64
- Remove x11-drivers/xf86-video-sunffb which requires defunct sparc64
ARCH
- Remove sysutils/afbinit requires defunct sparc64 ARCH
- Remove all references to bktr driver
- Remove all references to defunct FreeBSD_12
- Remove all references to OSVERSION/OSREL corresponding to 12
- Remove conditionals in Mk/Uses/cabal.mk
- Remove sparc reference from Mk/Uses/qt-dist.mk
- Remove BROKEN_sparc64/NOT_FOR_ARCH=sparc64
- Remove BROKEN_FreeBSD_12* from:
- Remove OpenSSL patches from:
- Remove conditional flags for OSVERSION >= 1300000 to fixed flags.
Also move conditional flags for non sparc64/arm ARCH to fixed flags.
Reviewed by: brooks, jbeich, rene, salvadore
Differential Revision: https://reviews.freebsd.org/D42068 |
12.2.0_7 15 Dec 2023 20:36:59
    |
Dimitry Andric (dim)  |
lang/gcc12 lang/gcc12-devel lang/gcc13 lang/gcc13-devel lang/gcc14-devel: fix
build without bootstrap
When more recent gcc ports are built without bootstrap, compiling libcc1
plugins results in errors similar to:
In file included from
/wrkdirs/share/dim/ports/lang/gcc13/work/gcc-13.2.0/libcc1/libcc1plugin.cc:72:
In file included from /usr/include/c++/v1/vector:321:
In file included from /usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /usr/include/c++/v1/__format/formatter_integral.h:32:
/usr/include/c++/v1/locale:289:36: error: attempt to use a poisoned identifier
289 | __status = (unsigned char*)malloc(__nkw);
| ^
/usr/include/c++/v1/locale:1584:28: error: attempt to use a poisoned
identifier
1584 | __ob =
(char_type*)malloc(2*static_cast<size_t>(__nc)*sizeof(char_type));
| ^ (Only the first 15 lines of the commit message are shown above ) |
12.2.0_7 05 Dec 2023 18:11:27
    |
Thierry Thomas (thierry)  |
lang/gcc12: install ISO_Fortran_binding.h in a separate directory
ISO_Fortran_binding.h is sometimes needed for the support of Fortran
2018, e.g. MPICH must find it to build mpi_f08.mod.
ATM it is installed in a directory depending on $CONFIGURE_TARGET with
a complex path, and it is not possible to point CFLAGS towards this dir
because other headers (like stdatomic.h) would conflict with those from
the system.
Therefore create a new directory /usr/local/include/gcc12 to install
this header.
PR: 275431
Approved by: salvadore@ (maintainer) |
12.2.0_6 06 Oct 2023 17:48:53
    |
Dimitry Andric (dim)  |
lang/gcc10 lang/gcc11 lang/gcc11-devel lang/gcc12 lang/gcc12-devel lang/gcc13
lang/gcc13-devel lang/gcc14-devel: fix build with libc++ 17
When building relatively recent gcc ports (with C++ in them) against
libc++ 17, you get errors similar to:
In file included from
/wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/cp/module.cc:208:
In file included from
/wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/gcc/system.h:239:
In file included from /usr/include/c++/v1/vector:321:
In file included from /usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /usr/include/c++/v1/locale:202:
/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute only
applies to structs, variables, functions, and namespaces
546 | _LIBCPP_INLINE_VISIBILITY
| ^
/usr/include/c++/v1/__config:813:37: note: expanded from macro
'_LIBCPP_INLINE_VISIBILITY' (Only the first 15 lines of the commit message are shown above ) |
12.2.0_6 19 Jun 2023 13:39:01
    |
Piotr Kubaj (pkubaj)  |
lang/gcc12: check for CPUTYPE being defined
Reported by: freshports |
19 Jun 2023 13:18:06
  
|
Piotr Kubaj (pkubaj)  |
lang/gcc12: fix build on powerpc64* with CPUTYPE?=g[3-5]
GCC doesn't support -mcpu=g4, but it supports -mcpu=G4. Same for g3 and g5. |
12.2.0_6 12 May 2023 15:39:47
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Work around aarch64 extraction bug
Extraction fails with poudriere on aarch64 with the following error:
=> SHA256 Checksum OK for gcc-12.2.0.tar.xz.
tar: Pathname can't be converted from UTF-8 to current locale.
tar: Pathname can't be converted from UTF-8 to current locale.
tar: Error exit delayed from previous errors.
Enforcing use of bsdtar works around the issue. The issue is specific to
lang/gcc11 and lang/gcc12: no other GCC port is affected.
See also bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246670.
PR: 271052
Reported by: Vidar Karlsen <vidar@karlsen.tech>
Reviewed by: gerald, mikael |
12.2.0_6 23 Apr 2023 09:09:58
    |
Gerald Pfeifer (gerald)  |
*: Bump PORTREVISIONs for math/mpc update to 1.3.1 |
12.2.0_5 03 Feb 2023 15:11:03
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Mark PIE_UNSAFE
Building the port with WITH_PIE fails if STANDARD_BOOTSTRAP or
LTO_BOOTSTRAP option is enabled.
Mark PIE_UNSAFE when such an option is enabled until a better solution
is found.
PR: 268901
Reported by: netchild |
12.2.0_5 30 Nov 2022 12:52:57
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Re-execute program with ASLR disabled when necessary
Software compiled with -fsanitize=address needs ASLR to be disabled to
run successfully.
Add patches taken from the commits listed below that improve ASLR
detection and re-execute the program with ASLR disabled if necessary.
https://cgit.freebsd.org/src/commit/?id=7cafe89f9ce33effe6e471b185339d413da1ca46
https://cgit.freebsd.org/src/commit/?id=930a7c2ac67e1e8e511aa1d0a31a16c632060ebb
https://cgit.freebsd.org/src/commit/?id=96fe7c8ab0f65cf829619abd74ae6c126b21e15f
PR: 267751 |
12.2.0_4 30 Nov 2022 12:52:52
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Fix Address sanitizer
Software compiled with -fsanitize=address fails to run with the error
message "ASan runtime does not come first in initial library list; you
should either link runtime to your application or manually preload it
with LD_PRELOAD".
This commit fixes the issue by ignoring the [vdso] loaded shared library
instead of linux-vdso.so.
PR: 267751
Reported by: yuri |
12.2.0_3 09 Nov 2022 13:29:15
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Fix conflict on libgccjit.h and libgccjit++.h
GCC 11, GCC 12 and GCC 13 install libgccjit.h and libgccjit++.h in the
same directory.
Fix conflict for lang/gcc12, which is soon to become GCC_DEFAULT, by
installing those files in a directory specific to GCC 12.
See also commit 0338e04504ee269b7a95e6707f1314bc1c4239fe that fixed the
conflict in the same way for lang/gcc11.
PR: 257060 |
12.2.0_2 09 Sep 2022 11:10:15
    |
Gerald Pfeifer (gerald)  |
lang/gcc12: The Fortran front end is gfortran12 |
12.2.0_1 08 Sep 2022 15:46:38
    |
Stefan Eßer (se)  |
Remove WWW lines that have been moved into Makefiles
Approved by: portmgr (implicit) |
12.2.0_1 08 Sep 2022 15:43:21
    |
Stefan Eßer (se)  |
Move more WWW entries from pkg-descr files into Makefiles
The WWW: lines in the pkg-descr files of these ports where not at the
end of those files and have been missed in prior conversion runs.
Approved by: portmgr (implicit) |
12.2.0_1 25 Aug 2022 21:35:37
    |
Jan Beich (jbeich)  |
lang/gcc12: Expose non-default -stdlib=libc++ support
Fix -stdlib=libc++ option which produced "error: unrecognized
command-line option '-stdlib=libc++'".
PR: 265962
Approved by: salvadore (maintainer)
Exp-run by: antoine (via bug 265964) |
12.2.0 19 Aug 2022 18:41:54
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc12: Update to 12.2.0
Also take maintainership. |
12.1.0 20 Jul 2022 14:22:15
    |
Tobias C. Berner (tcberner)  |
lang: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* Aaron Dalton <aaron@FreeBSD.org>
* Adam Weinberger <adamw@FreeBSD.org>
* Akinori MUSHA aka knu <knu@idaemons.org>
* Alex Dupre <ale@FreeBSD.org>
* Alexey Dokuchaev <danfe@FreeBSD.org>
* Alonso Cardenas Marquez <acm@FreeBSD.org>
* Andreas Klemm <andreas@klemm.gtn.com>
* Andrew Pantyukhin <infofarmer@FreeBSD.org>
* Andrey Zakhvatov
* Anton Berezin <tobez@FreeBSD.org>
* Anton Berezin <tobez@tobez.org> (Only the first 15 lines of the commit message are shown above ) |
12.1.0 07 Jul 2022 22:56:01
    |
Lorenzo Salvadore (salvadore)  |
lang/gcc>=11: Warn about LTO_BOOTSTRAP
Warn users about the amount of ram and time needed to build GCC with
LTO_BOOTSTRP enabled.
PR: 264949
Reported by: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> and others
Reviewed by: gerald
Differential Revision: https://reviews.freebsd.org/D35688 |
12.1.0 06 May 2022 18:01:39
    |
Piotr Kubaj (pkubaj)  |
lang/gcc12: add gcc 12
Changelog: https://gcc.gnu.org/gcc-12/changes.html |