From c1453b589d284f914bbfefe3426b5d0f9f184440 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Wed, 23 Feb 2022 12:32:51 +0200 Subject: [PATCH] BUILD_KERNEL: Include CPP libraries only if configured to do so Otherwise build without HAVE_CXX flag fails --- import/Make.defs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/import/Make.defs b/import/Make.defs index 3d100f7ca..e5b0ed16f 100644 --- a/import/Make.defs +++ b/import/Make.defs @@ -66,7 +66,10 @@ LDLIBPATH = $(addprefix -L,$(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs)) # Link with user libraries ifeq ($(CONFIG_BUILD_KERNEL),y) - LDLIBS = -lapps -lxx -lmm -lc -lproxies + LDLIBS = -lapps -lmm -lc -lproxies + ifeq ($(CONFIG_HAVE_CXX),y) + LDLIBS += -lxx + endif ifneq ($(CONFIG_LIBM),y) LIBM = ${shell "$(CC)" $(ARCHCPUFLAGS) --print-file-name=libm.a} ifneq ($(LIBM),".")