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

Ported Marvell armhf build on amd64 for debian buster to use cross-comp… #1267

Merged
merged 1 commit into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
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
17 changes: 10 additions & 7 deletions meta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ $(foreach bin,$(BINS),$(if $(shell which $(bin)),,$(error "Missing $(bin) in PAT

CFLAGS += -I../inc -I../experimental $(WARNINGS)

CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++

DEPS = $(wildcard ../inc/*.h) $(wildcard ../experimental/*.h)
XMLDEPS = $(wildcard xml/*.xml)

Expand All @@ -83,7 +86,7 @@ all: toolsversions saisanitycheck saimetadatatest saiserializetest saidepgraph.s

toolsversions:
@make -v | grep -i make
@gcc --version | grep gcc
@$(CC) --version | grep gcc
@perl --version | grep version
@aspell --version
@dot -V
Expand All @@ -104,22 +107,22 @@ saimetadatatest.c saimetadata.c saimetadata.h: xml $(XMLDEPS) parse.pl $(CONSTHE
HEADERS = saimetadata.h $(CONSTHEADERS)

%.o: %.c $(HEADERS)
gcc -c -o $@ $< $(CFLAGS)
$(CC) -c -o $@ $< $(CFLAGS)

%.o: %.cpp $(HEADERS)
gcc -c -o $@ $< $(CFLAGS)
$(CC) -c -o $@ $< $(CFLAGS)

saisanitycheck: saisanitycheck.o $(OBJ)
gcc -o $@ $^
$(CC) -o $@ $^

saimetadatatest: saimetadatatest.o $(OBJ)
gcc -o $@ $^
$(CC) -o $@ $^

saiserializetest: saiserializetest.o $(OBJ)
gcc -o $@ $^
$(CC) -o $@ $^

saidepgraphgen: saidepgraphgen.o $(OBJ)
g++ -o $@ $^
$(CXX) -o $@ $^

%.o.symbols: %.o
nm $^ | ./checksymbols.pl
Expand Down
4 changes: 3 additions & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
# Dell Products, L.P., Facebook, Inc
#
CXX = g++

CXX = $(CROSS_COMPILE)g++

LIBS = -lpthread
LDIR = ./lib

Expand Down
3 changes: 2 additions & 1 deletion test/basic_router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

#Broadcom, Mellonox, Barefoot

CXX = g++
CXX = $(CROSS_COMPILE)g++

LIBS = -lpthread -lsai
SAI_IDIR = /usr/include/sai

Expand Down
4 changes: 2 additions & 2 deletions test/sai_ut/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ stp_EXEC = sai_ut_stp
EXEC_ALL = $(BDIR)/$(vr_EXEC) $(BDIR)/$(rif_EXEC) $(BDIR)/$(nh_EXEC) $(BDIR)/$(nhg_EXEC) $(BDIR)/$(nbr_EXEC) $(BDIR)/$(route_EXEC) $(BDIR)/$(fdb_EXEC) $(BDIR)/$(vlan_EXEC) $(BDIR)/$(lag_EXEC) $(BDIR)/$(stp_EXEC)

# what to use for compiling
CXX=g++
AR=ar
CXX = $(CROSS_COMPILE)g++
AR = $(CROSS_COMPILE)ar

# include dir for unit-tests
INCLUDEFLAGS = ${SAI_INCLUDE_FLAGS} -I$(GTEST_DIR)/include
Expand Down
3 changes: 2 additions & 1 deletion test/saithrift/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CXX=g++
CXX = $(CROSS_COMPILE)g++

SAI_PREFIX = /usr
SAI_HEADER_DIR ?= $(SAI_PREFIX)/include/sai
SAI_HEADERS = $(SAI_HEADER_DIR)/sai*.h
Expand Down