git: 6eea282a6d9c - main - lang/gcc16-devel: Allow build without bootstrap
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Sep 2025 09:18:35 UTC
The branch main has been updated by salvadore:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6eea282a6d9c80878d67f2e20452396ffbaab313
commit 6eea282a6d9c80878d67f2e20452396ffbaab313
Author: Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-08-27 09:45:27 +0000
Commit: Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-09-05 09:17:56 +0000
lang/gcc16-devel: Allow build without bootstrap
Enabling a boostrap option was experimentally enforced on some GCC
devel ports, as building GCC on FreeBSD with FreeBSD's default compiler
(clang) is not fully supported. Stop enforcing it: many users of
production ports actually disable both bootstrap options, so it makes
sense to attempt to keep allowing no-bootstrap builds.
However, since building jit without bootstrap does not work, we add jit
to the enabled languages only if a bootstrap option has been selected [1].
See commit 5ee63cc45413954077b2b0c0546b8342585b41ba and e-mail
https://lists.freebsd.org/archives/dev-commits-ports-main/2025-August/160223.html
for more details.
Reported by: vishwin [1]
---
lang/gcc16-devel/Makefile | 17 ++++++++++-------
lang/gcc16-devel/pkg-help | 5 ++++-
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/lang/gcc16-devel/Makefile b/lang/gcc16-devel/Makefile
index 93926cddf3df..7ed232099bb6 100644
--- a/lang/gcc16-devel/Makefile
+++ b/lang/gcc16-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 16.0.0.s20250824
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel
@@ -49,8 +50,8 @@ OPTIONS_DEFAULT_i386= STANDARD_BOOTSTRAP
OPTIONS_DEFAULT_powerpc=LTO_BOOTSTRAP
OPTIONS_DEFAULT_powerpc64=LTO_BOOTSTRAP
OPTIONS_DEFAULT_powerpc64le=LTO_BOOTSTRAP
-OPTIONS_SINGLE= BOOTSTRAP
-OPTIONS_SINGLE_BOOTSTRAP= LTO_BOOTSTRAP STANDARD_BOOTSTRAP
+OPTIONS_RADIO= BOOTSTRAP
+OPTIONS_RADIO_BOOTSTRAP= LTO_BOOTSTRAP STANDARD_BOOTSTRAP
LTO_BOOTSTRAP_DESC= Build using a full LTO bootstrap
STANDARD_BOOTSTRAP_DESC= Build using a full bootstrap without LTO
GRAPHITE_DESC= Support for Graphite loop optimizations
@@ -83,18 +84,20 @@ CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL}
CONFIGURE_ARGS+= --with-abi=elfv2
.endif
-.if ${ARCH} == i386
-LANGUAGES:= c,c++,objc,fortran
-.else
-LANGUAGES:= c,c++,objc,fortran,jit
+LANGUAGES= c,c++,objc,fortran
+.if ${ARCH} != i386 && !empty(PORT_OPTIONS:M*BOOTSTRAP)
+LANGUAGES:= ${LANGUAGES},jit
.endif
+
TARGLIB= ${PREFIX}/lib/gcc${SUFFIX}
TARGLIB32= ${PREFIX}/lib32 # The version information is added later
LIBEXEC= ${PREFIX}/libexec/gcc${SUFFIX}
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
CONFIGURE_OUTSOURCE= yes
-.if ${PORT_OPTIONS:MLTO_BOOTSTRAP}
+.if empty(PORT_OPTIONS:M*BOOTSTRAP)
+CONFIGURE_ARGS+=--disable-bootstrap
+.elif ${PORT_OPTIONS:MLTO_BOOTSTRAP}
CONFIGURE_ARGS+=--with-build-config=bootstrap-lto-noplugin
ALL_TARGET= bootstrap-lean
PIE_UNSAFE= yes
diff --git a/lang/gcc16-devel/pkg-help b/lang/gcc16-devel/pkg-help
index 9030bbb28d3f..632e1c65f816 100644
--- a/lang/gcc16-devel/pkg-help
+++ b/lang/gcc16-devel/pkg-help
@@ -1,3 +1,6 @@
Building this port with LTO_BOOTSTRAP enabled requires significant amounts of
memory and time. Consider disabling LTO_BOOTSTRAP in favor of STANDARD_BOOTSTRAP
-(or disabling BOOTSTRAP altogether) in case that is a problem.
+in case that is a problem.
+
+Note that disabling bootstrap altogether is possible, but not recommended: some
+features (e.g. jit) requires you to choose a bootstrap option to be enabled.