diff options
-rw-r--r-- | Rules.mak | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -267,8 +267,6 @@ ifeq ($(strip $(CONFIG_DEBUG)),y) | |||
267 | CFLAGS +=-g | 267 | CFLAGS +=-g |
268 | else | 268 | else |
269 | CFLAGS +=-DNDEBUG | 269 | CFLAGS +=-DNDEBUG |
270 | CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,) | ||
271 | CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,) | ||
272 | endif | 270 | endif |
273 | 271 | ||
274 | ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y) | 272 | ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y) |
@@ -288,6 +286,11 @@ endif | |||
288 | STRIPCMD:=$(call check_strip,$(STRIP),-s --remove-section=.note --remove-section=.comment,$(STRIP)) | 286 | STRIPCMD:=$(call check_strip,$(STRIP),-s --remove-section=.note --remove-section=.comment,$(STRIP)) |
289 | ifeq ($(strip $(CONFIG_STATIC)),y) | 287 | ifeq ($(strip $(CONFIG_STATIC)),y) |
290 | PROG_CFLAGS += $(call check_cc,$(CC),-static,) | 288 | PROG_CFLAGS += $(call check_cc,$(CC),-static,) |
289 | else | ||
290 | ifneq ($(strip $(CONFIG_DEBUG)),y) | ||
291 | CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,) | ||
292 | CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,) | ||
293 | endif | ||
291 | endif | 294 | endif |
292 | CFLAGS_SHARED := $(call check_cc,$(CC),-shared,) | 295 | CFLAGS_SHARED := $(call check_cc,$(CC),-shared,) |
293 | LIB_CFLAGS+=$(CFLAGS_SHARED) | 296 | LIB_CFLAGS+=$(CFLAGS_SHARED) |