[git commit] buildsys: pass -O to ld unless DODEBUG

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Apr 14 21:58:41 UTC 2015


commit: http://git.uclibc.org/uClibc/commit/?id=f820f4ce071ae0985d84e09ea74dc42d55081e86
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 Rules.mak |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Rules.mak b/Rules.mak
index c68153e..83d78ff 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -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


More information about the uClibc-cvs mailing list