summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-13 03:34:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-13 03:34:47 +0000
commit5196e42e69782490d2cd1e2d74c0173629eab5e7 (patch)
treee4f6a5fe4a67836f89e7bd9304f2fe15b1a67c17
parent12632ad75678e42011af59aaec5e64a4a202d0dd (diff)
Make it again possible to have compact and small stack usage
on non-SSE capable processors. I'm doing it the second time. text data bss dec hex filename 238539 1367 11280 251186 3d532 uClibc.z2/lib/libuClibc-0.9.30-svn.so 229457 1367 11280 242104 3b1b8 uClibc.z3/lib/libuClibc-0.9.30-svn.so
-rw-r--r--Rules.mak8
1 files changed, 6 insertions, 2 deletions
diff --git a/Rules.mak b/Rules.mak
index a4679fb6b..b3dec5bde 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -179,11 +179,15 @@ PIEFLAG_NAME:=-fPIE
ifeq ($(TARGET_ARCH),i386)
OPTIMIZATION+=$(call check_gcc,-fomit-frame-pointer,)
+ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586)$(CONFIG_586MMX),y)
+ # Non-SSE capable processor.
# NB: this may make SSE insns segfault!
# -O1 -march=pentium3, -Os -msse etc are known to be affected.
- # TODO: conditionally bump to 4
- # (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13685)
+ # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13685
+ OPTIMIZATION+=$(call check_gcc,-mpreferred-stack-boundary=2,)
+else
OPTIMIZATION+=$(call check_gcc,-mpreferred-stack-boundary=4,)
+endif
# Choice of alignment (please document why!)
# -falign-labels: in-line labels