Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2022 06:12:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 261977] lang/gcc12-devel: enable LTO
Message-ID:  <bug-261977-29464-Ms0BBbTU1b@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-261977-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-261977-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261977

--- Comment #42 from Piotr Kubaj <pkubaj@FreeBSD.org> ---
Would that be good for you?
--- lang/gcc12-devel/Makefile
+++ lang/gcc12-devel/Makefile
@@ -42,9 +42,16 @@ SUFFIX=3D              ${PORTVERSION:C/([0-9]+).*/\1/}
 CFLAGS:=3D       ${CFLAGS:N-mretpoline}
 CXXFLAGS:=3D     ${CXXFLAGS:N-mretpoline}

-OPTIONS_DEFINE=3D                BOOTSTRAP GRAPHITE
-OPTIONS_DEFAULT=3D       BOOTSTRAP
-BOOTSTRAP_DESC=3D                Build using a full bootstrap
+OPTIONS_DEFINE=3D                GRAPHITE
+OPTIONS_DEFAULT=3D       LTO_BOOTSTRAP
+OPTIONS_EXCLUDE_armv6=3D LTO_BOOTSTRAP
+OPTIONS_EXCLUDE_armv7=3D LTO_BOOTSTRAP
+OPTIONS_DEFAULT_armv6=3D STANDARD_BOOTSTRAP
+OPTIONS_DEFAULT_armv7=3D STANDARD_BOOTSTRAP
+OPTIONS_RADIO=3D BOOTSTRAP
+OPTIONS_RADIO_BOOTSTRAP=3D       LTO_BOOTSTRAP STANDARD_BOOTSTRAP
+LTO_BOOTSTRAP_DESC=3D    Build using a full LTO bootstrap
+STANDARD_BOOTSTRAP_DESC=3D       Build using a full bootstrap without LTO
 GRAPHITE_DESC=3D         Support for Graphite loop optimizations

 .if exists(/usr/lib32/libc.so)
@@ -80,11 +87,14 @@ TARGLIB32=3D  ${PREFIX}/lib32 # The version information=
 i
 LIBEXEC=3D       ${PREFIX}/libexec/gcc${SUFFIX}
 GNU_CONFIGURE=3D yes
 CONFIGURE_OUTSOURCE=3D   yes
-.if empty(PORT_OPTIONS:MBOOTSTRAP)
+.if empty(PORT_OPTIONS:M*BOOTSTRAP)
 CONFIGURE_ARGS+=3D--disable-bootstrap
-.else
+.elif ${PORT_OPTIONS:MLTO_BOOTSTRAP}
 CONFIGURE_ARGS+=3D--with-build-config=3Dbootstrap-lto-noplugin
 ALL_TARGET=3D    bootstrap-lean
+.else
+CONFIGURE_ARGS+=3D--with-build-config=3Dbootstrap-debug
+ALL_TARGET=3D    bootstrap-lean
 .endif
 INSTALL_TARGET=3D        install-strip
 .if ${UID} !=3D 0

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261977-29464-Ms0BBbTU1b>