aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Salvadore <salvadore@FreeBSD.org>2025-08-27 13:31:18 +0000
committerLorenzo Salvadore <salvadore@FreeBSD.org>2025-09-05 09:17:52 +0000
commit62f186cdf6e9689f30e854a0e23482c552c851a2 (patch)
treed4a606d6b16b77efd166d3eb0e148c33b608590c
parent527f93e9a08a958a0cc4a559445cf8026ed0d1ac (diff)
lang/gcc14-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]
-rw-r--r--lang/gcc14-devel/Makefile17
-rw-r--r--lang/gcc14-devel/pkg-help5
2 files changed, 14 insertions, 8 deletions
diff --git a/lang/gcc14-devel/Makefile b/lang/gcc14-devel/Makefile
index d7e59cf442dc..23a766ffd18f 100644
--- a/lang/gcc14-devel/Makefile
+++ b/lang/gcc14-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 14.3.1.s20250822
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
@@ -50,8 +51,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
@@ -84,18 +85,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/gcc14-devel/pkg-help b/lang/gcc14-devel/pkg-help
index 9030bbb28d3f..632e1c65f816 100644
--- a/lang/gcc14-devel/pkg-help
+++ b/lang/gcc14-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.