Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2024 15:05:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 277902] Mk/Uses/cargo.mk: WITH_LTO no longer applies
Message-ID:  <bug-277902-7788-FTa1JcBgyp@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-277902-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-277902-7788@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=3D277902

--- Comment #7 from Gleb Popov <arrowd@FreeBSD.org> ---
Proposed fix's below. It now adhere to WITHOUT_LTO_PORTS too.

diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 5d423d81661e..e3b733d35821 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -139,8 +139,11 @@ CARGO_ENV+=3D \
 CARGO_ENV+=3D    RUST_BACKTRACE=3D1
 .  endif

+.  if !defined(_WITHOUT_LTO) && (!defined(WITHOUT_LTO_PORTS) ||
${WITHOUT_LTO_PORTS:N${PKGORIGIN}})
 _CARGO_MSG=3D    "=3D=3D=3D>   Additional optimization to port applied"
-WITH_LTO=3D      yes
+_WITH_LTO=3D     yes
+.undef _WITHOUT_LTO
+.  endif

 # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk
 .  if ${ARCH} =3D=3D amd64 || ${ARCH} =3D=3D i386

--=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-277902-7788-FTa1JcBgyp>