linux: Optimize binaries for size

This commit is contained in:
Wladimir J. van der Laan 2020-02-22 14:37:06 +00:00
parent 2819afaae5
commit 0ebae26c05
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
CROSS ?= /opt/riscv64-uclibc/bin/riscv64-buildroot-linux-uclibc- CROSS ?= /opt/riscv64-uclibc/bin/riscv64-buildroot-linux-uclibc-
CFLAGS = -fPIC -Wl,-elf2flt=-r -Wall CFLAGS = -fPIC -Wl,-elf2flt=-r -Wall -Os
BINARIES = term esptun BINARIES = term esptun
all: $(BINARIES) all: $(BINARIES)

View File

@ -337,7 +337,7 @@ static bool esp_read_responses(int fd, bool early_terminate)
size_t ptr = 0; size_t ptr = 0;
while (ptr < esp_end) { while (ptr < esp_end) {
const uint8_t *resp = &esp_buffer[ptr]; const uint8_t *resp = &esp_buffer[ptr];
struct packet_info pkt_info; struct packet_info pkt_info = {};
size_t len = esp_response_is_complete(resp, esp_end - ptr, &pkt_info); size_t len = esp_response_is_complete(resp, esp_end - ptr, &pkt_info);
if (len) { if (len) {
logprintf(DEBUG, "<-: "); logprintf(DEBUG, "<-: ");