In order to avoid blhost segfaults, statically link it, and set its architecture to x86-64 so that it won't contain special instructions.
This change was made by @iprok. See https://github.com/UltimateHackingKeyboard/agent/issues/681#issuecomment-403057795
This commit is contained in:
@@ -38,8 +38,8 @@ INCLUDES += $(BOOT_ROOT)/validation/blhost/src \
|
|||||||
$(BOOT_ROOT)/src/drivers/common \
|
$(BOOT_ROOT)/src/drivers/common \
|
||||||
$(BOOT_ROOT)/src/bm_usb
|
$(BOOT_ROOT)/src/bm_usb
|
||||||
|
|
||||||
CXXFLAGS := -D LINUX -D BOOTLOADER_HOST -std=c++11
|
CXXFLAGS := -D LINUX -D BOOTLOADER_HOST -std=c++11 -march=x86-64 -mtune=generic
|
||||||
CFLAGS := -std=c99 -D LINUX -D BOOTLOADER_HOST -D _GNU_SOURCE
|
CFLAGS := -std=c99 -D LINUX -D BOOTLOADER_HOST -D _GNU_SOURCE -mtune=generic -march=x86-64
|
||||||
LD := g++
|
LD := g++
|
||||||
|
|
||||||
SOURCES := $(BOOT_ROOT)/validation/blhost/src/blhost.cpp \
|
SOURCES := $(BOOT_ROOT)/validation/blhost/src/blhost.cpp \
|
||||||
@@ -199,7 +199,7 @@ $(MAKE_TARGET): $(OBJECTS_ALL)
|
|||||||
@$(call printmessage,link,Linking, $(APP_NAME))
|
@$(call printmessage,link,Linking, $(APP_NAME))
|
||||||
$(at)$(LD) $(LDFLAGS) \
|
$(at)$(LD) $(LDFLAGS) \
|
||||||
$(OBJECTS_ALL) \
|
$(OBJECTS_ALL) \
|
||||||
-lc -lstdc++ -lm -ludev \
|
-static -lc -lstdc++ -lm -ludev -lrt \
|
||||||
-o $@
|
-o $@
|
||||||
@echo "Output binary:" ; echo " $(APP_NAME)"
|
@echo "Output binary:" ; echo " $(APP_NAME)"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user