commit:     2ffd0ee3f63fd87e3b3f74c3b331edfcad6939a9
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 21 08:44:10 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun Dec 21 08:55:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ffd0ee3

sys-boot/gnu-efi: sanitize LDFLAGS

gnu-efi calls ld directly, so use raw LDFLAGS when built with custom-cflags.

Closes: https://bugs.gentoo.org/967774
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild 
b/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild
index 542f89b36d2a..c365147f3cd1 100644
--- a/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-4.0.4.ebuild
@@ -118,7 +118,9 @@ efimake() {
 src_compile() {
        tc-export BUILD_CC AR AS CC LD OBJCOPY
 
-       if ! use custom-cflags; then
+       if use custom-cflags; then
+               LDFLAGS="$(raw-ldflags)"
+       else
                unset CFLAGS CPPFLAGS LDFLAGS
        fi
 

Reply via email to