diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-04-14 23:58:41 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-04-14 23:58:41 +0200 |
commit | f820f4ce071ae0985d84e09ea74dc42d55081e86 (patch) | |
tree | d1e830cd282aaaceb0a0804bf681137fbf00dedd | |
parent | cf0234de47b019ac24e2d361d6386fdfad48f119 (diff) |
buildsys: pass -O to ld unless DODEBUG
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | Rules.mak | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -687,14 +687,18 @@ LDFLAGS_NOSTRIP += $(CFLAG_-Wl--hash-style=gnu) endif endif -LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs ifeq ($(DODEBUG),y) CFLAGS += -O0 -g3 -DDEBUG else CFLAGS += $(OPTIMIZATION) CFLAGS += $(OPTIMIZATION-$(GCC_MAJOR_VER)) CFLAGS += $(OPTIMIZATION-$(GCC_MAJOR_VER).$(GCC_MINOR_VER)) +$(eval $(call check-ld-var,-O2)) +LDFLAGS_NOSTRIP += $(CFLAG_-Wl-O2) endif + +LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs + ifeq ($(DOSTRIP),y) LDFLAGS += -Wl,-s else |