diff mbox series

[RFC,04/12] Makefile: [HACK] Pass relevant flags when checking for libfdt

Message ID 1547828061-20462-5-git-send-email-Dave.Martin@arm.com (mailing list archive)
State RFC
Headers show
Series arm64: SVE guest support test hacks | expand

Commit Message

Dave Martin Jan. 18, 2019, 4:14 p.m. UTC
CPPFLAGS and LDFLAGS may be telling us where libdft.h and -lfdt are
to be found, so don't ignore them when looking for libfdt.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index e8e9376..d6bcce7 100644
--- a/Makefile
+++ b/Makefile
@@ -310,7 +310,7 @@  $(warning No static libc found. Skipping guest init)
 endif
 
 ifeq (y,$(ARCH_WANT_LIBFDT))
-	ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y)
+	ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-lfdt),y)
           $(error No libfdt found. Please install libfdt-dev package)
 	else
 		CFLAGS_DYNOPT	+= -DCONFIG_HAS_LIBFDT