build: Experiment with LTO, fix some problems it uncovered.

This commit is contained in:
Solomon Peachy 2016-08-21 11:15:13 -04:00
parent ea8e0b1f35
commit 34af66170b
3 changed files with 8 additions and 3 deletions

View File

@ -23,6 +23,11 @@ CPPFLAGS += `pkg-config --cflags libusb-1.0`
# CPPFLAGS += -DLIBUSB_PRE_1_0_10
CPPFLAGS += -DURI_PREFIX=\"$(BACKEND_NAME)\"
# If you want to use LTO..
#CFLAGS += -flto
# If not...
CFLAGS += -funit-at-a-time
# List of backends
BACKENDS = sonyupdr150 kodak6800 kodak1400 shinkos2145 shinkos1245 canonselphy mitsu70x kodak605 dnpds40 citizencw01 mitsu9550 shinkos6245 shinkos6145
@ -60,7 +65,7 @@ install:
$(INSTALL) -o root -m 644 blacklist $(CUPS_DATA_DIR)/usb/net.sf.gimp-print.usb-quirks
clean:
$(RM) -f $(EXEC_NAME) $(BACKENDS)
$(RM) -f $(EXEC_NAME) $(BACKENDS) $(SOURCES:.c=.o)
release:
$(RM) -Rf selphy_print-rel

View File

@ -805,7 +805,7 @@ struct s2145_getunique_resp {
#define READBACK_LEN 128 /* Needs to be larger than largest response hdr */
#define CMDBUF_LEN sizeof(struct s2145_print_cmd)
uint8_t rdbuf[READBACK_LEN];
static uint8_t rdbuf[READBACK_LEN];
static int s2145_do_cmd(struct shinkos2145_ctx *ctx,
uint8_t *cmd, int cmdlen,

View File

@ -929,7 +929,7 @@ struct s6245_fwinfo_resp {
#define READBACK_LEN 512 /* Needs to be larger than largest response hdr */
#define CMDBUF_LEN sizeof(struct s6245_print_cmd)
uint8_t rdbuf[READBACK_LEN];
static uint8_t rdbuf[READBACK_LEN];
static int s6245_do_cmd(struct shinkos6245_ctx *ctx,
uint8_t *cmd, int cmdlen,