From 41141d505ee3706a610c5345bbf1c91ea7ba9900 Mon Sep 17 00:00:00 2001 From: Sirshak Das Date: Fri, 18 May 2018 13:14:52 -0500 Subject: Fixes make test errors with clang compiler on aarch64 (VAPI_*BIN).d targets didnt have fake.api.vapi.h* as dependencies this causes the compilation to proceed before the python script generates the header files. Explicit linking of stdc++ is required for clang as errors like undefined reference to 'new operator' pop up. Change-Id: I3ca0ef048f392c4a032160ce0e4f7ae759f4c79d Signed-off-by: Sirshak Das Reviewed-by: Brian Brooks Reviewed-by: Honnappa Nagarahalli --- test/ext/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/ext/Makefile b/test/ext/Makefile index 631d7ffe811..a66a72c35dc 100644 --- a/test/ext/Makefile +++ b/test/ext/Makefile @@ -16,7 +16,7 @@ ifneq ($(filter centos opensuse opensuse-tumbleweed opensuse-leap,$(OS_ID)),$(OS VAPI_LIBS += -lsubunit endif -FLAGS = -g -Wall -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR) +FLAGS = -g -Wall -lstdc++ -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR) CFLAGS = -std=gnu99 $(FLAGS) CPPFLAGS = -std=c++11 $(FLAGS) -I$(WS_ROOT)/extras/vom @@ -36,7 +36,7 @@ $(VAPI_BINDIR)/fake.api.vapi.hpp: fake.api.json $(WS_ROOT)/src/vpp-api/vapi/vapi $(VAPI_CBIN): $(CSRC) $(VAPI_BINDIR)/fake.api.vapi.h $(CC) -o $@ $(CFLAGS) $(CSRC) $(VAPI_LIBS) -$(VAPI_CBIN).d: $(CSRC) $(VAPI_BINDIR) +$(VAPI_CBIN).d: $(CSRC) $(VAPI_BINDIR)/fake.api.vapi.h $(CC) -o $@ $(CFLAGS) -MM -MT '$(VAPI_CBIN)' $(CSRC) > $@ @@ -45,7 +45,7 @@ CPPSRC = vapi_cpp_test.cpp $(VAPI_CPPBIN): $(CPPSRC) $(VAPI_BINDIR)/fake.api.vapi.hpp $(CXX) -o $@ $(CPPFLAGS) $(CPPSRC) $(VAPI_LIBS) -$(VAPI_CPPBIN).d: $(CPPSRC) $(VAPI_BINDIR) +$(VAPI_CPPBIN).d: $(CPPSRC) $(VAPI_BINDIR)/fake.api.vapi.hpp $(CXX) -o $@ $(CPPFLAGS) -MM -MT '$(VAPI_CPPBIN)' $(CPPSRC) > $@ VOM_CPPSRC = vom_test.cpp -- cgit 1.2.3-korg