Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Sonic cross-compilation build. CC variable is used as gcc compiler. CXX is used as g++ compiler. #91

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LINKMGRD_TARGET := linkmgrd
LINKMGRD_TEST_TARGET := linkmgrd-test
CP := cp
MKDIR := mkdir
CC := g++
CXX := g++
MV := mv
BOOST_MACROS = -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_DYN_LINK
GCOV_FLAGS := -fprofile-arcs -ftest-coverage
Expand Down Expand Up @@ -66,7 +66,7 @@ all: sonic-linkmgrd
release-targets: $(OBJS) $(USER_OBJS) $(OBJS_LINKMGRD)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
$(CC) -pthread -o "$(LINKMGRD_TARGET)" $(OBJS) $(OBJS_LINKMGRD) $(USER_OBJS) $(LIBS)
$(CXX) -pthread -o "$(LINKMGRD_TARGET)" $(OBJS) $(OBJS_LINKMGRD) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand All @@ -77,7 +77,7 @@ sonic-linkmgrd: clean-targets
test-targets: $(OBJS) $(USER_OBJS) $(OBJS_LINKMGRD_TEST)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
$(CC) -pthread -fprofile-generate -lgcov -o "$(LINKMGRD_TEST_TARGET)" $(OBJS) $(OBJS_LINKMGRD_TEST) $(USER_OBJS) $(LIBS) $(LIBS_TEST)
$(CXX) -pthread -fprofile-generate -lgcov -o "$(LINKMGRD_TEST_TARGET)" $(OBJS) $(OBJS_LINKMGRD_TEST) $(USER_OBJS) $(LIBS) $(LIBS_TEST)
@echo 'Executing test target: $@'
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5 ./$(LINKMGRD_TEST_TARGET)
$(GCOVR) -r ./ --html --html-details -o $(LINKMGRD_TEST_TARGET)-result.html
Expand Down