Fix taskmanager/client/libtskmcfg/Makefile for crossbuild environment 86/25886/1 10.92.0 koi/10.92.0 koi_10.92.0
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 12 Jan 2021 12:23:22 +0000 (12:23 +0000)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 12 Jan 2021 12:24:55 +0000 (13:24 +0100)
The Makefile needs to take the proper flags into account to use the native sysroot
to find -lexpat in the native case for the build-time parser compilation to work.

Note that there is HOSTCPP=cpp left that is a direct host dependency.

Bug-AGL: SPEC-3670
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I70b111d6385e0f465353ed2fe2a754b0c34db797

service/system/task_manager/client/libtskmcfg/Makefile

index bb11d6f..1179183 100755 (executable)
@@ -23,7 +23,7 @@ INST_HEADERS = tskm_xml_data.h  tskm_svcid.h task_manager_libtskmcfg.h
 libtskmcfg_SRCS = tskm_xml_data.cpp
 
 
-CPPFLAGS = -I./ -I./include -I./../../include-share -I./../../server/include
+CPPFLAGS += -I./ -I./include -I./../../include-share -I./../../server/include
 LDFLAGS += -Wl,--no-as-needed
 LDLIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
 
@@ -38,7 +38,9 @@ HOST_CPP=cpp
 XMLCHECKER=xmllint
 XMLCHECKEROPT=--noout --valid
 PARSEXMLCMD=parsexml
-HOSTCC=gcc
+HOSTCC=$(BUILD_CC)
+HOSTCFLAGS=$(BUILD_CFLAGS)
+HOSTLDFLAGS=$(BUILD_LDFLAGS)
 XMLFILETOP=tskm_cfg.xml
 
 install:install-pre install-pre-header
@@ -85,6 +87,6 @@ $(XMLOUTFILE):top.xml $(PARSEXMLCMD) $(CONFIG_FILES)
        ./$(PARSEXMLCMD) $<
 
 $(PARSEXMLCMD):$(PARSEXMLCMD).c
-       $(HOSTCC) -o $@ $< -lexpat
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< -lexpat
 
 include ../../../system_service.mk