git: aadf6428cc48 - main - lang/gcc11: disable LTO on armv6/7

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 28 Jun 2022 17:24:34 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aadf6428cc480fbeda72ec90d53ef340e95f49ca

commit aadf6428cc480fbeda72ec90d53ef340e95f49ca
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-06-28 17:23:18 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-06-28 17:24:24 +0000

    lang/gcc11: disable LTO on armv6/7
    
    PR:     261977
---
 lang/gcc11/Makefile | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/lang/gcc11/Makefile b/lang/gcc11/Makefile
index 87f72649f377..350d5983a9c6 100644
--- a/lang/gcc11/Makefile
+++ b/lang/gcc11/Makefile
@@ -36,10 +36,18 @@ SUFFIX=		${PORTVERSION:C/([0-9]+).*/\1/}
 CFLAGS:=	${CFLAGS:N-mretpoline}
 CXXFLAGS:=	${CXXFLAGS:N-mretpoline}
 
-OPTIONS_DEFINE=		BOOTSTRAP GRAPHITE
-OPTIONS_DEFAULT=	BOOTSTRAP
-BOOTSTRAP_DESC=		Build using a full bootstrap
+OPTIONS_DEFINE=		GRAPHITE
 GRAPHITE_DESC=		Support for Graphite loop optimizations
+OPTIONS_DEFAULT_aarch64=LTO_BOOTSTRAP
+OPTIONS_DEFAULT_amd64=	LTO_BOOTSTRAP
+OPTIONS_DEFAULT_i386=	LTO_BOOTSTRAP
+OPTIONS_DEFAULT_powerpc=LTO_BOOTSTRAP
+OPTIONS_DEFAULT_powerpc64=LTO_BOOTSTRAP
+OPTIONS_DEFAULT_powerpc64le=LTO_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
 
 .if exists(/usr/lib32/libc.so)
 OPTIONS_DEFINE_amd64+=		MULTILIB
@@ -67,11 +75,14 @@ TARGLIB32=	${PREFIX}/lib32	# The version information is added later
 LIBEXEC=	${PREFIX}/libexec/gcc${SUFFIX}
 GNU_CONFIGURE=	yes
 CONFIGURE_OUTSOURCE=	yes
-.if empty(PORT_OPTIONS:MBOOTSTRAP)
+.if empty(PORT_OPTIONS:M*BOOTSTRAP)
 CONFIGURE_ARGS+=--disable-bootstrap
-.else
+.elif ${PORT_OPTIONS:MLTO_BOOTSTRAP}
 CONFIGURE_ARGS+=--with-build-config=bootstrap-lto-noplugin
 ALL_TARGET=	bootstrap-lean
+.else
+CONFIGURE_ARGS+=--with-build-config=bootstrap-debug
+ALL_TARGET=	bootstrap-lean
 .endif
 INSTALL_TARGET=	install-strip
 .if ${UID} != 0