firmware: try to decrease total firmware size

This commit is contained in:
Maxim Anisimov
2019-03-09 12:56:18 +00:00
parent 3178e39d5b
commit 3d1d43b8ab
11 changed files with 13 additions and 13 deletions

View File

@ -63,7 +63,7 @@ FILES=./postinstall ./preremove ./postremove ./lpd.conf
ALLDIRS= ${DIRS} ${SRC}/TESTSUPPORT ${SRC}/DOCS
ROMFSDIR = $(ROOTDIR)/romfs
CFLAGS += -O2 -ffunction-sections -fdata-sections -fvisibility=hidden
CFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden
LDFLAGS += -Wl,--gc-sections
###############################################################################

View File

@ -2,7 +2,7 @@ SRC_NAME=mt-daapd-svn
THISDIR = $(shell pwd)
CFLAGS += -O2 -ffunction-sections -fdata-sections
CFLAGS += -ffunction-sections -fdata-sections
LDFLAGS += -Wl,--gc-sections
all: config_test

View File

@ -8,7 +8,7 @@ SHDIR = $(ROOTDIR)/user/shared
include $(SHDIR)/boards.mk
include $(SHDIR)/cflags.mk
CFLAGS += -O2 -ffunction-sections -fdata-sections -fvisibility=hidden
CFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden
LDFLAGS += -Wl,--gc-sections
CFLAGS += $(if $(TPLINK_HWID),-DTPLINK_HWID=$(TPLINK_HWID),)

View File

@ -8,7 +8,7 @@ SRC= $(TOP)/src
TST= $(TOP)/test
CC= gcc
CFLAGS= -O2 -Wall -I$(INC) $(MYCFLAGS)
CFLAGS= -Os -Wall -I$(INC) $(MYCFLAGS)
MYCFLAGS=
MYLDFLAGS= -Wl,-E
MYLIBS= -lm

View File

@ -8,7 +8,7 @@
PLAT= none
CC= gcc
CFLAGS= -O2 -Wall $(MYCFLAGS)
CFLAGS= -Os -Wall $(MYCFLAGS)
AR= ar rcu
RANLIB= ranlib
RM= rm -f

View File

@ -4,9 +4,9 @@ SMBCFLAGS = -Wall -ffunction-sections -fdata-sections $(CFLAGS)
SMBLDFLAGS = -Wl,--gc-sections $(LDFLAGS)
ifeq ($(CONFIG_FIRMWARE_INCLUDE_SMBD_SYSLOG),y)
SMBCFLAGS += -O2 -DMAX_DEBUG_LEVEL="0"
SMBCFLAGS += -DMAX_DEBUG_LEVEL="0"
else
SMBCFLAGS += -Os -DMAX_DEBUG_LEVEL="-1"
SMBCFLAGS += -DMAX_DEBUG_LEVEL="-1"
endif
THISDIR = $(shell pwd)

View File

@ -6,9 +6,9 @@ SMBCPPFLAGS = $(CPPFLAGS) -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64 -D_FILE_O
MAKE_FLAGS = $(MAKEFLAGS) DYNEXP= PICFLAG= MODULES=
ifeq ($(CONFIG_FIRMWARE_INCLUDE_SMBD_SYSLOG),y)
SMBCFLAGS += -O2 -DMAX_DEBUG_LEVEL="0"
SMBCFLAGS += -DMAX_DEBUG_LEVEL="0"
else
SMBCFLAGS += -Os -DMAX_DEBUG_LEVEL="-1"
SMBCFLAGS += -DMAX_DEBUG_LEVEL="-1"
endif
all: config_test

View File

@ -1,6 +1,6 @@
SRC_NAME=transmission-2.9X
COMMON_FLAGS = -O2 -ffunction-sections -fdata-sections -fvisibility=hidden -D_LARGEFILE64_SOURCE -D_LFS64_LARGEFILE
COMMON_FLAGS = -ffunction-sections -fdata-sections -fvisibility=hidden -D_LARGEFILE64_SOURCE -D_LFS64_LARGEFILE
CFLAGS += $(COMMON_FLAGS)
CXXFLAGS += $(COMMON_FLAGS) -fvisibility-inlines-hidden
LDFLAGS += -Wl,--gc-sections

View File

@ -29,7 +29,7 @@ GZIP := /bin/gzip
MKDEPOPT := -MM
DEBUG_ON := -g
ALL_CFLAGS = -W -Wall -Werror --pedantic $(CFLAGS) -O2
ALL_CFLAGS = -W -Wall -Werror --pedantic $(CFLAGS)
ALL_CFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden
LDFLAGS += -Wl,--gc-sections

View File

@ -4,7 +4,7 @@ TOP = $(ROOTDIR)/user
IFLAGS = -idirafter dummyinc
CFLAGS += -O2 -Wall -W -Werror -Wshadow -Wformat-security -D_FORTIFY_SOURCE=2
CFLAGS += -Wall -W -Werror -Wshadow -Wformat-security -D_FORTIFY_SOURCE=2
CFLAGS += -I$(TOP)/shared
CFLAGS += -I$(TOP)/libdisk
CFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden

View File

@ -107,7 +107,7 @@ ifdef UCLINUX_BUILD_LIB
ifdef CONFIG_LIB_DEBUG
CFLAGS := $(if $(LOPT),$(LOPT),-O1) -g
else
CFLAGS := $(if $(LOPT),$(LOPT),-O2) -fomit-frame-pointer -fno-stack-protector -femit-struct-debug-baseonly -fno-var-tracking
CFLAGS := $(if $(LOPT),$(LOPT),-Os) -fomit-frame-pointer -fno-stack-protector -femit-struct-debug-baseonly -fno-var-tracking
endif
CFLAGS += -pipe
CFLAGS += $(VENDOR_CFLAGS)