From 2b5544ab7a5fbab27086525831d468d2200a46c0 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 24 Jun 2025 19:08:33 +0200 Subject: [PATCH] Makefile: unexport TOPDIR to fix gnu-efi >= 3.0.18 build issue gnu-efi fails to build if TOPDIR is exported in the environment since the move to version 3.0.18 in commit 9efeb7e914 ("package/gnu-efi: bump to version 3.0.18"). The reason is the change in TOPDIR logic introduced by upstream commit 31913f8489 ("Make: make TOPDIR actually work and get rid of unused CDIR"): https://github.com/ncroxon/gnu-efi/commit/31913f8489f8e6eb624b6447d2e5cf1f6367bebf export TOPDIR=foo; make gnu-efi ... /path/to/buildroot/output-gnuefi/host/bin/aarch64-linux-ld: cannot find /path/to/buildroot/output-gnuefi/build/gnu-efi-4.0.0//apps/../aarch64/gnuefi/crt0-efi-aarch64.o: No such file or director make[2]: *** [Makefile:89: apps] Error 2 make[1]: *** [package/pkg-generic.mk:273: /path/to/buildroot/output-gnuefi/build/gnu-efi-4.0.0/.stamp_built] Error 2 make: *** [Makefile:23: _all] Error 2 As a workaround, unexport TOPDIR like we do for other sensitive environment variables. Signed-off-by: Peter Korsgaard Signed-off-by: Julien Olivain --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a052628ac7..c581067320 100644 --- a/Makefile +++ b/Makefile @@ -428,6 +428,7 @@ unexport QMAKESPEC unexport RANLIB unexport TAR_OPTIONS unexport TERMINFO +unexport TOPDIR GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)