ports: Build NimBLE with 32-bit environment

Some code in NimBLE assumes that pointers are 4 bytes. Until this
is properly fixed build with -m32 to make sure resulting binary
is no misbehaving.
This commit is contained in:
Szymon Janc
2021-12-06 16:30:45 +01:00
parent ee6ba614c8
commit f771348a4e
5 changed files with 9 additions and 4 deletions
+1
View File
@@ -26,6 +26,7 @@ _addons: &addon_conf
packages:
- gcc-multilib
- gcc-7-multilib
- g++-multilib
go:
- "1.16"
+2 -1
View File
@@ -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)
+1 -1
View File
@@ -81,7 +81,7 @@ CFLAGS = \
-D_GNU_SOURCE \
$(NULL)
LIBS := -lrt -lpthread -lstdc++
LIBS := $(NIMBLE_LDFLAGS) -lrt -lpthread -lstdc++
.PHONY: all clean
.DEFAULT: all
+1 -1
View File
@@ -83,7 +83,7 @@ CFLAGS = \
-D_GNU_SOURCE \
$(NULL)
LIBS := -lrt -lpthread -lstdc++
LIBS := $(NIMBLE_LDFLAGS) -lrt -lpthread -lstdc++
.PHONY: all clean
.DEFAULT: all
+4 -1
View File
@@ -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 \