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@gentoo.org>
This commit is contained in:
Viorel Munteanu 2025-12-21 10:44:10 +02:00
parent f719225195
commit 2ffd0ee3f6
No known key found for this signature in database
GPG Key ID: 0CE5A97D9310DAB0

View File

@ -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