diff --git a/.travis.yml b/.travis.yml index 0b59e7a86..185ca3550 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ _addons: &addon_conf packages: - gcc-multilib - gcc-7-multilib + - g++-multilib go: - "1.16" diff --git a/porting/examples/dummy/Makefile b/porting/examples/dummy/Makefile index 861934f7f..1c38ac4a3 100644 --- a/porting/examples/dummy/Makefile +++ b/porting/examples/dummy/Makefile @@ -60,6 +60,7 @@ OBJ := $(SRC:.c=.o) TINYCRYPT_OBJ := $(TINYCRYPT_SRC:.c=.o) CFLAGS := $(NIMBLE_CFLAGS) +LDFLAGS := $(NIMBLE_LDFLAGS) .PHONY: all clean .DEFAULT: all @@ -76,4 +77,4 @@ $(TINYCRYPT_OBJ): CFLAGS+=$(TINYCRYPT_CFLAGS) $(CC) -c $(addprefix -I, $(INC)) $(CFLAGS) -o $@ $< dummy: $(OBJ) $(TINYCRYPT_OBJ) - $(CC) -o $@ $^ + $(CC) -o $@ $^ $(LDFLAGS) diff --git a/porting/examples/linux/Makefile b/porting/examples/linux/Makefile index 11f4ebc30..c3eee16cb 100644 --- a/porting/examples/linux/Makefile +++ b/porting/examples/linux/Makefile @@ -81,7 +81,7 @@ CFLAGS = \ -D_GNU_SOURCE \ $(NULL) -LIBS := -lrt -lpthread -lstdc++ +LIBS := $(NIMBLE_LDFLAGS) -lrt -lpthread -lstdc++ .PHONY: all clean .DEFAULT: all diff --git a/porting/examples/linux_blemesh/Makefile b/porting/examples/linux_blemesh/Makefile index c1518e0e4..67783f276 100644 --- a/porting/examples/linux_blemesh/Makefile +++ b/porting/examples/linux_blemesh/Makefile @@ -83,7 +83,7 @@ CFLAGS = \ -D_GNU_SOURCE \ $(NULL) -LIBS := -lrt -lpthread -lstdc++ +LIBS := $(NIMBLE_LDFLAGS) -lrt -lpthread -lstdc++ .PHONY: all clean .DEFAULT: all diff --git a/porting/nimble/Makefile.defs b/porting/nimble/Makefile.defs index 5bab893fd..78f73fbc9 100644 --- a/porting/nimble/Makefile.defs +++ b/porting/nimble/Makefile.defs @@ -19,7 +19,10 @@ ifeq (,$(NIMBLE_ROOT)) $(error NIMBLE_ROOT shall be defined) endif -NIMBLE_CFLAGS := +# For now this is required as there are places in NimBLE +# assumingthat pointer is 4 bytes long. +NIMBLE_CFLAGS := -m32 +NIMBLE_LDFLAGS := -m32 NIMBLE_INCLUDE := \ $(NIMBLE_ROOT)/nimble/include \